Skip to content

Commit 0c5e422

Browse files
bors[bot]cuviper
andauthored
Merge #109
109: Update and simplify the CI workflow r=cuviper a=cuviper - Update to actions/checkout@v3 - Switch from actions-rs/toolchain to dtolnay/rust-toolchain - Switch from actions-rs/cargo to plain run - Stop explicitly naming CI steps Co-authored-by: Josh Stone <cuviper@gmail.com>
2 parents 8963efc + a4e13ee commit 0c5e422

File tree

3 files changed

+21
-72
lines changed

3 files changed

+21
-72
lines changed

.github/workflows/ci.yaml

Lines changed: 10 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -20,56 +20,30 @@ jobs:
2020
nightly
2121
]
2222
steps:
23-
- name: Rust install
24-
uses: actions-rs/toolchain@v1
23+
- uses: actions/checkout@v3
24+
- uses: dtolnay/rust-toolchain@master
2525
with:
2626
toolchain: ${{ matrix.rust }}
27-
profile: minimal
28-
override: true
29-
- name: Checkout
30-
uses: actions/checkout@v2
31-
- name: Build
32-
uses: actions-rs/cargo@v1
33-
with:
34-
command: build
35-
- name: Test
36-
run: ./ci/test_full.sh
27+
- run: cargo build
28+
- run: ./ci/test_full.sh
3729

3830
# try a target that doesn't have std at all, but does have alloc
3931
no_std:
4032
name: No Std
4133
runs-on: ubuntu-latest
4234
steps:
43-
- name: Rust install
44-
uses: actions-rs/toolchain@v1
35+
- uses: actions/checkout@v3
36+
- uses: dtolnay/rust-toolchain@stable
4537
with:
46-
toolchain: stable
47-
profile: minimal
48-
override: true
4938
target: thumbv6m-none-eabi
50-
- name: Checkout
51-
uses: actions/checkout@v1
52-
- name: Build
53-
uses: actions-rs/cargo@v1
54-
with:
55-
command: build
56-
args: --target thumbv6m-none-eabi --no-default-features --features "libm rand serde"
39+
- run: cargo build --target thumbv6m-none-eabi --no-default-features --features "libm rand serde"
5740

5841
fmt:
5942
name: Format
6043
runs-on: ubuntu-latest
6144
steps:
62-
- name: Rust install
63-
uses: actions-rs/toolchain@v1
45+
- uses: actions/checkout@v3
46+
- uses: dtolnay/rust-toolchain@1.62.0
6447
with:
65-
toolchain: 1.42.0
66-
profile: minimal
67-
override: true
6848
components: rustfmt
69-
- name: Checkout
70-
uses: actions/checkout@v2
71-
- name: Check formatting
72-
uses: actions-rs/cargo@v1
73-
with:
74-
command: fmt
75-
args: --all -- --check
49+
- run: cargo fmt --all --check

.github/workflows/master.yaml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,9 @@ jobs:
1515
matrix:
1616
rust: [1.31.0, stable]
1717
steps:
18-
- name: Rust install
19-
uses: actions-rs/toolchain@v1
18+
- uses: actions/checkout@v3
19+
- uses: dtolnay/rust-toolchain@master
2020
with:
2121
toolchain: ${{ matrix.rust }}
22-
profile: minimal
23-
override: true
24-
- name: Checkout
25-
uses: actions/checkout@v2
26-
- name: Build
27-
uses: actions-rs/cargo@v1
28-
with:
29-
command: build
30-
- name: Test
31-
run: ./ci/test_full.sh
22+
- run: cargo build
23+
- run: ./ci/test_full.sh

.github/workflows/pr.yaml

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,19 @@ jobs:
1111
matrix:
1212
rust: [1.31.0, stable]
1313
steps:
14-
- name: Rust install
15-
uses: actions-rs/toolchain@v1
14+
- uses: actions/checkout@v3
15+
- uses: dtolnay/rust-toolchain@master
1616
with:
1717
toolchain: ${{ matrix.rust }}
18-
profile: minimal
19-
override: true
20-
- name: Checkout
21-
uses: actions/checkout@v2
22-
- name: Build
23-
uses: actions-rs/cargo@v1
24-
with:
25-
command: build
26-
- name: Test
27-
run: ./ci/test_full.sh
18+
- run: cargo build
19+
- run: ./ci/test_full.sh
2820

2921
fmt:
3022
name: Format
3123
runs-on: ubuntu-latest
3224
steps:
33-
- name: Rust install
34-
uses: actions-rs/toolchain@v1
25+
- uses: actions/checkout@v3
26+
- uses: dtolnay/rust-toolchain@1.62.0
3527
with:
36-
toolchain: 1.42.0
37-
profile: minimal
38-
override: true
3928
components: rustfmt
40-
- name: Checkout
41-
uses: actions/checkout@v2
42-
- name: Check formatting
43-
uses: actions-rs/cargo@v1
44-
with:
45-
command: fmt
46-
args: --all -- --check
29+
- run: cargo fmt --all --check

0 commit comments

Comments
 (0)