|
7 | 7 | jobs:
|
8 | 8 | ci:
|
9 | 9 | name: Format, lint, and test
|
10 |
| - runs-on: ubuntu-18.04 |
| 10 | + runs-on: ${{ matrix.os }} |
| 11 | + strategy: |
| 12 | + matrix: |
| 13 | + include: |
| 14 | + - os: ubuntu-18.04 |
| 15 | + binary_target: x86_64-unknown-linux-musl |
| 16 | + needs_musl: true |
| 17 | + - os: ubuntu-18.04 |
| 18 | + binary_target: x86_64-unknown-linux-gnu |
| 19 | + - os: macos-10.15 |
| 20 | + binary_target: x86_64-apple-darwin |
| 21 | + - os: windows-2019 |
| 22 | + binary_target: x86_64-pc-windows-msvc |
11 | 23 | steps:
|
12 | 24 | - uses: actions/checkout@v2
|
13 | 25 | with:
|
14 | 26 | submodules: recursive
|
15 | 27 | - uses: davidB/rust-cargo-make@v1
|
16 | 28 |
|
17 |
| - - uses: actions-rs/toolchain@v1 |
18 |
| - with: |
19 |
| - toolchain: stable |
20 |
| - profile: minimal |
21 |
| - override: true |
22 |
| - |
23 |
| - - name: Set up Makefile.toml |
| 29 | + - name: Install musl tools |
| 30 | + if: matrix.needs_musl |
24 | 31 | run: |
|
25 |
| - cat >Makefile.toml <<EOF |
26 |
| - [env] |
27 |
| - CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true |
28 |
| - CARGO_MAKE_RUN_CLIPPY = true |
29 |
| - CARGO_MAKE_CLIPPY_ARGS = "--all-features -- -D warnings" |
30 |
| - CARGO_MAKE_RUN_CHECK_FORMAT = true |
31 |
| - RUSTFLAGS="-D warnings" |
| 32 | + sudo apt-get install musl-tools |
| 33 | + sudo ln -s /usr/bin/musl-gcc /usr/bin/musl-g++ |
32 | 34 |
|
33 |
| - [tasks.check-format-ci-flow] |
34 |
| - condition = { env_set = [ |
35 |
| - "CARGO_MAKE_RUN_CHECK_FORMAT", |
36 |
| - ], channels = [ |
37 |
| - "stable", |
38 |
| - ], platforms = [ |
39 |
| - "linux", |
40 |
| - ] } |
| 35 | + - name: Install LLVM and Clang # required for bindgen on Windows |
| 36 | + uses: KyleMayes/install-llvm-action@v1 |
| 37 | + if: matrix.os == 'windows-2019' |
| 38 | + with: |
| 39 | + version: "10.0" |
41 | 40 |
|
42 |
| - [tasks.clippy-ci-flow] |
43 |
| - condition = { env_set = [ |
44 |
| - "CARGO_MAKE_RUN_CLIPPY", |
45 |
| - ], channels = [ |
46 |
| - "stable", |
47 |
| - ], platforms = [ |
48 |
| - "linux", |
49 |
| - ] } |
50 |
| - EOF |
| 41 | + - name: Install rust ${{ matrix.binary_target }} |
| 42 | + uses: actions-rs/toolchain@v1 |
| 43 | + with: |
| 44 | + toolchain: stable-${{ matrix.binary_target }} |
| 45 | + profile: minimal |
51 | 46 |
|
52 | 47 | - uses: actions-rs/cargo@v1
|
53 | 48 | with:
|
54 | 49 | command: make
|
55 |
| - args: --no-workspace workspace-ci-flow |
| 50 | + args: --makefile ci-makefile.toml --no-workspace workspace-ci-flow |
0 commit comments