Skip to content

Commit c802777

Browse files
committed
Merge Check, CheckTier3, Docs and DocsTier3 CI jobs
And expand the amount of targets we check. Instead of getting the target setup twice, one for the cargo check run and another for cargo doc, do it once and check both.
1 parent 7fe1bff commit c802777

File tree

1 file changed

+48
-48
lines changed

1 file changed

+48
-48
lines changed

.github/workflows/main.yml

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -51,35 +51,63 @@ jobs:
5151
- name: Check formatting
5252
run: cargo fmt --all -- --check
5353
Check:
54-
name: Check
5554
runs-on: ubuntu-latest
55+
timeout-minutes: 10
5656
strategy:
5757
fail-fast: false
5858
matrix:
59-
target: ["aarch64-apple-ios", "aarch64-linux-android", "x86_64-apple-darwin", "x86_64-unknown-fuchsia", "x86_64-pc-windows-msvc", "x86_64-pc-solaris", "x86_64-unknown-freebsd", "x86_64-unknown-illumos", "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl", "x86_64-unknown-netbsd", "x86_64-unknown-redox", "armv7-linux-androideabi", "i686-linux-android"]
60-
steps:
61-
- uses: actions/checkout@v4
62-
- uses: dtolnay/rust-toolchain@stable
63-
with:
64-
targets: ${{ matrix.target }}
65-
- uses: taiki-e/install-action@cargo-hack
66-
- name: Run check
67-
run: cargo hack check --feature-powerset --all-targets --examples --bins --tests --target ${{ matrix.target }}
68-
CheckTier3:
69-
name: Check
70-
runs-on: ubuntu-latest
71-
strategy:
72-
fail-fast: false
73-
matrix:
74-
target: ["armv7-sony-vita-newlibeabihf", "i686-unknown-hurd-gnu"]
59+
target:
60+
- aarch64-apple-darwin
61+
- aarch64-apple-ios
62+
- aarch64-apple-tvos
63+
- aarch64-apple-visionos
64+
- aarch64-apple-watchos
65+
- aarch64-linux-android
66+
- aarch64-unknown-freebsd
67+
- aarch64-unknown-hermit
68+
- aarch64-unknown-linux-gnu
69+
- aarch64-unknown-linux-musl
70+
- aarch64-unknown-netbsd
71+
- aarch64-unknown-nto-qnx710
72+
- aarch64-unknown-openbsd
73+
- aarch64-unknown-redox
74+
- arm-linux-androideabi
75+
- arm64_32-apple-watchos
76+
- armv7-linux-androideabi
77+
- armv7-sony-vita-newlibeabihf
78+
- i686-linux-android
79+
- i686-unknown-hurd-gnu
80+
- i686-unknown-linux-gnu
81+
- riscv32imc-esp-espidf
82+
- sparcv9-sun-solaris
83+
- wasm32-wasi
84+
- x86_64-apple-darwin
85+
- x86_64-apple-ios
86+
- x86_64-pc-nto-qnx710
87+
- x86_64-pc-solaris
88+
- x86_64-pc-windows-gnu
89+
- x86_64-pc-windows-msvc
90+
- x86_64-unknown-dragonfly
91+
- x86_64-unknown-freebsd
92+
- x86_64-unknown-fuchsia
93+
- x86_64-unknown-haiku
94+
- x86_64-unknown-hermit
95+
- x86_64-unknown-illumos
96+
- x86_64-unknown-linux-gnu
97+
- x86_64-unknown-linux-musl
98+
- x86_64-unknown-netbsd
99+
- x86_64-unknown-openbsd
100+
- x86_64-unknown-redox
75101
steps:
76102
- uses: actions/checkout@v4
77103
- uses: dtolnay/rust-toolchain@nightly
78104
with:
79-
components: "rust-src"
105+
components: rust-src
80106
- uses: taiki-e/install-action@cargo-hack
81-
- name: Run check
82-
run: cargo hack check -Z build-std=std,panic_abort --feature-powerset --all-targets --examples --bins --tests --target ${{ matrix.target }}
107+
- name: Check build
108+
run: cargo hack check -Z build-std=std,panic_abort --feature-powerset --target ${{ matrix.target }}
109+
- name: Check docs
110+
run: RUSTDOCFLAGS="-D warnings --cfg docsrs" cargo doc -Z build-std=std,panic_abort --no-deps --all-features --target ${{ matrix.target }}
83111
Clippy:
84112
name: Clippy
85113
runs-on: ubuntu-latest
@@ -88,31 +116,3 @@ jobs:
88116
- uses: dtolnay/rust-toolchain@stable
89117
- name: Run Clippy
90118
run: cargo clippy --all-targets --all-features -- -D warnings
91-
Docs:
92-
name: Docs
93-
runs-on: ubuntu-latest
94-
strategy:
95-
fail-fast: false
96-
matrix:
97-
target: ["aarch64-apple-ios", "aarch64-linux-android", "x86_64-apple-darwin", "x86_64-unknown-fuchsia", "x86_64-pc-windows-msvc", "x86_64-pc-solaris", "x86_64-unknown-freebsd", "x86_64-unknown-illumos", "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl", "x86_64-unknown-netbsd", "x86_64-unknown-redox", "armv7-linux-androideabi", "i686-linux-android"]
98-
steps:
99-
- uses: actions/checkout@v4
100-
- uses: dtolnay/rust-toolchain@nightly # NOTE: need nightly for `doc_cfg` feature.
101-
with:
102-
targets: ${{ matrix.target }}
103-
- name: Check docs for docs.rs
104-
run: RUSTDOCFLAGS="-D warnings --cfg docsrs" cargo doc --no-deps --all-features --target ${{ matrix.target }}
105-
DocsTier3:
106-
name: Docs
107-
runs-on: ubuntu-latest
108-
strategy:
109-
fail-fast: false
110-
matrix:
111-
target: ["armv7-sony-vita-newlibeabihf", "i686-unknown-hurd-gnu"]
112-
steps:
113-
- uses: actions/checkout@v4
114-
- uses: dtolnay/rust-toolchain@nightly # NOTE: need nightly for `doc_cfg` feature.
115-
with:
116-
components: "rust-src"
117-
- name: Check docs for docs.rs
118-
run: RUSTDOCFLAGS="-D warnings --cfg docsrs" cargo doc -Z build-std=std,panic_abort --no-deps --all-features --target ${{ matrix.target }}

0 commit comments

Comments
 (0)