Skip to content

Commit 45df445

Browse files
committed
wiwpwiwpw
1 parent 47f8241 commit 45df445

4 files changed

Lines changed: 95 additions & 49 deletions

File tree

.github/ctest_configure.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# This script is used to configure the build and submit the results to CDash.
22
set(cmake_args
3+
${CTEST_CMAKE_EXTRA_OPTIONS}
34
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
45
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
56
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
67
-DBUILD_TESTING_FULL=${BUILD_TESTING_FULL}
78
-DZFP_WITH_OPENMP=${ZFP_WITH_OPENMP}
89
-DBUILD_ZFPY=${BUILD_ZFPY}
9-
-DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR}
10-
-DPYTHON_LIBRARY=${PYTHON_LIBRARY}
1110
)
1211

1312
message("cmake_args:${cmake_args}")

.github/workflows/tests.yml

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
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
@@ -79,6 +78,9 @@ jobs:
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
8385
id: cmake
8486
run: >-
@@ -98,3 +100,83 @@ jobs:
98100
- name: Run Tests
99101
id: test
100102
run: ctest -VV -S .github/ctest_test.cmake ${{ env.CDASH_ARGS }}
103+
104+
win:
105+
runs-on: ${{matrix.os}}
106+
strategy:
107+
fail-fast: false
108+
matrix:
109+
include:
110+
- generator: Visual Studio 16 2019
111+
os: windows-2019
112+
platform: x64
113+
arch: x64
114+
build_type: Release
115+
116+
- generator: Visual Studio 16 2019
117+
os: windows-2019
118+
platform: x86
119+
arch: Win32
120+
build_type: Release
121+
122+
- generator: Visual Studio 17 2022
123+
os: windows-2022
124+
platform: x64
125+
arch: x64
126+
build_type: Release
127+
128+
- generator: Visual Studio 17 2022
129+
os: windows-2022
130+
platform: x86
131+
arch: Win32
132+
build_type: Release
133+
134+
defaults:
135+
run:
136+
shell: bash
137+
env:
138+
CDASH_ARGS: >-
139+
-DCTEST_BINARY_DIRECTORY="${{github.workspace}}\\build"
140+
-DCTEST_BUILD_NAME="${{matrix.os}}-${{matrix.platform}}"
141+
-DCTEST_CMAKE_EXTRA_OPTIONS="-A ${{matrix.arch}}"
142+
-DCTEST_CMAKE_GENERATOR="${{matrix.generator}}"
143+
-DCTEST_SITE="Github"
144+
-DCTEST_SOURCE_DIRECTORY="${{github.workspace}}"
145+
steps:
146+
- uses: actions/checkout@v4
147+
with:
148+
submodules: recursive
149+
150+
- uses: TheMrMilchmann/setup-msvc-dev@v3
151+
with:
152+
arch: ${{matrix.platform}}
153+
154+
- name: Setup Python
155+
uses: actions/setup-python@v4
156+
with:
157+
python-version: '3.8'
158+
architecture: ${{matrix.platform}}
159+
160+
- name: Install zfpy dependencies
161+
run: |
162+
python -m pip install cython
163+
python -m pip install oldest-supported-numpy
164+
python -m pip install setuptools
165+
166+
- if: github.event_name == 'pull_request'
167+
run: echo "CDASH_ARGS=${CDASH_ARGS} -DCTEST_UPDATE_VERSION_OVERRIDE=${{ github.event.pull_request.head.sha }}" > "${GITHUB_ENV}"
168+
169+
- name: Run CMake
170+
id: cmake
171+
run: >-
172+
ctest -VV -S .github/ctest_configure.cmake ${{ env.CDASH_ARGS }}
173+
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
174+
-DBUILD_TESTING_FULL=ON
175+
-DZFP_WITH_OPENMP=OFF
176+
-DBUILD_ZFPY=ON
177+
- name: Build
178+
id: build
179+
run: ctest -VV -S .github/ctest_build.cmake ${{ env.CDASH_ARGS }}
180+
- name: Run Tests
181+
id: test
182+
run: ctest -C ${{ matrix.build_type }} -VV -S .github/ctest_test.cmake ${{ env.CDASH_ARGS }}

appveyor.yml

Lines changed: 10 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,16 @@ version: 1.0.1-{build}
22

33
environment:
44
# zfpy only build for Release builds (otherwise need debug python libs python27_d.lib)
5-
matrix:
6-
- COMPILER: msvc
7-
GENERATOR: Visual Studio 15 2017 Win64
8-
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
9-
PLATFORM: x64
10-
BUILD_TYPE: Release
11-
PYTHON_VERSION: 38
12-
13-
- COMPILER: msvc
14-
GENERATOR: Visual Studio 15 2017
15-
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
16-
PLATFORM: Win32
17-
BUILD_TYPE: Release
18-
PYTHON_VERSION: 38
19-
20-
- COMPILER: msvc
21-
GENERATOR: Visual Studio 14 2015 Win64
22-
PLATFORM: x64
23-
BUILD_TYPE: Release
24-
PYTHON_VERSION: 38
25-
26-
- COMPILER: msvc
27-
GENERATOR: Visual Studio 14 2015
28-
PLATFORM: Win32
29-
BUILD_TYPE: Release
30-
PYTHON_VERSION: 38
31-
32-
- COMPILER: mingw
33-
GENERATOR: MinGW Makefiles
34-
PLATFORM: Win32
35-
BUILD_TYPE: Release
36-
37-
- COMPILER: mingw-w64
38-
GENERATOR: MinGW Makefiles
39-
PLATFORM: x64
40-
BUILD_TYPE: Release
5+
# matrix:
6+
# - COMPILER: mingw
7+
# GENERATOR: MinGW Makefiles
8+
# PLATFORM: Win32
9+
# BUILD_TYPE: Release
10+
#
11+
# - COMPILER: mingw-w64
12+
# GENERATOR: MinGW Makefiles
13+
# PLATFORM: x64
14+
# BUILD_TYPE: Release
4115

4216
install:
4317
- if "%COMPILER%"=="mingw" set PATH=C:\MinGW\bin;%PATH%
@@ -54,16 +28,6 @@ install:
5428
$env:PYTHON_LIB_PATH = "$env:PYTHON_DIR\libs\python$env:PYTHON_VERSION.lib"
5529
}
5630
57-
# placing these behind a conditional for some reason prevents CMake from picking up the virtualenv
58-
- if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" set PATH=%PYTHON_DIR%;%PYTHON_DIR%\Scripts;%PATH%
59-
- if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" pip install virtualenv
60-
- if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" set VIRTUALENV_NAME=pyVirtualEnv
61-
- if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" virtualenv %VIRTUALENV_NAME%
62-
- if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" "%VIRTUALENV_NAME%\\Scripts\\activate.bat"
63-
- if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" pip install -r python\requirements.txt
64-
- if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" python --version
65-
66-
6731
build_script:
6832
- sh appveyor.sh
6933
# uncomment to enable interactive remote desktop mode

cmake/CTestCustom.cmake.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
55
"ld: warning: directory not found for option '-L/opt/homebrew/opt/llvm/lib'"
66
"Using deprecated NumPy API, disable it with"
77
"clang: warning: argument unused during compilation: '-fstack-clash-protection'"
8+
"warning LNK4197:.*googletest"
89
)
910
list(APPEND CTEST_CUSTOM_COVERAGE_EXCLUDE)
1011
list(APPEND CTEST_CUSTOM_TESTS_IGNORE)

0 commit comments

Comments
 (0)