-
Notifications
You must be signed in to change notification settings - Fork 60
95 lines (91 loc) · 2.7 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
90
91
92
93
94
95
on:
pull_request:
branches:
- master
- "[0-9]+.[0-9]+"
push:
branches:
- staging
- trying
name: Continuous integration
jobs:
compile_and_test_msrv:
name: Compile and test MSRV
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.60.0
with:
components: clippy
- name: Minimal check
run: cargo clippy -v -p palette --no-default-features --features std
- name: find-crate check
run: cargo clippy -v -p palette --no-default-features --features "std find-crate"
- name: Default check
run: cargo clippy -v --workspace --exclude no_std_test
- name: Test all features
run: cargo test -v -p palette --all-features
- name: Test each feature
shell: bash
working-directory: palette
run: bash ../scripts/test_features.sh
check_stable_beta_nightly:
name: Quick check
strategy:
matrix:
toolchain: [beta, stable, nightly]
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: clippy
- name: Check all features
run: cargo clippy -v -p palette --all-features
no_std:
name: "Test #[no_std]"
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
targets: thumbv6m-none-eabi
- name: "Build with #[no_std]"
run: cargo build -v --package no_std_test --features nightly --target thumbv6m-none-eabi
miri:
name: Miri tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
components: miri
- name: Unit tests
run: cargo miri test --lib --features "bytemuck" -- -Z unstable-options --report-time
- name: Documentation tests
run: cargo miri test --doc --features "bytemuck" -- -Z unstable-options --report-time
# Refs: https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149
#
# ALL THE PREVIOUS JOBS NEEDS TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
ci-success:
name: ci
if: success()
needs:
- compile_and_test_msrv
- check_stable_beta_nightly
- no_std
- miri
runs-on: ubuntu-latest
steps:
- name: Mark the job as a success
run: exit 0