Skip to content

Commit

Permalink
Make ci.yml DRYer.
Browse files Browse the repository at this point in the history
We use `include:` to run all combinations of Windows, even if they
cant' exactly be described by a matrix.
  • Loading branch information
1uc committed May 26, 2023
1 parent 9c92e5a commit f796968
Showing 1 changed file with 6 additions and 36 deletions.
42 changes: 6 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,18 @@ jobs:

# Job testing in Windows
# ======================
Windows-2022:
Windows:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ "windows-2022"]
vs-toolset: [ "v141", "v143" ]
cxxstd: ["14", "17"]

include:
- os: "windows-2019"
vs-toolset: "v142"

steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -298,39 +303,4 @@ jobs:
shell: bash -l {0}
run: ctest --output-on-failure -C $BUILD_TYPE

Windows-2019:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ "windows-2019"]
vs-toolset: [ "v142" ]
cxxstd: ["14", "17"]
steps:
- uses: actions/checkout@v3
with:
submodules: true

- uses: mamba-org/provision-with-micromamba@main
with:
environment-file: doc/environment.yaml
environment-name: win-test

- name: Build
shell: bash -l {0}
run: |
CMAKE_OPTIONS=(
-T ${{matrix.vs-toolset}}
-DCMAKE_CXX_STANDARD=${{matrix.cxxstd}}
-DHIGHFIVE_UNIT_TESTS=ON
-DHIGHFIVE_USE_BOOST:BOOL=ON
-DHIGHFIVE_USE_EIGEN:BOOL=ON
-DHIGHFIVE_USE_XTENSOR:BOOL=ON
-DHIGHFIVE_TEST_SINGLE_INCLUDES=ON
)
source $GITHUB_WORKSPACE/.github/build.sh
- name: Test
working-directory: ${{github.workspace}}/build
shell: bash -l {0}
run: ctest --output-on-failure -C $BUILD_TYPE

0 comments on commit f796968

Please sign in to comment.