@@ -7,7 +7,7 @@ concurrency:
77 cancel-in-progress : true
88
99jobs :
10- build :
10+ unix :
1111 runs-on : ${{matrix.os}}
1212 strategy :
1313 fail-fast : false
4949 -DCTEST_CMAKE_GENERATOR="Unix Makefiles"
5050 -DCTEST_SITE="Github"
5151 -DCTEST_BUILD_NAME="${{matrix.os}}-${{matrix.cxx_compiler}}"
52- -DCTEST_BUILD_FLAGS="-j"
5352
5453 steps :
5554 - uses : actions/checkout@v4
7978 echo "LDFLAGS=\"-L$(brew --prefix llvm)/lib\"" >> $GITHUB_ENV
8079 echo "CPPFLAGS=\"-I$(brew --prefix llvm)/include\"" >> $GITHUB_ENV
8180
81+ - if : github.event_name == 'pull_request'
82+ run : echo "CDASH_ARGS=${CDASH_ARGS} -DCTEST_UPDATE_VERSION_OVERRIDE=${{ github.event.pull_request.head.sha }}" > "${GITHUB_ENV}"
83+
8284 - name : Run CMake
83- id : cmake
8485 run : >-
8586 ctest -VV -S .github/ctest_configure.cmake ${{ env.CDASH_ARGS }}
8687 -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
@@ -92,9 +93,100 @@ jobs:
9293 -DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")
9394 -DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
9495 - name : Build
95- id : build
9696 run : ctest -VV -S .github/ctest_build.cmake ${{ env.CDASH_ARGS }}
9797
9898 - name : Run Tests
99- id : test
10099 run : ctest -VV -S .github/ctest_test.cmake ${{ env.CDASH_ARGS }}
100+
101+ windows :
102+ runs-on : ${{matrix.os}}
103+ strategy :
104+ fail-fast : false
105+ matrix :
106+ include :
107+ - generator : Visual Studio 16 2019
108+ os : windows-2019
109+ platform : x64
110+ build_type : Release
111+
112+ - generator : Visual Studio 16 2019
113+ os : windows-2019
114+ platform : x86
115+ build_type : Release
116+
117+ - generator : Visual Studio 17 2022
118+ os : windows-2022
119+ platform : x64
120+ build_type : Release
121+
122+ - generator : Visual Studio 17 2022
123+ os : windows-2022
124+ platform : x86
125+ build_type : Release
126+
127+ - generator : MinGW Makefiles
128+ os : windows-2022
129+ platform : x64
130+ build_type : Release
131+ defaults :
132+ run :
133+ shell : bash
134+ env :
135+ CDASH_ARGS : >-
136+ -DCTEST_BINARY_DIRECTORY="${{github.workspace}}\\build"
137+ -DCTEST_BUILD_NAME="${{matrix.os}}-${{matrix.platform}}-${{matrix.generator}}"
138+ -DCTEST_CMAKE_GENERATOR="${{matrix.generator}}"
139+ -DCTEST_SITE="Github"
140+ -DCTEST_SOURCE_DIRECTORY="${{github.workspace}}"
141+ steps :
142+ - uses : actions/checkout@v4
143+ with :
144+ submodules : recursive
145+
146+ - uses : TheMrMilchmann/setup-msvc-dev@v3
147+ if : startsWith(matrix.generator, 'Visual Studio')
148+ with :
149+ arch : ${{matrix.platform}}
150+
151+ - name : Install compiler
152+ if : startsWith(matrix.generator, 'MinGW')
153+ id : install_cc
154+ uses : rlalik/setup-cpp-compiler@master
155+ with :
156+ compiler : latest
157+
158+ - name : Setup Python
159+ uses : actions/setup-python@v4
160+ with :
161+ python-version : ' 3.8'
162+ architecture : ${{matrix.platform}}
163+
164+ - name : Install zfpy dependencies
165+ run : |
166+ python -m pip install cython
167+ python -m pip install oldest-supported-numpy
168+ python -m pip install setuptools
169+
170+ - if : github.event_name == 'pull_request'
171+ run : echo "CDASH_ARGS=${CDASH_ARGS} -DCTEST_UPDATE_VERSION_OVERRIDE=${{ github.event.pull_request.head.sha }}" > "${GITHUB_ENV}"
172+
173+ - if : startsWith(matrix.generator, 'Visual Studio')
174+ run : |
175+ echo "CDASH_ARGS=${CDASH_ARGS} -DCMAKE_CXX_FLAGS:STRING=//wd4530 -DCTEST_CMAKE_EXTRA_OPTIONS=\"-A ${{matrix.platform == 'x86' && 'Win32' || 'x64'}}\"" >> "${GITHUB_ENV}"
176+
177+ - if : startsWith(matrix.generator, 'MinGW')
178+ run : echo "CDASH_ARGS=${CDASH_ARGS} -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_FLAGS=-DMS_WIN64" > "${GITHUB_ENV}"
179+
180+ - name : Configure
181+ run : >-
182+ ctest -VV -S .github/ctest_configure.cmake ${{ env.CDASH_ARGS }}
183+ -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
184+ -DBUILD_TESTING_FULL=ON
185+ -DZFP_WITH_OPENMP=OFF
186+ -DBUILD_ZFPY=ON
187+
188+ - name : Build
189+ run : ctest -VV -S .github/ctest_build.cmake ${{ env.CDASH_ARGS }}
190+
191+ - name : Test
192+ run : ctest -C ${{ matrix.build_type }} -VV -S .github/ctest_test.cmake ${{ env.CDASH_ARGS }}
0 commit comments