Skip to content

Commit 122ecad

Browse files
authored
Merge pull request #244 from mulimoen/feature/update-ci
Switch GitHub CI to dtolnay/rust-toolchain
2 parents 0276592 + d1864c7 commit 122ecad

File tree

1 file changed

+53
-51
lines changed

1 file changed

+53
-51
lines changed

.github/workflows/ci.yml

Lines changed: 53 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,28 @@ jobs:
2525
- {command: clippy, rust: stable}
2626
steps:
2727
- name: Checkout repository
28-
uses: actions/checkout@v2
28+
uses: actions/checkout@v3
2929
- name: Install Rust (${{matrix.rust}})
30-
uses: actions-rs/toolchain@v1
31-
with: {profile: minimal, toolchain: '${{matrix.rust}}', override: true, components: 'rustfmt, clippy'}
30+
uses: dtolnay/rust-toolchain@stable
31+
with: {toolchain: '${{matrix.rust}}', components: 'rustfmt, clippy'}
3232
- name: Install HDF5
3333
run: sudo apt-get install libhdf5-dev
3434
- name: Run cargo ${{matrix.command}}
35-
uses: actions-rs/cargo@v1
36-
with:
37-
command: ${{matrix.command}}
38-
args: "${{matrix.command == 'fmt' && '--all -- --check' || '--workspace --exclude hdf5-src -- -D warnings -D clippy::cargo -A clippy::multiple-crate-versions'}}"
35+
run: cargo ${{matrix.command}} ${{matrix.command == 'fmt' && '--all -- --check' || '--workspace --exclude hdf5-src -- -D warnings -D clippy::cargo -A clippy::multiple-crate-versions'}}
3936

4037
doc: # This task should mirror the procedure on docs.rs
4138
runs-on: ubuntu-latest
4239
steps:
4340
- name: Checkout repository
44-
uses: actions/checkout@v2
41+
uses: actions/checkout@v3
4542
with: {submodules: true}
4643
- name: Install Rust (${{matrix.rust}})
47-
uses: actions-rs/toolchain@v1
48-
with: {toolchain: nightly, profile: minimal, override: true}
44+
uses: dtolnay/rust-toolchain@stable
45+
with: {toolchain: nightly}
4946
- name: Document workspace
50-
run: env RUSTDOCFLAGS="--cfg docsrs" cargo doc --features hdf5-sys/static,hdf5-sys/zlib,blosc,lzf
47+
env:
48+
RUSTDOCFLAGS: "--cfg docsrs"
49+
run: cargo doc --features hdf5-sys/static,hdf5-sys/zlib,blosc,lzf
5150

5251
brew:
5352
name: brew
@@ -62,11 +61,11 @@ jobs:
6261
- {version: hdf5-mpi, mpi: true}
6362
steps:
6463
- name: Checkout repository
65-
uses: actions/checkout@v2
64+
uses: actions/checkout@v3
6665
with: {submodules: true}
6766
- name: Install Rust (${{matrix.rust}})
68-
uses: actions-rs/toolchain@v1
69-
with: {toolchain: stable, profile: minimal, override: true}
67+
uses: dtolnay/rust-toolchain@stable
68+
with: {toolchain: stable}
7069
- name: Install HDF5 (${{matrix.version}})
7170
run: brew install ${{matrix.version}}
7271
- name: Build and test all crates
@@ -107,11 +106,11 @@ jobs:
107106
shell: bash -l {0}
108107
steps:
109108
- name: Checkout repository
110-
uses: actions/checkout@v2
109+
uses: actions/checkout@v3
111110
with: {submodules: true}
112111
- name: Install Rust (${{matrix.rust}})
113-
uses: actions-rs/toolchain@v1
114-
with: {toolchain: '${{matrix.rust}}', profile: minimal, override: true}
112+
uses: dtolnay/rust-toolchain@stable
113+
with: {toolchain: '${{matrix.rust}}'}
115114
- name: Install conda
116115
uses: conda-incubator/setup-miniconda@v2
117116
with: {auto-update-conda: false, activate-environment: testenv}
@@ -141,11 +140,11 @@ jobs:
141140
- {os: macos, rust: stable}
142141
steps:
143142
- name: Checkout repository
144-
uses: actions/checkout@v2
143+
uses: actions/checkout@v3
145144
with: {submodules: true}
146145
- name: Install Rust (${{matrix.rust}})
147-
uses: actions-rs/toolchain@v1
148-
with: {toolchain: '${{matrix.rust}}', profile: minimal, override: true}
146+
uses: dtolnay/rust-toolchain@stable
147+
with: {toolchain: '${{matrix.rust}}'}
149148
- name: Build and test all crates
150149
run: cargo test --workspace -v --features hdf5-sys/static,hdf5-sys/zlib --exclude hdf5-derive
151150
- name: Build and test with filters
@@ -168,11 +167,11 @@ jobs:
168167
- {mpi: openmpi, rust: stable}
169168
steps:
170169
- name: Checkout repository
171-
uses: actions/checkout@v2
170+
uses: actions/checkout@v3
172171
with: {submodules: true}
173172
- name: Install Rust (${{matrix.rust}})
174-
uses: actions-rs/toolchain@v1
175-
with: {toolchain: '${{matrix.rust}}', profile: minimal, override: true}
173+
uses: dtolnay/rust-toolchain@stable
174+
with: {toolchain: '${{matrix.rust}}'}
176175
- name: Install HDF5 (${{matrix.mpi}})
177176
run: |
178177
[ "${{matrix.mpi}}" == "mpich" ] && PACKAGES="libhdf5-mpich-dev mpich"
@@ -200,11 +199,11 @@ jobs:
200199
version: ["1.8", "1.10", "1.12", "1.14"]
201200
steps:
202201
- name: Checkout repository
203-
uses: actions/checkout@v2
202+
uses: actions/checkout@v3
204203
with: {submodules: true}
205204
- name: Install Rust (${{matrix.rust}})
206-
uses: actions-rs/toolchain@v1
207-
with: {toolchain: '${{matrix.rust}}', profile: minimal, override: true}
205+
uses: dtolnay/rust-toolchain@stable
206+
with: {toolchain: '${{matrix.rust}}'}
208207
- name: Configure environment
209208
shell: bash
210209
run: |
@@ -246,11 +245,11 @@ jobs:
246245
rust: [stable]
247246
steps:
248247
- name: Checkout repository
249-
uses: actions/checkout@v2
248+
uses: actions/checkout@v3
250249
with: {submodules: true}
251250
- name: Install Rust (${{matrix.rust}})
252-
uses: actions-rs/toolchain@v1
253-
with: {toolchain: '${{matrix.rust}}', target: x86_64-pc-windows-gnu, profile: minimal, override: true}
251+
uses: dtolnay/rust-toolchain@stable
252+
with: {toolchain: '${{matrix.rust}}', targets: x86_64-pc-windows-gnu}
254253
- name: Install HDF5
255254
shell: pwsh
256255
run: |
@@ -270,40 +269,43 @@ jobs:
270269
fail-fast: false
271270
steps:
272271
- name: Checkout repository
273-
uses: actions/checkout@v2
272+
uses: actions/checkout@v3
274273
with: {submodules: true}
275274
- name: Install Rust
276-
uses: actions-rs/toolchain@v1
277-
with: {toolchain: 1.64, profile: minimal, override: true}
275+
uses: dtolnay/rust-toolchain@stable
276+
with: {toolchain: 1.64}
278277
- name: Build and test all crates
279278
run:
280279
cargo test --workspace -vv --features=hdf5-sys/static --exclude=hdf5-derive
281280

282-
# # TODO: temporarily disabled until fixed (see https://github.com/aldanor/hdf5-rust/issues/241)
283-
# wine:
284-
# name: wine
285-
# runs-on: ubuntu-latest
286-
# steps:
287-
# - name: Checkout repository
288-
# uses: actions/checkout@v2
289-
# with: {submodules: true}
290-
# - name: Install Rust
291-
# uses: actions-rs/toolchain@v1
292-
# with: {toolchain: stable, target: x86_64-pc-windows-gnu, profile: minimal, override: true}
293-
# - name: Install dependencies
294-
# run: sudo apt-get update && sudo apt install wine64 mingw-w64
295-
# - name: Build and test
296-
# run: env CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUNNER=wine64 cargo test --features hdf5-sys/static --target x86_64-pc-windows-gnu -- --skip test_compile_fail
297-
281+
wine:
282+
name: wine
283+
runs-on: ubuntu-latest
284+
steps:
285+
- name: Checkout repository
286+
uses: actions/checkout@v3
287+
with: {submodules: true}
288+
- name: Install Rust
289+
uses: dtolnay/rust-toolchain@stable
290+
with: {toolchain: stable, targets: x86_64-pc-windows-gnu}
291+
- name: Install dependencies
292+
run: sudo apt-get update && sudo apt install wine64 mingw-w64
293+
- name: Build and test
294+
env:
295+
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUNNER: wine64
296+
run: cargo test --features hdf5-sys/static --target x86_64-pc-windows-gnu -- --skip test_compile_fail
297+
298298
addr_san:
299299
name: Address sanitizer
300300
runs-on: ubuntu-latest
301301
steps:
302302
- name: Checkout repository
303-
uses: actions/checkout@v2
303+
uses: actions/checkout@v3
304304
with: {submodules: true}
305305
- name: Install Rust
306-
uses: actions-rs/toolchain@v1
306+
uses: dtolnay/rust-toolchain@stable
307307
with: {toolchain: nightly, profile: minimal, override: true}
308308
- name: Run test with sanitizer
309-
run: env RUSTFLAGS="-Z sanitizer=address" cargo test --features hdf5-sys/static --target x86_64-unknown-linux-gnu --workspace --exclude hdf5-derive
309+
env:
310+
RUSTFLAGS: "-Z sanitizer=address"
311+
run: cargo test --features hdf5-sys/static --target x86_64-unknown-linux-gnu --workspace --exclude hdf5-derive

0 commit comments

Comments
 (0)