Skip to content

Commit 5159dae

Browse files
authored
Merge pull request #23 from Speedy37/github-actions
Run CI with Github actions
2 parents 4b4aa1f + 8daf717 commit 5159dae

File tree

2 files changed

+81
-1
lines changed

2 files changed

+81
-1
lines changed

.github/workflows/ci.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
rust:
7+
name: Rust
8+
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, macos-latest, windows-latest]
12+
toolchain: ["stable"]
13+
14+
runs-on: ${{ matrix.os }}
15+
16+
env:
17+
CARGO_INCREMENTAL: 0
18+
RUST_BACKTRACE: 1
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v1
23+
with:
24+
submodules: recursive
25+
26+
- name: Install Rust toolchain
27+
uses: actions-rs/toolchain@v1
28+
with:
29+
toolchain: ${{ matrix.toolchain }}
30+
profile: minimal
31+
default: true
32+
33+
- name: Build (secure)
34+
uses: actions-rs/cargo@v1
35+
with:
36+
command: build
37+
38+
- name: Test (secure)
39+
uses: actions-rs/cargo@v1
40+
with:
41+
command: test
42+
args: --no-default-features
43+
44+
- name: Build (no secure)
45+
uses: actions-rs/cargo@v1
46+
with:
47+
command: build
48+
args: --no-default-features
49+
50+
- name: Test (no secure)
51+
uses: actions-rs/cargo@v1
52+
with:
53+
command: test
54+
args: --no-default-features
55+
56+
lint:
57+
name: Rustfmt / Clippy
58+
runs-on: ubuntu-latest
59+
60+
steps:
61+
- uses: actions/checkout@v1
62+
with:
63+
submodules: recursive
64+
65+
- uses: actions-rs/toolchain@v1
66+
with:
67+
profile: minimal
68+
toolchain: stable
69+
components: rustfmt, clippy
70+
71+
- name: Fmt
72+
uses: actions-rs/cargo@v1
73+
with:
74+
command: fmt
75+
args: --all -- --check
76+
77+
- name: Clippy
78+
uses: actions-rs/cargo@v1
79+
with:
80+
command: clippy

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
extern crate libmimalloc_sys as ffi;
2727

2828
use core::alloc::{GlobalAlloc, Layout};
29-
use ffi::*;
3029
use core::ffi::c_void;
30+
use ffi::*;
3131

3232
// Copied from https://github.com/rust-lang/rust/blob/master/src/libstd/sys_common/alloc.rs
3333
#[cfg(all(any(

0 commit comments

Comments
 (0)