Skip to content

Commit 523c37d

Browse files
authored
CI: update to newer actions (#92)
Actions: * actions-rs/toolchain -> dtolnay/rust-toolchain * checkout@v2 -> @v4 * wasmerio/setup-wasmer@v1 -> @v3.1 Other: * clippy on macOS ARM64 as well * test on macOS ARM64 with prefetch
1 parent aa5d095 commit 523c37d

File tree

2 files changed

+71
-85
lines changed

2 files changed

+71
-85
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
runs-on: ${{ matrix.os }}
1818
strategy:
1919
matrix:
20-
os: [ubuntu-latest, macos-13, macos-latest, windows-latest]
20+
os: [ubuntu-latest, macos-13, macos-latest, windows-latest] # macos-13 for last x86_64 macOS
2121
toolchain: ["1.38.0", stable, beta, nightly]
2222
features:
2323
[
2424
"",
25-
"--features std",
2625
"--features public_imp",
27-
"--features std,public_imp",
26+
"--features std,public_imp,aarch64_neon",
27+
"--features std,public_imp,aarch64_neon,aarch64_neon_prefetch",
2828
]
2929
rustflags:
3030
[
@@ -38,16 +38,20 @@ jobs:
3838
- os: macos-latest
3939
rustflags: "-D warnings -C target-feature=+sse4.2"
4040
- os: macos-latest
41+
toolchain: "1.38.0" # macOS ARM64 is not supported by 1.38.0
42+
- os: macos-13 # macos-12 (or later) does not work with 1.38.0
4143
toolchain: "1.38.0"
42-
- os: macos-13
43-
toolchain: "1.38.0"
44+
- features: "--features std,public_imp,aarch64_neon,aarch64_neon_prefetch"
45+
include:
46+
- os: macos-latest # aarch64_neon_prefetch is only supported on macOS ARM64 nightly
47+
features: "--features std,public_imp,aarch64_neon,aarch64_neon_prefetch"
48+
toolchain: "nightly"
49+
rustflags: "-D warnings"
4450
steps:
45-
- uses: actions/checkout@v2
46-
- uses: actions-rs/toolchain@v1
51+
- uses: actions/checkout@v4
52+
- uses: dtolnay/rust-toolchain@master
4753
with:
4854
toolchain: ${{ matrix.toolchain }}
49-
profile: minimal
50-
override: true
5155
- name: Run tests
5256
run: cargo test --no-default-features ${{ matrix.features }} --all-targets --verbose
5357
env:
@@ -62,19 +66,15 @@ jobs:
6266
run:
6367
working-directory: inlining
6468
steps:
65-
- uses: actions/checkout@v2
66-
- uses: actions-rs/toolchain@v1
69+
- uses: actions/checkout@v4
70+
- uses: dtolnay/rust-toolchain@master
6771
with:
6872
toolchain: stable
69-
profile: minimal
70-
override: true
7173
- name: Install cargo-asm
7274
run: cargo install cargo-asm
73-
- uses: actions-rs/toolchain@v1
75+
- uses: dtolnay/rust-toolchain@master
7476
with:
7577
toolchain: ${{ matrix.toolchain }}
76-
profile: minimal
77-
override: true
7878
- name: Set default toolchain
7979
run: rustup default ${{ matrix.toolchain }}
8080
- name: Check if the expected fns are inlined
@@ -95,13 +95,11 @@ jobs:
9595
run:
9696
working-directory: inlining
9797
steps:
98-
- uses: actions/checkout@v2
99-
- uses: actions-rs/toolchain@v1
98+
- uses: actions/checkout@v4
99+
- uses: dtolnay/rust-toolchain@master
100100
with:
101101
toolchain: ${{ matrix.toolchain }}
102-
profile: minimal
103-
target: ${{ matrix.target }}
104-
override: true
102+
targets: ${{ matrix.target }}
105103
- name: Install cargo-asm
106104
run: cargo install cargo-asm
107105
- name: Check if the expected fns are inlined
@@ -114,12 +112,8 @@ jobs:
114112
test-doc:
115113
runs-on: ubuntu-latest
116114
steps:
117-
- uses: actions/checkout@v2
118-
- uses: actions-rs/toolchain@v1
119-
with:
120-
toolchain: nightly
121-
profile: minimal
122-
override: true
115+
- uses: actions/checkout@v4
116+
- uses: dtolnay/rust-toolchain@nightly
123117
- name: Run cargo doc
124118
run: cargo doc --features public_imp
125119
env:
@@ -133,13 +127,11 @@ jobs:
133127
target: [arm-unknown-linux-gnueabi, aarch64-unknown-linux-gnu]
134128
features: ["--features std", ""]
135129
steps:
136-
- uses: actions/checkout@v2
137-
- uses: actions-rs/toolchain@v1
130+
- uses: actions/checkout@v4
131+
- uses: dtolnay/rust-toolchain@master
138132
with:
139133
toolchain: ${{ matrix.toolchain }}
140-
target: ${{ matrix.target }}
141-
profile: minimal
142-
override: true
134+
targets: ${{ matrix.target }}
143135
- name: Build
144136
run: cargo build --no-default-features --target ${{ matrix.target }} ${{ matrix.features }} --verbose
145137

@@ -151,13 +143,11 @@ jobs:
151143
target: [aarch64-unknown-linux-gnu, aarch64-apple-darwin]
152144
features: ["--features std,aarch64_neon", "--features aarch64_neon"]
153145
steps:
154-
- uses: actions/checkout@v2
155-
- uses: actions-rs/toolchain@v1
146+
- uses: actions/checkout@v4
147+
- uses: dtolnay/rust-toolchain@master
156148
with:
157149
toolchain: ${{ matrix.toolchain }}
158-
target: ${{ matrix.target }}
159-
profile: minimal
160-
override: true
150+
targets: ${{ matrix.target }}
161151
- name: Build
162152
run: cargo build --no-default-features --target ${{ matrix.target }} ${{ matrix.features }} --verbose
163153

@@ -187,13 +177,11 @@ jobs:
187177
- os: windows-latest
188178
target: i686-unknown-linux-gnu
189179
steps:
190-
- uses: actions/checkout@v2
191-
- uses: actions-rs/toolchain@v1
180+
- uses: actions/checkout@v4
181+
- uses: dtolnay/rust-toolchain@master
192182
with:
193183
toolchain: ${{ matrix.toolchain }}
194-
target: ${{ matrix.target }}
195-
profile: minimal
196-
override: true
184+
targets: ${{ matrix.target }}
197185
- name: Run tests
198186
run: cargo build --no-default-features ${{ matrix.features }} --target ${{ matrix.target }} --verbose
199187
env:
@@ -202,31 +190,24 @@ jobs:
202190
fmt_check:
203191
runs-on: ubuntu-latest
204192
steps:
205-
- uses: actions/checkout@v1
206-
- uses: actions-rs/toolchain@v1
193+
- uses: actions/checkout@v4
194+
- uses: dtolnay/rust-toolchain@stable
207195
with:
208-
toolchain: stable
209-
profile: minimal
210196
components: rustfmt
211-
override: true
212-
- name: Checko formatting
197+
- name: Check formatting
213198
run: cargo fmt -- --check
214199

215200
clippy_check:
216-
runs-on: ubuntu-latest
201+
runs-on: ${{ matrix.os }}
202+
strategy:
203+
matrix:
204+
os: [ubuntu-latest, macos-latest]
217205
steps:
218-
- uses: actions/checkout@v1
219-
- uses: actions-rs/toolchain@v1
206+
- uses: actions/checkout@v4
207+
- uses: dtolnay/rust-toolchain@nightly
220208
with:
221-
toolchain: nightly
222-
profile: minimal
223209
components: clippy
224-
override: true
225-
- uses: actions-rs/clippy-check@v1
226-
with:
227-
token: ${{ secrets.GITHUB_TOKEN }}
228-
args: --all-targets --all-features
229-
- uses: actions-rs/clippy-check@v1
230-
with:
231-
token: ${{ secrets.GITHUB_TOKEN }}
232-
args: --no-default-features
210+
- name: Clippy - all features enabled
211+
run: cargo clippy --all-targets --all-features
212+
- name: Clippy - all features disabled
213+
run: cargo clippy --all-targets --no-default-features

.github/workflows/wasm.yml

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: ci-wasm
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88
schedule:
99
- cron: "17 3 * * *"
1010

@@ -19,19 +19,23 @@ jobs:
1919
matrix:
2020
os: [ubuntu-latest]
2121
toolchain: [stable, beta, nightly]
22-
features: ["", "--features std", "--features public_imp", "--features std,public_imp"]
22+
features:
23+
[
24+
"",
25+
"--features std",
26+
"--features public_imp",
27+
"--features std,public_imp",
28+
]
2329
rustflags: ["-D warnings", "-D warnings -C target-feature=+simd128"]
2430
target: [wasm32-wasi]
2531
steps:
26-
- uses: actions/checkout@v2
27-
- uses: actions-rs/toolchain@v1
32+
- uses: actions/checkout@v4
33+
- uses: dtolnay/rust-toolchain@master
2834
with:
29-
toolchain: ${{ matrix.toolchain }}
30-
target: ${{ matrix.target }}
31-
profile: minimal
32-
override: true
35+
toolchain: ${{ matrix.toolchain }}
36+
targets: ${{ matrix.target }}
3337
- name: Setup Wasmer
34-
uses: wasmerio/setup-wasmer@v1
38+
uses: wasmerio/setup-wasmer@v3.1
3539
- name: Install WASM Runner
3640
run: cargo install wasm-runner
3741
- name: Run tests
@@ -50,13 +54,10 @@ jobs:
5054
run:
5155
working-directory: inlining
5256
steps:
53-
- uses: actions/checkout@v2
54-
- uses: actions-rs/toolchain@v1
57+
- uses: actions/checkout@v4
58+
- uses: dtolnay/rust-toolchain@nightly
5559
with:
56-
toolchain: nightly
57-
profile: minimal
58-
target: ${{ matrix.target }}
59-
override: true
60+
targets: ${{ matrix.target }}
6061
- name: Install cargo-asm
6162
run: cargo install cargo-asm
6263
- name: Check if the expected fns are inlined
@@ -71,17 +72,21 @@ jobs:
7172
strategy:
7273
matrix:
7374
toolchain: ["1.38.0", stable, beta, nightly]
74-
features: ["", "--features std", "--features public_imp", "--features std,public_imp"]
75+
features:
76+
[
77+
"",
78+
"--features std",
79+
"--features public_imp",
80+
"--features std,public_imp",
81+
]
7582
rustflags: ["-D warnings", "-D warnings -C target-feature=+simd128"]
7683
target: [wasm32-unknown-unknown]
7784
steps:
78-
- uses: actions/checkout@v2
79-
- uses: actions-rs/toolchain@v1
85+
- uses: actions/checkout@v4
86+
- uses: dtolnay/rust-toolchain@master
8087
with:
81-
toolchain: ${{ matrix.toolchain }}
82-
target: ${{ matrix.target }}
83-
profile: minimal
84-
override: true
88+
toolchain: ${{ matrix.toolchain }}
89+
targets: ${{ matrix.target }}
8590
- name: Run build
8691
run: cargo build --no-default-features ${{ matrix.features }} --target ${{ matrix.target }} --verbose
8792
env:

0 commit comments

Comments
 (0)