-
Notifications
You must be signed in to change notification settings - Fork 11
70 lines (68 loc) · 2.38 KB
/
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
toolchain: nightly
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
toolchain: 1.61.0 # MSRV
- os: ubuntu-latest
deps: sudo apt-get update ; sudo apt install gcc-multilib
target: i686-unknown-linux-gnu
toolchain: stable
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
toolchain: nightly
variant: minimal_versions
steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
targets: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
- name: Install dependencies (if necessary)
run: ${{ matrix.deps }}
- name: Minimal versions (if necessary)
if: ${{ matrix.variant == 'minimal_versions' }}
run: cargo generate-lockfile -Z minimal-versions
- name: Test nightly (if possible)
if: ${{ matrix.toolchain == 'nightly' }}
run: |
cargo test --target ${{ matrix.target }} --features=nightly
cargo test --target ${{ matrix.target }} --all-features
cargo test --target ${{ matrix.target }} --benches --all-features
- name: Test
run: |
cargo test --target ${{ matrix.target }}
# doctests don't work without `libm` or `std`
cargo test --target ${{ matrix.target }} --tests --no-default-features
# all stable features:
cargo test --target ${{ matrix.target }} --features=std,serde1,rayon
test-no-std:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
targets: thumbv6m-none-eabi
toolchain: nightly
- name: Build top-level only
run: |
cargo build --target=thumbv6m-none-eabi --no-default-features
cargo build --target=thumbv6m-none-eabi
cargo build --target=thumbv6m-none-eabi --features serde1
cargo build --target=thumbv6m-none-eabi --no-default-features --features serde1