Skip to content

Commit 09d8763

Browse files
committed
Update CI
1 parent 511282a commit 09d8763

File tree

1 file changed

+19
-38
lines changed

1 file changed

+19
-38
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
on:
2-
push:
3-
pull_request:
4-
51
name: Build
2+
on: [push, pull_request]
63

74
env:
85
RUSTFLAGS: '--deny warnings'
@@ -13,7 +10,7 @@ jobs:
1310
runs-on: ubuntu-latest
1411
strategy:
1512
matrix:
16-
rust: [stable]
13+
rust: [stable, 1.62.0]
1714
TARGET:
1815
- x86_64-unknown-linux-gnu
1916
- x86_64-unknown-linux-musl
@@ -30,7 +27,7 @@ jobs:
3027
- uses: dtolnay/rust-toolchain@master
3128
with:
3229
toolchain: ${{ matrix.rust }}
33-
target: ${{ matrix.TARGET }}
30+
targets: ${{ matrix.TARGET }}
3431

3532
- name: Checkout CI scripts
3633
uses: actions/checkout@v4
@@ -42,50 +39,35 @@ jobs:
4239
- run: ./ci/patch-no-std.sh
4340
if: ${{ ! contains(matrix.TARGET, 'x86_64') }}
4441

45-
- name: Build
46-
run: cargo build --target=${{ matrix.TARGET }}
42+
- run: cargo build --target=${{ matrix.TARGET }}
4743

4844
checks:
4945
name: Checks
5046
runs-on: ubuntu-latest
51-
strategy:
52-
matrix:
53-
rust: [stable]
54-
TARGET:
55-
- x86_64-unknown-linux-gnu
5647

5748
steps:
5849
- uses: actions/checkout@v4
59-
- uses: dtolnay/rust-toolchain@master
50+
- uses: dtolnay/rust-toolchain@stable
6051
with:
61-
toolchain: ${{ matrix.rust }}
62-
target: ${{ matrix.TARGET }}
52+
targets: x86_64-unknown-linux-gnu
6353
components: rustfmt
6454

65-
- name: Doc
66-
run: cargo doc
67-
68-
- name: Formatting
69-
run: cargo fmt --all -- --check
55+
- run: cargo doc
56+
- run: cargo fmt --all -- --check
7057

7158
clippy:
7259
name: Clippy
7360
runs-on: ubuntu-latest
74-
strategy:
75-
matrix:
76-
rust: [stable]
77-
TARGET:
78-
- x86_64-unknown-linux-gnu
7961

8062
steps:
8163
- uses: actions/checkout@v4
8264
- uses: dtolnay/rust-toolchain@master
8365
with:
84-
toolchain: ${{ matrix.rust }}
85-
target: ${{ matrix.TARGET }}
66+
toolchain: 1.85.0
67+
targets: x86_64-unknown-linux-gnu
8668
components: clippy
8769

88-
- run: cargo clippy --message-format=json --all-features
70+
- run: cargo clippy --all-targets
8971

9072
test:
9173
name: Tests
@@ -94,27 +76,26 @@ jobs:
9476
matrix:
9577
rust: [stable]
9678
TARGET: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl]
79+
9780
steps:
9881
- uses: actions/checkout@v4
9982
- uses: dtolnay/rust-toolchain@master
10083
with:
10184
toolchain: ${{ matrix.rust }}
102-
target: ${{ matrix.TARGET }}
85+
targets: ${{ matrix.TARGET }}
10386

10487
- name: Test
10588
run: cargo test --target=${{ matrix.TARGET }}
10689

90+
- name: Build examples
91+
run: cargo build --target=${{ matrix.TARGET }} --examples
92+
10793
coverage:
10894
name: Coverage
10995
runs-on: ubuntu-latest
11096
steps:
111-
- name: Checkout repository
112-
uses: actions/checkout@v4
113-
114-
- name: Install stable toolchain
115-
uses: dtolnay/rust-toolchain@master
116-
with:
117-
toolchain: stable
97+
- uses: actions/checkout@v4
98+
- uses: dtolnay/rust-toolchain@stable
11899

119100
- name: Install cargo-llvm-cov
120101
uses: taiki-e/install-action@cargo-llvm-cov
@@ -126,4 +107,4 @@ jobs:
126107
uses: coverallsapp/github-action@master
127108
with:
128109
github-token: ${{ secrets.GITHUB_TOKEN }}
129-
path-to-lcov: './lcov.info'
110+
path-to-lcov: './lcov.info'

0 commit comments

Comments
 (0)