1414 CARGO_TERM_COLOR : always
1515
1616jobs :
17- lint :
18- name : lint
19- runs-on : ubuntu-latest
20- strategy :
21- fail-fast : false
22- matrix :
23- include :
24- - {command: fmt, rust: nightly}
25- - {command: clippy, rust: stable}
26- steps :
27- - name : Checkout repository
28- uses : actions/checkout@v2
29- - name : Install Rust (${{matrix.rust}})
30- uses : actions-rs/toolchain@v1
31- with : {profile: minimal, toolchain: '${{matrix.rust}}', override: true, components: 'rustfmt, clippy'}
32- - name : Install HDF5
33- run : sudo apt-get install libhdf5-dev
34- - 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'}}"
39-
40- doc : # This task should mirror the procedure on docs.rs
41- runs-on : ubuntu-latest
42- steps :
43- - name : Checkout repository
44- uses : actions/checkout@v2
45- with : {submodules: true}
46- - name : Install Rust (${{matrix.rust}})
47- uses : actions-rs/toolchain@v1
48- with : {toolchain: nightly, profile: minimal, override: true}
49- - name : Document workspace
50- run : env RUSTDOCFLAGS="--cfg docsrs" cargo doc --features hdf5-sys/static,hdf5-sys/zlib,blosc,lzf
51-
52- brew :
53- name : brew
54- runs-on : macos-latest
55- strategy :
56- fail-fast : false
57- matrix :
58- include :
59- 60- 61- 62- - {version: hdf5-mpi, mpi: true}
63- steps :
64- - name : Checkout repository
65- uses : actions/checkout@v2
66- with : {submodules: true}
67- - name : Install Rust (${{matrix.rust}})
68- uses : actions-rs/toolchain@v1
69- with : {toolchain: stable, profile: minimal, override: true}
70- - name : Install HDF5 (${{matrix.version}})
71- run : brew install ${{matrix.version}}
72- - name : Build and test all crates
73- run : |
74- [ "${{matrix.mpi}}" != "" ] && FEATURES=mpio
75- cargo test -vv --features="$FEATURES"
76-
77- conda :
78- name : conda
79- runs-on : ${{matrix.os}}-latest
80- strategy :
81- fail-fast : false
82- matrix :
83- include :
84- - {os: ubuntu, version: 1.8.16, channel: conda-forge, rust: stable}
85- - {os: windows, version: 1.8.17, channel: conda-forge, rust: stable}
86- - {os: macos, version: 1.8.18, channel: anaconda, rust: stable}
87- - {os: ubuntu, version: 1.8.20, channel: anaconda, rust: beta}
88- - {os: ubuntu, version: 1.10.1, channel: anaconda, rust: nightly}
89- - {os: windows, version: 1.10.2, channel: anaconda, rust: beta}
90- - {os: ubuntu, version: 1.10.3, channel: conda-forge, rust: nightly}
91- - {os: windows, version: 1.10.4, channel: anaconda, rust: nightly}
92- - {os: ubuntu, version: 1.10.4, mpi: openmpi, channel: conda-forge, rust: stable}
93- - {os: ubuntu, version: 1.10.5, channel: conda-forge, rust: beta}
94- - {os: macos, version: 1.10.5, mpi: openmpi, channel: conda-forge, rust: beta}
95- - {os: ubuntu, version: 1.10.6, channel: anaconda, rust: stable}
96- - {os: ubuntu, version: 1.10.6, mpi: mpich, channel: conda-forge, rust: nightly}
97- # - {os: ubuntu, version: 1.10.8, channel: conda-forge, rust: stable}
98- - {os: ubuntu, version: 1.12.0, mpi: openmpi, channel: conda-forge, rust: stable}
99- - {os: macos, version: 1.12.0, channel: conda-forge, rust: stable}
100- - {os: windows, version: 1.12.0, channel: conda-forge, rust: stable}
101- - {os: ubuntu, version: 1.12.1, channel: conda-forge, rust: stable}
102- defaults :
103- run :
104- shell : bash -l {0}
105- steps :
106- - name : Checkout repository
107- uses : actions/checkout@v2
108- with : {submodules: true}
109- - name : Install Rust (${{matrix.rust}})
110- uses : actions-rs/toolchain@v1
111- with : {toolchain: '${{matrix.rust}}', profile: minimal, override: true}
112- - name : Install conda
113- uses : conda-incubator/setup-miniconda@v2
114- with : {auto-update-conda: false, activate-environment: testenv}
115- - name : Install HDF5 (${{matrix.version}}${{matrix.mpi && '-' || ''}}${{matrix.mpi}})
116- run : |
117- [ "${{matrix.mpi}}" != "" ] && MPICC_PKG=${{matrix.mpi}}-mpicc
118- conda install -y -c ${{matrix.channel}} 'hdf5=${{matrix.version}}=*${{matrix.mpi}}*' $MPICC_PKG
119- - name : Build and test all crates
120- run : |
121- export HDF5_DIR="$CONDA_PREFIX"
122- [ "${{matrix.mpi}}" != "" ] && FEATURES=mpio
123- [ "${{runner.os}}" != "Windows" ] && export RUSTFLAGS="-C link-args=-Wl,-rpath,$CONDA_PREFIX/lib"
124- [ "${{matrix.mpi}}" == "mpich" ] && [ "${{runner.os}}" == "Linux" ] && export MPICH_CC=$(which gcc)
125- [ "${{matrix.mpi}}" == "openmpi" ] && [ "${{runner.os}}" == "Linux" ] && export OMPI_CC=$(which gcc)
126- cargo test -vv --features="$FEATURES"
127-
128- static :
129- name : static
130- runs-on : ${{matrix.os}}-latest
131- strategy :
132- fail-fast : false
133- matrix :
134- include :
135- - {os: ubuntu, rust: stable}
136- - {os: windows, rust: stable-msvc}
137- - {os: windows, rust: stable-gnu}
138- - {os: macos, rust: stable}
139- steps :
140- - name : Checkout repository
141- uses : actions/checkout@v2
142- with : {submodules: true}
143- - name : Install Rust (${{matrix.rust}})
144- uses : actions-rs/toolchain@v1
145- with : {toolchain: '${{matrix.rust}}', profile: minimal, override: true}
146- - name : Build and test all crates
147- run : cargo test --workspace -v --features hdf5-sys/static,hdf5-sys/zlib --exclude hdf5-derive
148- - name : Build and test with filters
149- run : cargo test --workspace -v --features hdf5-sys/static,hdf5-sys/zlib,lzf,blosc --exclude hdf5-derive
150- if : matrix.rust != 'stable-gnu'
151- - name : Run examples
152- run : |
153- cargo r --example simple --features hdf5-sys/static,hdf5-sys/zlib,lzf,blosc
154- cargo r --example chunking --features hdf5-sys/static,hdf5-sys/zlib,lzf,blosc
155- if : matrix.rust != 'stable-gnu'
156-
157- apt :
158- name : apt
159- runs-on : ubuntu-${{matrix.ubuntu}}
160- strategy :
161- fail-fast : false
162- matrix :
163- include :
164- - {ubuntu: 18.04, mpi: mpich, rust: beta}
165- - {ubuntu: 20.04, mpi: openmpi, rust: stable}
166- steps :
167- - name : Checkout repository
168- uses : actions/checkout@v2
169- with : {submodules: true}
170- - name : Install Rust (${{matrix.rust}})
171- uses : actions-rs/toolchain@v1
172- with : {toolchain: '${{matrix.rust}}', profile: minimal, override: true}
173- - name : Install HDF5 (${{matrix.mpi}})
174- run : |
175- [ "${{matrix.mpi}}" == "mpich" ] && PACKAGES="libhdf5-mpich-dev mpich"
176- [ "${{matrix.mpi}}" == "openmpi" ] && PACKAGES="libhdf5-openmpi-dev openmpi-bin"
177- [ "${{matrix.mpi}}" == "serial" ] && PACKAGES="libhdf5-dev"
178- sudo apt-get install $PACKAGES
179- - name : Build and test all crates
180- run : |
181- [ "${{matrix.mpi}}" != "serial" ] && FEATURES=mpio
182- cargo test -vv --features="$FEATURES"
183- - name : Test crate for locking on synchronisation
184- run : |
185- [ "${{matrix.mpi}}" != "serial" ] && FEATURES=mpio
186- cargo test -vv --features="$FEATURES" -- lock_part
187- cargo test -vv --features="$FEATURES" -- lock_part
188- cargo test -vv --features="$FEATURES" -- lock_part
189-
190- msi :
191- name : msi
192- runs-on : windows-latest
193- strategy :
194- fail-fast : false
195- matrix :
196- rust : [stable]
197- version : ["1.8", "1.10", "1.12", "1.13"]
198- steps :
199- - name : Checkout repository
200- uses : actions/checkout@v2
201- with : {submodules: true}
202- - name : Install Rust (${{matrix.rust}})
203- uses : actions-rs/toolchain@v1
204- with : {toolchain: '${{matrix.rust}}', profile: minimal, override: true}
205- - name : Configure environment
206- shell : bash
207- run : |
208- if [[ "${{matrix.version}}" == "1.8" ]]; then
209- VERSION=1.8.21
210- DL_PATH=hdf5-1.8.21-Std-win7_64-vs14.zip
211- echo "MSI_PATH=hdf\\HDF5-1.8.21-win64.msi" >> $GITHUB_ENV
212- elif [[ "${{matrix.version}}" == "1.10" ]]; then
213- VERSION=1.10.0
214- DL_PATH=windows/extra/hdf5-1.10.0-win64-VS2015-shared.zip
215- echo "MSI_PATH=hdf5\\HDF5-1.10.0-win64.msi" >> $GITHUB_ENV
216- elif [[ "${{matrix.version}}" == "1.12" ]]; then
217- VERSION=1.12.0
218- DL_PATH=hdf5-1.12.0-Std-win10_64-vs16.zip
219- echo "MSI_PATH=hdf\\HDF5-1.12.0-win64.msi" >> $GITHUB_ENV
220- else
221- VERSION=1.13.0
222- DL_PATH=windows/hdf5-1.13.0-Std-win10_64-vs16.zip
223- echo "MSI_PATH=hdf\\HDF5-1.13.0-win64.msi" >> $GITHUB_ENV
224- fi
225- BASE_URL=https://support.hdfgroup.org/ftp/HDF5/prev-releases
226- echo "DL_URL=$BASE_URL/hdf5-${{matrix.version}}/hdf5-$VERSION/bin/$DL_PATH" >> $GITHUB_ENV
227- echo "C:\\Program Files\\HDF_Group\\HDF5\\$VERSION\\bin" >> $GITHUB_PATH
228- - name : Install HDF5 (${{matrix.version}})
229- shell : pwsh
230- run : |
231- C:\msys64\usr\bin\wget.exe -q -O hdf5.zip ${{env.DL_URL}}
232- 7z x hdf5.zip -y
233- msiexec /i ${{env.MSI_PATH}} /quiet /qn /norestart
234- - name : Build and test all crates
235- run : cargo test -vv
236-
23717 conda-download :
23818 name : Conda forge ${{ matrix.os }}
23919 runs-on : ${{ matrix.os }}-latest
@@ -254,47 +34,3 @@ jobs:
25434 with : {toolchain: '${{ matrix.rust }}', profile: minimal, override: true}
25535 - name : Run tests
25636 run : cargo test --features hdf5-sys/conda --workspace --exclude hdf5-derive,hdf5-src
257-
258- msrv :
259- name : Minimal Supported Rust Version
260- runs-on : ubuntu-18.04
261- strategy :
262- fail-fast : false
263- steps :
264- - name : Checkout repository
265- uses : actions/checkout@v2
266- with : {submodules: true}
267- - name : Install Rust
268- uses : actions-rs/toolchain@v1
269- with : {toolchain: 1.51, profile: minimal, override: true}
270- - name : Build and test all crates
271- run :
272- cargo test --workspace -vv --features=hdf5-sys/static --exclude=hdf5-derive
273-
274- wine :
275- name : wine
276- runs-on : ubuntu-latest
277- steps :
278- - name : Checkout repository
279- uses : actions/checkout@v2
280- with : {submodules: true}
281- - name : Install Rust
282- uses : actions-rs/toolchain@v1
283- with : {toolchain: stable, target: x86_64-pc-windows-gnu, profile: minimal, override: true}
284- - name : Install dependencies
285- run : sudo apt-get update && sudo apt install wine64 mingw-w64
286- - name : Build and test
287- 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
288-
289- addr_san :
290- name : Address sanitizer
291- runs-on : ubuntu-latest
292- steps :
293- - name : Checkout repository
294- uses : actions/checkout@v2
295- with : {submodules: true}
296- - name : Install Rust
297- uses : actions-rs/toolchain@v1
298- with : {toolchain: nightly, profile: minimal, override: true}
299- - name : Run test with sanitizer
300- run : env RUSTFLAGS="-Z sanitizer=address" cargo test --features hdf5-sys/static --target x86_64-unknown-linux-gnu --workspace --exclude hdf5-derive
0 commit comments