Skip to content

Commit 0ed40ab

Browse files
committed
GitHub Actions: Modernize all workflows
1 parent 75f5727 commit 0ed40ab

File tree

6 files changed

+108
-181
lines changed

6 files changed

+108
-181
lines changed

.github/workflows/linux-armv7.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,15 @@ name: Linux armv7
1212
jobs:
1313
check:
1414
name: Build
15-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-20.04
1616
steps:
17-
- uses: actions/checkout@v2
17+
- name: Checkout
18+
uses: actions/checkout@v4
1819
with:
1920
submodules: recursive
20-
- uses: actions-rs/toolchain@v1
21-
with:
22-
profile: minimal
23-
toolchain: stable
24-
target: armv7-unknown-linux-gnueabihf
25-
override: true
21+
2622
- name: cargo build
27-
uses: actions-rs/cargo@v1
23+
uses: houseabsolute/actions-rust-cross@v1
2824
with:
29-
use-cross: true
30-
command: build
31-
args: --target armv7-unknown-linux-gnueabihf
25+
command: cargo build
26+
target: armv7-unknown-linux-gnueabihf

.github/workflows/linux-x86_64.yml

Lines changed: 18 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ name: Linux x86_64
1111

1212
jobs:
1313
check:
14-
name: Check
15-
runs-on: ubuntu-22.04
14+
name: Check code
15+
runs-on: ubuntu-20.04
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v4
@@ -21,39 +21,18 @@ jobs:
2121

2222
- name: Install Rust
2323
uses: dtolnay/[email protected]
24-
25-
- name: Rust cache
26-
uses: swatinem/rust-cache@v2
27-
28-
- name: cargo check
29-
run: cargo check
30-
31-
generate:
32-
name: Generate low-level API
33-
runs-on: ubuntu-22.04
34-
steps:
35-
- name: Set up dependencies
36-
run: |
37-
sudo apt-get update
38-
sudo apt-get install clang
39-
40-
- name: Checkout
41-
uses: actions/checkout@v4
4224
with:
43-
submodules: recursive
44-
45-
- name: Install Rust
46-
uses: dtolnay/[email protected]
25+
components: clippy
4726

4827
- name: Rust cache
4928
uses: swatinem/rust-cache@v2
5029

51-
- name: cargo build
52-
run: cargo build --manifest-path main/low/Cargo.toml --features generate
30+
- name: cargo clippy
31+
run: cargo clippy -- -D warnings
5332

5433
test:
5534
name: Run tests
56-
runs-on: ubuntu-22.04
35+
runs-on: ubuntu-20.04
5736
steps:
5837
- name: Checkout
5938
uses: actions/checkout@v4
@@ -69,18 +48,12 @@ jobs:
6948
- name: cargo build
7049
run: cargo build
7150

72-
- name: Upload test plug-ins
73-
uses: actions/upload-artifact@v4
74-
with:
75-
name: test-plug-ins
76-
path: target/debug/*.so
77-
7851
- name: cargo test
7952
run: cargo test -- --nocapture
8053

8154
fmt:
8255
name: Check formatting
83-
runs-on: ubuntu-22.04
56+
runs-on: ubuntu-20.04
8457
steps:
8558
- name: Checkout
8659
uses: actions/checkout@v4
@@ -100,7 +73,7 @@ jobs:
10073

10174
doc:
10275
name: Check docs
103-
runs-on: ubuntu-22.04
76+
runs-on: ubuntu-20.04
10477
steps:
10578
- name: Checkout
10679
uses: actions/checkout@v4
@@ -118,22 +91,25 @@ jobs:
11891
- name: cargo doc
11992
run: cargo doc
12093

121-
clippy:
122-
name: Check clippy lints
123-
runs-on: ubuntu-22.04
94+
generate:
95+
name: Generate low-level API
96+
runs-on: ubuntu-20.04
12497
steps:
98+
- name: Set up dependencies
99+
run: |
100+
sudo apt-get update
101+
sudo apt-get install clang
102+
125103
- name: Checkout
126104
uses: actions/checkout@v4
127105
with:
128106
submodules: recursive
129107

130108
- name: Install Rust
131109
uses: dtolnay/[email protected]
132-
with:
133-
components: clippy
134110

135111
- name: Rust cache
136112
uses: swatinem/rust-cache@v2
137113

138-
- name: cargo clippy
139-
run: cargo clippy -- -D warnings
114+
- name: cargo build
115+
run: cargo build --manifest-path main/low/Cargo.toml --features generate

.github/workflows/macos-aarch64.yml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,28 @@ on:
1010
name: macOS aarch64
1111

1212
jobs:
13-
build:
14-
name: Build
13+
check:
14+
name: Check
15+
runs-on: macos-14
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
submodules: recursive
21+
22+
- name: Install Rust
23+
uses: dtolnay/[email protected]
24+
with:
25+
components: clippy
26+
27+
- name: Rust cache
28+
uses: swatinem/rust-cache@v2
29+
30+
- name: cargo clippy
31+
run: cargo clippy -- -D warnings
32+
33+
test:
34+
name: Run tests
1535
runs-on: macos-14
1636
env:
1737
# The first aarch64 target
@@ -21,13 +41,15 @@ jobs:
2141
uses: actions/checkout@v4
2242
with:
2343
submodules: recursive
44+
2445
- name: Install Rust
2546
uses: dtolnay/[email protected]
26-
with:
27-
targets: aarch64-apple-darwin
2847

2948
- name: Rust cache
3049
uses: swatinem/rust-cache@v2
3150

3251
- name: cargo build
33-
run: cargo build --target aarch64-apple-darwin
52+
run: cargo build
53+
54+
- name: cargo test
55+
run: cargo test -- --nocapture

.github/workflows/macos-x86_64.yml

Lines changed: 14 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -10,68 +10,22 @@ on:
1010
name: macOS x86_64
1111

1212
jobs:
13-
check:
14-
name: Check
15-
runs-on: macos-latest
16-
steps:
17-
- uses: actions/checkout@v2
18-
with:
19-
submodules: recursive
20-
- uses: actions-rs/toolchain@v1
21-
with:
22-
profile: minimal
23-
toolchain: stable
24-
override: true
25-
- name: cargo check
26-
uses: actions-rs/cargo@v1
27-
with:
28-
command: check
29-
30-
test:
31-
name: Test Suite
32-
runs-on: macos-latest
13+
build:
14+
name: Build
15+
runs-on: macos-13
3316
env:
34-
MACOSX_DEPLOYMENT_TARGET: 10.12
17+
MACOSX_DEPLOYMENT_TARGET: 10.9
3518
steps:
36-
- uses: actions/checkout@v2
19+
- name: Checkout
20+
uses: actions/checkout@v4
3721
with:
3822
submodules: recursive
39-
- uses: actions-rs/toolchain@v1
40-
with:
41-
profile: minimal
42-
toolchain: stable
43-
override: true
44-
- name: cargo build
45-
uses: actions-rs/cargo@v1
46-
with:
47-
command: build
48-
# - name: Setup tmate session
49-
# uses: mxschmitt/action-tmate@v2
50-
- uses: actions/upload-artifact@v4
51-
with:
52-
name: test-plug-ins
53-
path: target/debug/*.dylib
54-
- name: cargo test
55-
uses: actions-rs/cargo@v1
56-
with:
57-
command: test
58-
args: -- --nocapture
5923

60-
clippy:
61-
name: Clippy
62-
runs-on: macos-latest
63-
steps:
64-
- uses: actions/checkout@v2
65-
with:
66-
submodules: recursive
67-
- uses: actions-rs/toolchain@v1
68-
with:
69-
profile: minimal
70-
toolchain: stable
71-
override: true
72-
- run: rustup component add clippy
73-
- name: cargo clippy
74-
uses: actions-rs/cargo@v1
75-
with:
76-
command: clippy
77-
args: -- -D warnings
24+
- name: Install Rust
25+
uses: dtolnay/[email protected]
26+
27+
- name: Rust cache
28+
uses: swatinem/rust-cache@v2
29+
30+
- name: cargo build
31+
run: cargo build

.github/workflows/windows-i686.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,23 @@ on:
1010
name: Windows i686
1111

1212
jobs:
13-
check:
13+
build:
1414
name: Build
15-
runs-on: windows-latest
15+
runs-on: windows-2019
1616
steps:
17-
- uses: actions/checkout@v2
17+
- name: Checkout
18+
uses: actions/checkout@v4
1819
with:
1920
submodules: recursive
20-
- uses: actions-rs/toolchain@v1
21+
22+
- name: Install Rust
23+
uses: dtolnay/[email protected]
2124
with:
22-
profile: minimal
23-
toolchain: stable-i686-pc-windows-msvc
24-
target: i686-pc-windows-msvc
25-
override: true
25+
components: clippy
26+
targets: stable-i686-pc-windows-msvc
27+
28+
- name: Rust cache
29+
uses: swatinem/rust-cache@v2
30+
2631
- name: cargo build
27-
uses: actions-rs/cargo@v1
28-
with:
29-
command: build
30-
args: --target i686-pc-windows-msvc
32+
run: cargo build --target stable-i686-pc-windows-msvc

0 commit comments

Comments
 (0)