forked from TeXitoi/structopt
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (50 loc) · 1.64 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
name: ci
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: 00 4 * * *
jobs:
build:
strategy:
fail-fast: false
matrix:
rust:
# https://github.com/unicode-rs/unicode-width/commit/afab363383557c39942706c9441a5670e321b4a0
# added a call to `wrapping_add_signed`, added in 1.66.0.
- 1.66.0
- stable
- beta
- nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@v2
with:
tool: taplo-cli
- run: taplo fmt --check
- run: cargo fmt --all -- --check
- uses: dtolnay/rust-toolchain@master
with:
components: clippy,rustfmt
toolchain: ${{ matrix.rust }}
# Only exercise none/all feature sets; else we'd run the builder out of disk space.
- run: cargo build
- run: cargo build --all-features
# See https://github.com/dtolnay/trybuild/commit/4fc90bf70f4744a250dfb8804479f88c188de41b.
#
# Cannot build tests below 1.70.0.
- run: cargo clippy --all-targets --workspace -- --deny warnings --allow dead_code # TODO: remove?
if: matrix.rust != '1.66.0'
- run: cargo clippy --all-targets --workspace --all-features -- --deny warnings --allow dead_code # TODO: remove?
if: matrix.rust != '1.66.0'
- run: cargo test --workspace --no-default-features
if: matrix.rust != '1.66.0'
- run: cargo test --workspace --all-features
if: matrix.rust != '1.66.0'