From 7eac91466df5d853558a94f110a6ff4368f94fe3 Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Tue, 11 May 2021 15:10:27 +0200 Subject: [PATCH 1/5] Add mingw target for static builds --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5726be15..9690486a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -169,15 +169,18 @@ jobs: strategy: fail-fast: false matrix: - rust: [stable] - version: ["1.8", "1.10", "1.12"] + include: + - {target: "x86_64-pc-windows-msvc", version: "1.8"} + - {target: "x86_64-pc-windows-msvc", version: "1.10"} + - {target: "x86_64-pc-windows-msvc", version: "1.12"} + - {target: "x86_64-pc-windows-gnu", version: "1.12"} steps: - name: Checkout repository uses: actions/checkout@v2 with: {submodules: true} - name: Install Rust (${{matrix.rust}}) uses: actions-rs/toolchain@v1 - with: {toolchain: '${{matrix.rust}}', profile: minimal, override: true} + with: {toolchain: stable, target: "${{matrix.target}}", profile: minimal, override: true} - name: Configure environment shell: bash run: | From 4d30f62f1f30db6e2f0120fd4b27b22769e6cd7e Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Tue, 11 May 2021 15:56:38 +0200 Subject: [PATCH 2/5] Test --workspace in CI --- .github/workflows/ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9690486a3..3e2260bf6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,7 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 - with: {submodules: true} + with: {submodules: false} - name: Install Rust (${{matrix.rust}}) uses: actions-rs/toolchain@v1 with: {toolchain: stable, profile: minimal, override: true} @@ -60,7 +60,7 @@ jobs: - name: Build and test all crates run: | [ "${{matrix.mpi}}" != "" ] && FEATURES=mpio - cargo test -vv --features="$FEATURES" + cargo test -vv --features="$FEATURES" --workspace --exclude hdf5-src conda: name: conda @@ -91,7 +91,7 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 - with: {submodules: true} + with: {submodules: false} - name: Install Rust (${{matrix.rust}}) uses: actions-rs/toolchain@v1 with: {toolchain: '${{matrix.rust}}', profile: minimal, override: true} @@ -109,7 +109,7 @@ jobs: [ "${{runner.os}}" != "Windows" ] && export RUSTFLAGS="-C link-args=-Wl,-rpath,$CONDA_PREFIX/lib" [ "${{matrix.mpi}}" == "mpich" ] && [ "${{runner.os}}" == "Linux" ] && export MPICH_CC=$(which gcc) [ "${{matrix.mpi}}" == "openmpi" ] && [ "${{runner.os}}" == "Linux" ] && export OMPI_CC=$(which gcc) - cargo test -vv --features="$FEATURES" + cargo test -vv --features="$FEATURES" --workspace --exclude hdf5-src static: name: static @@ -148,7 +148,7 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 - with: {submodules: true} + with: {submodules: false} - name: Install Rust (${{matrix.rust}}) uses: actions-rs/toolchain@v1 with: {toolchain: '${{matrix.rust}}', profile: minimal, override: true} @@ -161,7 +161,7 @@ jobs: - name: Build and test all crates run: | [ "${{matrix.mpi}}" != "serial" ] && FEATURES=mpio - cargo test -vv --features="$FEATURES" + cargo test -vv --features="$FEATURES" --workspace --exclude hdf5-src msi: name: msi @@ -177,7 +177,7 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 - with: {submodules: true} + with: {submodules: false} - name: Install Rust (${{matrix.rust}}) uses: actions-rs/toolchain@v1 with: {toolchain: stable, target: "${{matrix.target}}", profile: minimal, override: true} @@ -207,7 +207,7 @@ jobs: 7z x hdf5.zip -y msiexec /i ${{env.MSI_PATH}} /quiet /qn /norestart - name: Build and test all crates - run: cargo test -vv + run: cargo test --workspace -vv --exclude hdf5-src msrv: name: Minimal Supported Rust Version @@ -238,4 +238,4 @@ jobs: - name: Install dependencies run: sudo apt-get install wine64 mingw-w64 - name: Build and test - 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 + run: env CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUNNER=wine64 cargo test --workspace --features hdf5-sys/static --target x86_64-pc-windows-gnu -- --skip test_compile_fail From 5e2ab88a7cdae6383a96ac72c3905bf7d72d06fe Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Tue, 11 May 2021 18:35:48 +0200 Subject: [PATCH 3/5] Specify toolchain instead of target --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e2260bf6..13afea81a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -170,17 +170,17 @@ jobs: fail-fast: false matrix: include: - - {target: "x86_64-pc-windows-msvc", version: "1.8"} - - {target: "x86_64-pc-windows-msvc", version: "1.10"} - - {target: "x86_64-pc-windows-msvc", version: "1.12"} - - {target: "x86_64-pc-windows-gnu", version: "1.12"} + - {toolchain: "stable-msvc", version: "1.8"} + - {toolchain: "stable-msvc", version: "1.10"} + - {toolchain: "stable-msvc", version: "1.12"} + - {toolchain: "stable-gnu", version: "1.12"} steps: - name: Checkout repository uses: actions/checkout@v2 with: {submodules: false} - - name: Install Rust (${{matrix.rust}}) + - name: Install Rust (${{matrix.target}}) uses: actions-rs/toolchain@v1 - with: {toolchain: stable, target: "${{matrix.target}}", profile: minimal, override: true} + with: {toolchain: "${{matrix.toolchain}}", profile: minimal, override: true} - name: Configure environment shell: bash run: | From 0dcb25a6502da6e35c8e75a357a73f1bc5bfde6a Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Tue, 11 May 2021 22:24:17 +0200 Subject: [PATCH 4/5] Export HDF5_DIR for mingw CI --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13afea81a..f45c90e5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -206,6 +206,9 @@ jobs: C:\msys64\usr\bin\wget.exe -q -O hdf5.zip ${{env.DL_URL}} 7z x hdf5.zip -y msiexec /i ${{env.MSI_PATH}} /quiet /qn /norestart + - name: Export HDF5_DIR + if: matrix.toolchain == 'stable-gnu' + run: echo "HDF5_DIR=C:\\Program Files\\HDF_Group\\HDF5\\1.12.0" >> $GITHUB_ENV - name: Build and test all crates run: cargo test --workspace -vv --exclude hdf5-src From 185e4555909d3b73ce4c49fd4124cc035b86d95b Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Tue, 11 May 2021 22:45:49 +0200 Subject: [PATCH 5/5] Minimise CI --- .github/workflows/ci.yml | 182 --------------------------------------- 1 file changed, 182 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f45c90e5d..a2fec72c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,155 +14,6 @@ env: CARGO_TERM_COLOR: always jobs: - lint: - name: lint - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - {command: fmt, rust: nightly} - - {command: clippy, rust: stable} - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - name: Install Rust (${{matrix.rust}}) - uses: actions-rs/toolchain@v1 - with: {profile: minimal, toolchain: '${{matrix.rust}}', override: true, components: 'rustfmt, clippy'} - - name: Install HDF5 - run: sudo apt-get install libhdf5-dev - - name: Run cargo ${{matrix.command}} - uses: actions-rs/cargo@v1 - with: - command: ${{matrix.command}} - args: "${{matrix.command == 'fmt' && '--all -- --check' || '-- -D warnings'}}" - - brew: - name: brew - runs-on: macos-latest - strategy: - fail-fast: false - matrix: - include: - - {version: hdf5@1.8} - - {version: hdf5@1.10} - - {version: hdf5@1.12} - - {version: hdf5-mpi, mpi: true} - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: {submodules: false} - - name: Install Rust (${{matrix.rust}}) - uses: actions-rs/toolchain@v1 - with: {toolchain: stable, profile: minimal, override: true} - - name: Install HDF5 (${{matrix.version}}) - run: brew install ${{matrix.version}} - - name: Build and test all crates - run: | - [ "${{matrix.mpi}}" != "" ] && FEATURES=mpio - cargo test -vv --features="$FEATURES" --workspace --exclude hdf5-src - - conda: - name: conda - runs-on: ${{matrix.os}}-latest - strategy: - fail-fast: false - matrix: - include: - - {os: ubuntu, version: 1.8.16, channel: conda-forge, rust: stable} - - {os: windows, version: 1.8.17, channel: conda-forge, rust: stable} - - {os: macos, version: 1.8.18, channel: anaconda, rust: stable} - - {os: ubuntu, version: 1.8.20, channel: anaconda, rust: beta} - - {os: ubuntu, version: 1.10.1, channel: anaconda, rust: nightly} - - {os: windows, version: 1.10.2, channel: anaconda, rust: beta} - - {os: ubuntu, version: 1.10.3, channel: conda-forge, rust: nightly} - - {os: windows, version: 1.10.4, channel: anaconda, rust: nightly} - - {os: ubuntu, version: 1.10.4, mpi: openmpi, channel: conda-forge, rust: stable} - - {os: ubuntu, version: 1.10.5, channel: conda-forge, rust: beta} - - {os: macos, version: 1.10.5, mpi: openmpi, channel: conda-forge, rust: beta} - - {os: ubuntu, version: 1.10.6, channel: anaconda, rust: stable} - - {os: ubuntu, version: 1.10.6, mpi: mpich, channel: conda-forge, rust: nightly} - - {os: ubuntu, version: 1.12.0, mpi: openmpi, channel: conda-forge, rust: stable} - - {os: macos, version: 1.12.0, channel: conda-forge, rust: stable} - - {os: windows, version: 1.12.0, channel: conda-forge, rust: stable} - defaults: - run: - shell: bash -l {0} - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: {submodules: false} - - name: Install Rust (${{matrix.rust}}) - uses: actions-rs/toolchain@v1 - with: {toolchain: '${{matrix.rust}}', profile: minimal, override: true} - - name: Install conda - uses: conda-incubator/setup-miniconda@v2 - with: {auto-update-conda: false, activate-environment: testenv} - - name: Install HDF5 (${{matrix.version}}${{matrix.mpi && '-' || ''}}${{matrix.mpi}}) - run: | - [ "${{matrix.mpi}}" != "" ] && MPICC_PKG=${{matrix.mpi}}-mpicc - conda install -y -c ${{matrix.channel}} 'hdf5=${{matrix.version}}=*${{matrix.mpi}}*' $MPICC_PKG - - name: Build and test all crates - run: | - export HDF5_DIR="$CONDA_PREFIX" - [ "${{matrix.mpi}}" != "" ] && FEATURES=mpio - [ "${{runner.os}}" != "Windows" ] && export RUSTFLAGS="-C link-args=-Wl,-rpath,$CONDA_PREFIX/lib" - [ "${{matrix.mpi}}" == "mpich" ] && [ "${{runner.os}}" == "Linux" ] && export MPICH_CC=$(which gcc) - [ "${{matrix.mpi}}" == "openmpi" ] && [ "${{runner.os}}" == "Linux" ] && export OMPI_CC=$(which gcc) - cargo test -vv --features="$FEATURES" --workspace --exclude hdf5-src - - static: - name: static - runs-on: ${{matrix.os}}-latest - strategy: - fail-fast: false - matrix: - include: - - {os: ubuntu, rust: stable} - - {os: windows, rust: stable-msvc} - - {os: windows, rust: stable-gnu} - - {os: macos, rust: stable} - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: {submodules: true} - - name: Change to older toolchain - if: matrix.os == 'macos' - run: sudo xcode-select -s "/Applications/Xcode_11.7.app" - - name: Install Rust (${{matrix.rust}}) - uses: actions-rs/toolchain@v1 - with: {toolchain: '${{matrix.rust}}', profile: minimal, override: true} - - name: Build and test all crates - run: cargo test --workspace -v --features hdf5-sys/static,hdf5-sys/zlib --exclude hdf5-derive - - apt: - name: apt - runs-on: ubuntu-${{matrix.ubuntu}} - strategy: - fail-fast: false - matrix: - include: - - {ubuntu: 16.04, mpi: serial, rust: nightly} - - {ubuntu: 18.04, mpi: mpich, rust: beta} - - {ubuntu: 20.04, mpi: openmpi, rust: stable} - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: {submodules: false} - - name: Install Rust (${{matrix.rust}}) - uses: actions-rs/toolchain@v1 - with: {toolchain: '${{matrix.rust}}', profile: minimal, override: true} - - name: Install HDF5 (${{matrix.mpi}}) - run: | - [ "${{matrix.mpi}}" == "mpich" ] && PACKAGES="libhdf5-mpich-dev mpich" - [ "${{matrix.mpi}}" == "openmpi" ] && PACKAGES="libhdf5-openmpi-dev openmpi-bin" - [ "${{matrix.mpi}}" == "serial" ] && PACKAGES="libhdf5-dev" - sudo apt-get install $PACKAGES - - name: Build and test all crates - run: | - [ "${{matrix.mpi}}" != "serial" ] && FEATURES=mpio - cargo test -vv --features="$FEATURES" --workspace --exclude hdf5-src - msi: name: msi runs-on: windows-latest @@ -170,8 +21,6 @@ jobs: fail-fast: false matrix: include: - - {toolchain: "stable-msvc", version: "1.8"} - - {toolchain: "stable-msvc", version: "1.10"} - {toolchain: "stable-msvc", version: "1.12"} - {toolchain: "stable-gnu", version: "1.12"} steps: @@ -211,34 +60,3 @@ jobs: run: echo "HDF5_DIR=C:\\Program Files\\HDF_Group\\HDF5\\1.12.0" >> $GITHUB_ENV - name: Build and test all crates run: cargo test --workspace -vv --exclude hdf5-src - - msrv: - name: Minimal Supported Rust Version - runs-on: ubuntu-18.04 - strategy: - fail-fast: false - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: {submodules: true} - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: {toolchain: 1.51, profile: minimal, override: true} - - name: Build and test all crates - run: - cargo test --workspace -vv --features=hdf5-sys/static --exclude=hdf5-derive - - wine: - name: wine - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: {submodules: true} - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: {toolchain: stable, target: x86_64-pc-windows-gnu, profile: minimal, override: true} - - name: Install dependencies - run: sudo apt-get install wine64 mingw-w64 - - name: Build and test - run: env CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUNNER=wine64 cargo test --workspace --features hdf5-sys/static --target x86_64-pc-windows-gnu -- --skip test_compile_fail