Skip to content

Commit a30e88f

Browse files
authored
Merge pull request #478 from mkroening/ci-actions
ci: migrate away from unmaintained actions
2 parents b9a642a + ed41a38 commit a30e88f

File tree

1 file changed

+20
-90
lines changed

1 file changed

+20
-90
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -27,41 +27,15 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- uses: actions/checkout@v4
30-
- uses: actions-rs/toolchain@v1
30+
- uses: dtolnay/rust-toolchain@master
3131
with:
32-
profile: minimal
3332
toolchain: ${{ matrix.rust }}
34-
override: true
35-
- name: Run cargo build for stable
36-
uses: actions-rs/cargo@v1
37-
with:
38-
command: build
39-
args: --no-default-features --features instructions
40-
- name: Run cargo build for stable without instructions
41-
uses: actions-rs/cargo@v1
42-
with:
43-
command: build
44-
args: --no-default-features
45-
- name: Run cargo doc for stable
46-
uses: actions-rs/cargo@v1
47-
with:
48-
command: doc
49-
args: --no-default-features --features instructions
50-
- name: Run cargo doc for stable without instructions
51-
uses: actions-rs/cargo@v1
52-
with:
53-
command: doc
54-
args: --no-default-features
55-
- name: Run cargo test for stable
56-
uses: actions-rs/cargo@v1
57-
with:
58-
command: test
59-
args: --no-default-features --features instructions
60-
- name: Run cargo test for stable without instructions
61-
uses: actions-rs/cargo@v1
62-
with:
63-
command: test
64-
args: --no-default-features
33+
- run: cargo build --no-default-features --features instructions
34+
- run: cargo build --no-default-features
35+
- run: cargo doc --no-default-features --features instructions
36+
- run: cargo doc --no-default-features
37+
- run: cargo test --no-default-features --features instructions
38+
- run: cargo test --no-default-features
6539

6640
test:
6741
name: "Test"
@@ -76,51 +50,22 @@ jobs:
7650

7751
steps:
7852
- uses: actions/checkout@v4
79-
- uses: actions-rs/toolchain@v1
53+
- uses: dtolnay/rust-toolchain@nightly
8054
with:
81-
profile: minimal
82-
toolchain: nightly
83-
override: true
84-
target: x86_64-unknown-linux-musl
85-
86-
- name: "Print Rust Version"
87-
run: |
88-
rustc -Vv
89-
cargo -Vv
55+
targets: x86_64-unknown-linux-musl, i686-unknown-linux-gnu, thumbv7em-none-eabihf
9056

91-
- name: "Run cargo build"
92-
uses: actions-rs/cargo@v1
93-
with:
94-
command: build
57+
- run: cargo build
9558

96-
- name: "Run cargo doc"
97-
uses: actions-rs/cargo@v1
98-
with:
99-
command: doc
59+
- run: cargo doc
10060

101-
- name: "Run cargo build on musl"
102-
uses: actions-rs/cargo@v1
103-
with:
104-
command: build
105-
args: --target x86_64-unknown-linux-musl
61+
- run: cargo build --target x86_64-unknown-linux-musl
10662
if: runner.os == 'Linux'
10763

108-
- name: "Run cargo test"
109-
uses: actions-rs/cargo@v1
110-
with:
111-
command: test
64+
- run: cargo test
11265

113-
- name: "Run cargo test on musl"
114-
uses: actions-rs/cargo@v1
115-
with:
116-
command: test
117-
args: --target x86_64-unknown-linux-musl
66+
- run: cargo test --target x86_64-unknown-linux-musl
11867
if: runner.os == 'Linux'
11968

120-
- name: "Install Rustup Targets"
121-
run: |
122-
rustup target add i686-unknown-linux-gnu
123-
rustup target add thumbv7em-none-eabihf
12469
- name: "Build on non x86_64 platforms"
12570
run: |
12671
cargo build --target i686-unknown-linux-gnu --no-default-features --features nightly
@@ -151,13 +96,9 @@ jobs:
15196
run: echo "$GITHUB_WORKSPACE/binaries/bin" >> $GITHUB_PATH
15297
shell: bash
15398

154-
- name: "Install Rustup Components"
155-
uses: actions-rs/toolchain@v1
99+
- uses: dtolnay/rust-toolchain@nightly
156100
with:
157-
toolchain: nightly
158-
override: true
159-
profile: minimal
160-
components: rust-src, llvm-tools-preview
101+
components: rust-src, llvm-tools
161102
- name: "Install cargo-xbuild"
162103
run: cargo install cargo-xbuild --debug --root binaries
163104
- name: "Install bootimage"
@@ -197,32 +138,21 @@ jobs:
197138
timeout-minutes: 2
198139
steps:
199140
- uses: actions/checkout@v4
200-
- uses: actions-rs/toolchain@v1
141+
- uses: dtolnay/rust-toolchain@nightly
201142
with:
202-
toolchain: nightly
203-
override: true
204-
profile: minimal
205143
components: rustfmt
206-
- uses: actions-rs/cargo@v1
207-
with:
208-
command: fmt
209-
args: --all -- --check
144+
- run: cargo fmt --all -- --check
210145

211146
clippy:
212147
name: "Clippy"
213148
runs-on: ubuntu-latest
214149
timeout-minutes: 10
215150
steps:
216151
- uses: actions/checkout@v4
217-
- uses: actions-rs/toolchain@v1
152+
- uses: dtolnay/rust-toolchain@nightly
218153
with:
219-
toolchain: nightly
220-
override: true
221-
profile: minimal
222154
components: clippy
223-
- uses: actions-rs/cargo@v1
224-
with:
225-
command: clippy
155+
- run: cargo clippy
226156

227157
semver-checks:
228158
name: Semver Checks

0 commit comments

Comments
 (0)