Skip to content

Commit 1099202

Browse files
committed
Update CI to test on windows
1 parent 7968c62 commit 1099202

File tree

1 file changed

+42
-7
lines changed

1 file changed

+42
-7
lines changed

.github/workflows/rust.yml

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,29 +41,64 @@ jobs:
4141
with:
4242
toolchain: stable
4343
- name: Remove cargo config
44-
run: rm -rf .cargo
44+
run: rm -r .cargo
4545
- name: Check musl
4646
run: |
4747
rustup target add x86_64-unknown-linux-musl
4848
cargo check -p minion -p minion-ffi -p minion-cli --target x86_64-unknown-linux-musl
49+
- name: Check windows (gnu)
50+
run: |
51+
rustup target add x86_64-pc-windows-gnu
52+
cargo check -p minion -p minion-ffi -p minion-cli --target x86_64-pc-windows-gnu
53+
- name: Check windows (msvc)
54+
run: |
55+
rustup target add x86_64-pc-windows-msvc
56+
cargo check -p minion -p minion-ffi -p minion-cli --target x86_64-pc-windows-msvc
4957
tests:
50-
runs-on: ubuntu-latest
58+
strategy:
59+
matrix:
60+
os: ["ubuntu-20.04", "windows-2019"]
61+
include:
62+
- os: "ubuntu-20.04"
63+
target: "x86_64-unknown-linux-musl"
64+
- os: "windows-2019"
65+
target: "x86_64-pc-windows-gnu"
66+
fail-fast: false
67+
runs-on: ${{ matrix.os }}
5168
steps:
5269
- uses: actions/checkout@v2
5370
- uses: actions-rs/toolchain@v1.0.6
5471
with:
5572
toolchain: nightly
5673
override: true
57-
- name: Compile tests
74+
- name: Compile tests (Linux)
75+
if: matrix.os == 'ubuntu-20.04'
5876
run: |
59-
rm -rf .cargo
60-
cd minion-tests
61-
TARGET=x86_64-unknown-linux-musl
77+
rm -r .cargo
78+
cd minion-tests
79+
TARGET=${{ matrix.target }}
80+
rustup target add $TARGET
81+
cargo build -Zunstable-options --out-dir=../out --target=$TARGET
82+
- name: Compile tests (Windows)
83+
if: matrix.os == 'windows-2019'
84+
run: |
85+
rm -r .cargo
86+
cd minion-tests
87+
$TARGET=${{ matrix.target }}
6288
rustup target add $TARGET
6389
cargo build -Zunstable-options --out-dir=../out --target=$TARGET
64-
- name: Run tests
90+
- name: Run tests (Linux)
91+
if: matrix.os == 'ubuntu-20.04'
92+
timeout-minutes: 3
6593
run: |
94+
# temp
95+
file ./out/minion-tests
96+
ld ./out/minion-tests
6697
sudo ./out/minion-tests --trace
98+
- name: Run tests (Windows)
99+
if: matrix.os == 'windows-2019'
100+
run: |
101+
./out.minion-tests.exe
67102
timeout-minutes: 3
68103
- name: Collect logs
69104
if: always()

0 commit comments

Comments
 (0)