1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Cargo Check/Tests
on:
- push
jobs:
test:
strategy:
matrix:
toolchain:
target:
- os: windows-latest
triple: i686-pc-windows-msvc
- os: windows-latest
triple: x86_64-pc-windows-msvc
# - os: windows-latest
# triple: i686-pc-windows-gnu
# - os: windows-latest
# triple: x86_64-pc-windows-gnu
# - os: ubuntu-latest
# triple: x86_64-unknown-linux-gnu
# - os: ubuntu-latest
# triple: x86_64-unknown-linux-musl
# rustflags: RUSTFLAGS="-C target-feature=-crt-static"
# - os: ubuntu-latest
# triple: i686-unknown-linux-gnu
# - os: macos-latest
# triple: i686-apple-darwin
# - os: macos-latest
# triple: x86_64-apple-darwin
runs-on: ${{ matrix.target.os }}
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
targets: ${{ matrix.target.triple }}
# Install linux deps
- if: matrix.target.os == 'ubuntu-latest'
run: sudo apt-get install gcc-multilib
# Install linux deps
# - if: matrix.target.triple == 'x86_64-unknown-linux-musl'
# run: sudo apt-get install musl-tools
# Windows mingw 64bit
- if: matrix.target.triple == 'x86_64-pc-windows-gnu'
name: Set up MinGW
uses: egor-tensin/setup-mingw@v2
with:
platform: x64
# Windows mingw 32bit
- if: matrix.target.triple == 'i686-pc-windows-gnu'
name: Set up MinGW
uses: egor-tensin/setup-mingw@v2
with:
platform: x86
- name: Cargo Check
run: ${{ matrix.target.rustflags }} cargo check --target ${{ matrix.target.triple }} --all-features
- name: Cargo tests
run: ${{ matrix.target.rustflags }} cargo test --target ${{ matrix.target.triple }} --all-features