Skip to content

Commit 9f7b38e

Browse files
committed
Clean up CI config
1 parent 64aa315 commit 9f7b38e

File tree

3 files changed

+31
-61
lines changed

3 files changed

+31
-61
lines changed

.github/workflows/build-and-test.yaml

Lines changed: 26 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -13,71 +13,49 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
os: [ubuntu-latest, windows-latest, macos-latest]
16-
rust: [nightly, beta, stable, 1.39.0]
16+
rust: [nightly, beta, stable]
1717
steps:
1818
- uses: actions/checkout@v2
19-
20-
- name: Install latest ${{ matrix.rust }}
21-
uses: actions-rs/toolchain@v1
22-
with:
23-
toolchain: ${{ matrix.rust }}
24-
profile: minimal
25-
override: true
26-
27-
- name: Run basic cargo check
28-
uses: actions-rs/cargo@v1
29-
with:
30-
command: check
31-
args: --all --bins --all-features
32-
33-
- name: Run cargo check
34-
if: startsWith(matrix.rust, '1.39.0') == false
35-
uses: actions-rs/cargo@v1
36-
with:
37-
command: check
38-
args: --all --benches --bins --examples --tests --all-features
39-
19+
- name: Install Rust
20+
# --no-self-update is necessary because the windows environment cannot self-update rustup.exe.
21+
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
22+
- run: cargo build --all --all-features --all-targets
4023
- name: Run cargo check (without dev-dependencies to catch missing feature flags)
4124
if: startsWith(matrix.rust, 'nightly')
42-
uses: actions-rs/cargo@v1
43-
with:
44-
command: check
45-
args: -Z features=dev_dep
46-
47-
- name: Run cargo test
48-
if: startsWith(matrix.rust, '1.39.0') == false
49-
uses: actions-rs/cargo@v1
50-
with:
51-
command: test
25+
run: cargo check -Z features=dev_dep
26+
- run: cargo test
5227

5328
# Copied from: https://github.com/rust-lang/stacker/pull/19/files
5429
windows_gnu:
5530
runs-on: windows-latest
5631
strategy:
5732
matrix:
58-
rust_toolchain: [nightly]
59-
rust_target:
33+
rust: [nightly]
34+
target:
6035
- x86_64-pc-windows-gnu
6136
steps:
6237
- uses: actions/checkout@v1
63-
- name: Install Rust nightly
64-
uses: actions-rs/toolchain@v1
65-
with:
66-
toolchain: ${{ matrix.rust_toolchain }}
67-
target: ${{ matrix.rust_target }}
68-
default: true
38+
- name: Install Rust
39+
# --no-self-update is necessary because the windows environment cannot self-update rustup.exe.
40+
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
41+
- run: rustup target add ${{ matrix.target }}
6942
# https://github.com/rust-lang/rust/issues/49078
7043
- name: Fix windows-gnu rust-mingw
7144
run : |
7245
for i in crt2.o dllcrt2.o libmingwex.a libmsvcrt.a ; do
7346
cp -f "/C/ProgramData/Chocolatey/lib/mingw/tools/install/mingw64/x86_64-w64-mingw32/lib/$i" "`rustc --print sysroot`/lib/rustlib/x86_64-pc-windows-gnu/lib"
7447
done
7548
shell: bash
76-
- uses: actions-rs/cargo@v1
77-
with:
78-
command: build
79-
args: --target ${{ matrix.rust_target }} --all --benches --bins --examples --tests --all-features
80-
- uses: actions-rs/cargo@v1
81-
with:
82-
command: test
83-
args: --target ${{ matrix.rust_target }}
49+
- run: cargo build --target ${{ matrix.target }} --all --all-features --all-targets
50+
- run: cargo test --target ${{ matrix.target }}
51+
52+
msrv:
53+
runs-on: ubuntu-latest
54+
strategy:
55+
matrix:
56+
rust: [1.46.0]
57+
steps:
58+
- uses: actions/checkout@v2
59+
- name: Install Rust
60+
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
61+
- run: cargo build

.github/workflows/cross.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,9 @@ jobs:
1515
os: [ubuntu-latest, macos-latest]
1616

1717
steps:
18-
- uses: actions/checkout@master
19-
20-
- name: Install nightly
21-
uses: actions-rs/toolchain@v1
22-
with:
23-
toolchain: nightly
24-
override: true
18+
- uses: actions/checkout@v2
19+
- name: Install Rust
20+
run: rustup update stable
2521

2622
- name: Install cross
2723
run: cargo install cross

.github/workflows/lint.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,8 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v2
14-
15-
- uses: actions-rs/toolchain@v1
16-
with:
17-
toolchain: stable
18-
profile: minimal
19-
components: clippy
14+
- name: Install Rust
15+
run: rustup update stable
2016

2117
- uses: actions-rs/clippy-check@v1
2218
with:

0 commit comments

Comments
 (0)