-
Notifications
You must be signed in to change notification settings - Fork 85
56 lines (52 loc) · 1.73 KB
/
build-and-test.yml
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
name: Cargo build and test
on: [pull_request, workflow_dispatch]
jobs:
test:
strategy:
matrix:
target:
- i686-pc-windows-gnu
- x86_64-pc-windows-gnu
- i686-pc-windows-msvc
- x86_64-pc-windows-msvc
rust: [stable]
include:
# Attach the platform data for MinGW to the -gnu targets
- target: i686-pc-windows-gnu
platform: x86
- target: x86_64-pc-windows-gnu
platform: x64
# Test more Rust channels on x86_64 msvc
- target: x86_64-pc-windows-msvc
rust: beta
- target: x86_64-pc-windows-msvc
rust: nightly
# MSRV. Bumping this is not treated as a breaknig change,
# but it should be mentioned in the changelog.
- target: x86_64-pc-windows-msvc
rust: 1.58.0
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up MinGW
if: matrix.target == 'i686-pc-windows-gnu' || matrix.target == 'x86_64-pc-windows-gnu'
uses: egor-tensin/setup-mingw@v2
with:
platform: ${{ matrix.platform }}
# Pinning a working version of MinGW since we've issues with the action using newer
# versions
version: 12.2.0.03042023
- name: Install Rust
uses: actions-rs/[email protected]
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
profile: minimal
default: true
- name: Build and test
shell: bash
run: |
set -x
export RUSTFLAGS="--deny warnings"
cargo build --verbose --target ${{ matrix.target }}
cargo test --target ${{ matrix.target }}