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,102 @@ 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+ win :
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 : Win32
130+ build_type : Release
131+
132+ - generator : MinGW Makefiles
133+ os : windows-2022
134+ platform : x64
135+ build_type : Release
136+ defaults :
137+ run :
138+ shell : bash
139+ env :
140+ CDASH_ARGS : >-
141+ -DCTEST_BINARY_DIRECTORY="${{github.workspace}}\\build"
142+ -DCTEST_BUILD_NAME="${{matrix.os}}-${{matrix.platform}}"
143+ -DCTEST_CMAKE_EXTRA_OPTIONS="-A ${{matrix.platform == 'x86' && 'Win32' || 'x64'}}"
144+ -DCTEST_CMAKE_GENERATOR="${{matrix.generator}}"
145+ -DCTEST_SITE="Github"
146+ -DCTEST_SOURCE_DIRECTORY="${{github.workspace}}"
147+ steps :
148+ - uses : actions/checkout@v4
149+ with :
150+ submodules : recursive
151+
152+ - uses : TheMrMilchmann/setup-msvc-dev@v3
153+ if : startsWith(matrix.generator, 'Visual Studio')
154+ with :
155+ arch : ${{matrix.platform}}
156+
157+ - name : Install compiler
158+ if : startsWith(matrix.generator, 'MinGW')
159+ id : install_cc
160+ uses : rlalik/setup-cpp-compiler@master
161+ with :
162+ compiler : latest
163+
164+ - name : Setup Python
165+ uses : actions/setup-python@v4
166+ with :
167+ python-version : ' 3.8'
168+ architecture : ${{matrix.platform}}
169+
170+ - name : Install zfpy dependencies
171+ run : |
172+ python -m pip install cython
173+ python -m pip install oldest-supported-numpy
174+ python -m pip install setuptools
175+
176+ - if : github.event_name == 'pull_request'
177+ run : echo "CDASH_ARGS=${CDASH_ARGS} -DCTEST_UPDATE_VERSION_OVERRIDE=${{ github.event.pull_request.head.sha }}" > "${GITHUB_ENV}"
178+
179+ - if : startsWith(matrix.generator, 'MinGW')
180+ run : echo "CDASH_ARGS=${CDASH_ARGS} -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++" > "${GITHUB_ENV}"
181+
182+ - name : Configure
183+ run : >-
184+ ctest -VV -S .github/ctest_configure.cmake ${{ env.CDASH_ARGS }}
185+ -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
186+ -DBUILD_TESTING_FULL=ON
187+ -DZFP_WITH_OPENMP=OFF
188+ -DBUILD_ZFPY=ON
189+
190+ - name : Build
191+ run : ctest -VV -S .github/ctest_build.cmake ${{ env.CDASH_ARGS }}
192+
193+ - name : Test
194+ run : ctest -C ${{ matrix.build_type }} -VV -S .github/ctest_test.cmake ${{ env.CDASH_ARGS }}
0 commit comments