-
Notifications
You must be signed in to change notification settings - Fork 15
86 lines (73 loc) · 2.03 KB
/
ci.yml
File metadata and controls
86 lines (73 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Unit Tests
# See, scorecard.dev (Token Permission)
# https://github.com/ossf/scorecard/blob/a16e0f9eb245274f08512e33dc7afa78d21c460c/docs/checks.md#token-permissions
permissions: read-all
concurrency:
group: ${{ github.workflow }}#${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'main' }}
on:
workflow_dispatch:
push:
branches:
- master
- main
- v2.x
pull_request:
branches:
- master
- main
- v2.x
paths-ignore:
- '**.md'
- '**.rst'
- 'doc/**'
env:
HOMEBREW_NO_AUTO_UPDATE: 1 # for reproducibility, dont autoupdate
BUILD_TYPE: RelWithDebInfo
INSTALL_DIR: install
jobs:
# Job testing in Windows
# ======================
Windows:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ "windows-2022", "windows-2025"]
cxxstd: ["14", "17", "20"]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: mamba-org/setup-micromamba@v2
with:
environment-file: .github/mamba_env_cxx${{matrix.cxxstd}}.yaml
environment-name: win-test
- name: Build
shell: bash -l {0}
run: |
if (( ${{ matrix.cxxstd }} == 17 ))
then
XTENSOR_HEADER_VERSION=2
else
# Both C++14 and C++20 use 0.26
XTENSOR_HEADER_VERSION=1
fi
CMAKE_OPTIONS=(
-DCMAKE_CXX_STANDARD=${{matrix.cxxstd}}
-DHIGHFIVE_UNIT_TESTS=ON
-DHIGHFIVE_TEST_BOOST:BOOL=ON
-DHIGHFIVE_TEST_EIGEN:BOOL=ON
-DHIGHFIVE_TEST_XTENSOR:BOOL=ON
-DHIGHFIVE_XTENSOR_HEADER_VERSION=$XTENSOR_HEADER_VERSION
)
source $GITHUB_WORKSPACE/.github/build.sh
- name: Test
working-directory: ${{github.workspace}}/build
shell: bash -l {0}
run: |
ctest -j2 --output-on-failure -C $BUILD_TYPE
- name: Test No HDF5 Diagnositics
working-directory: ${{github.workspace}}/build
shell: bash -l {0}
run: |
! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG