-
-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (82 loc) · 3.03 KB
/
ci.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Largely inspired by https://github.com/dtolnay/syn/blob/master/.github/workflows/ci.yml under MIT OR Apache-2.0.
name: CI
permissions:
contents: read
on:
pull_request:
push:
# This used to also be scheduled, but apparently GitHub also turns it off otherwise when deactivating that due to repository inactivity.
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1.0.7
- run: cat CI.toml >> Cargo.toml
- run: cargo test --workspace --locked --no-default-features
- run: cargo test --workspace --locked
- run: cargo test --workspace --locked --all-features
browser-test:
name: Browser Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1.0.7
with:
toolchain: stable
profile: minimal
target: wasm32-unknown-unknown
- run: cargo +stable install wasm-bindgen-cli --vers "^0.2.71"
- run: cat CI.toml >> Cargo.toml
- run: cargo +stable test --workspace --locked --target wasm32-unknown-unknown --no-default-features
- run: cargo +stable test --workspace --locked --target wasm32-unknown-unknown
- run: cargo +stable test --workspace --locked --target wasm32-unknown-unknown --all-features
miri:
name: Miri
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1.0.7
with:
toolchain: nightly
profile: minimal
components: miri, rust-src
- run: cat CI.toml >> Cargo.toml
- run: cargo +nightly miri test --workspace --locked --no-default-features
- run: cargo +nightly miri test --workspace --locked
- run: cargo +nightly miri test --workspace --locked --all-features
check:
name: Check on Rust ${{matrix.rust}}${{format(' ({0})', matrix.target || matrix.os)}}
runs-on: ${{matrix.os}}-latest
strategy:
matrix:
os: [macos, ubuntu, windows]
rust: ['1.54', stable, beta, nightly]
env:
target: ${{matrix.target && format('--target={0}', matrix.target)}}
workspace: ${{matrix.no-workspace || '--workspace'}}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1.0.7
with:
toolchain: ${{matrix.rust}}
profile: minimal
target: ${{matrix.target}}
- run: cat CI.toml >> Cargo.toml
- run: cargo +${{matrix.rust}} check --locked ${{env.target}} ${{env.workspace}} --no-default-features
- run: cargo +${{matrix.rust}} check --locked ${{env.target}} ${{env.workspace}}
- run: cargo +${{matrix.rust}} check --locked ${{env.target}} ${{env.workspace}} --all-features
minimal-versions:
name: Minimal Versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1.0.7
with:
toolchain: nightly
override: true
- uses: taiki-e/install-action@cargo-hack
- uses: taiki-e/install-action@cargo-minimal-versions
- run: cat CI.toml >> Cargo.toml
- run: cargo minimal-versions check --workspace