Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .github/ctest_configure.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# This script is used to configure the build and submit the results to CDash.
message("CMAKE_CXX_FLAGS:${CMAKE_CXX_FLAGS}")
set(cmake_args
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DBUILD_TESTING_FULL=${BUILD_TESTING_FULL}
-DZFP_WITH_OPENMP=${ZFP_WITH_OPENMP}
-DBUILD_ZFPY=${BUILD_ZFPY}
-DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR}
-DPYTHON_LIBRARY=${PYTHON_LIBRARY}
${CTEST_CMAKE_EXTRA_OPTIONS}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
-DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-DBUILD_TESTING_FULL:STRING=${BUILD_TESTING_FULL}
-DZFP_WITH_OPENMP:STRING=${ZFP_WITH_OPENMP}
-DBUILD_ZFPY:STRING=${BUILD_ZFPY}
)

message("cmake_args:${cmake_args}")
Expand Down
102 changes: 97 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ concurrency:
cancel-in-progress: true

jobs:
build:
unix:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
Expand Down Expand Up @@ -49,7 +49,6 @@ jobs:
-DCTEST_CMAKE_GENERATOR="Unix Makefiles"
-DCTEST_SITE="Github"
-DCTEST_BUILD_NAME="${{matrix.os}}-${{matrix.cxx_compiler}}"
-DCTEST_BUILD_FLAGS="-j"

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -79,8 +78,10 @@ jobs:
echo "LDFLAGS=\"-L$(brew --prefix llvm)/lib\"" >> $GITHUB_ENV
echo "CPPFLAGS=\"-I$(brew --prefix llvm)/include\"" >> $GITHUB_ENV

- if: github.event_name == 'pull_request'
run: echo "CDASH_ARGS=${CDASH_ARGS} -DCTEST_UPDATE_VERSION_OVERRIDE=${{ github.event.pull_request.head.sha }}" > "${GITHUB_ENV}"

- name: Run CMake
id: cmake
run: >-
ctest -VV -S .github/ctest_configure.cmake ${{ env.CDASH_ARGS }}
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
Expand All @@ -92,9 +93,100 @@ jobs:
-DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")
-DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
- name: Build
id: build
run: ctest -VV -S .github/ctest_build.cmake ${{ env.CDASH_ARGS }}

- name: Run Tests
id: test
run: ctest -VV -S .github/ctest_test.cmake ${{ env.CDASH_ARGS }}

windows:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
include:
- generator: Visual Studio 16 2019
os: windows-2019
platform: x64
build_type: Release

- generator: Visual Studio 16 2019
os: windows-2019
platform: x86
build_type: Release

- generator: Visual Studio 17 2022
os: windows-2022
platform: x64
build_type: Release

- generator: Visual Studio 17 2022
os: windows-2022
platform: x86
build_type: Release

- generator: MinGW Makefiles
os: windows-2022
platform: x64
build_type: Release
defaults:
run:
shell: bash
env:
CDASH_ARGS: >-
-DCTEST_BINARY_DIRECTORY="${{github.workspace}}\\build"
-DCTEST_BUILD_NAME="${{matrix.os}}-${{matrix.platform}}-${{matrix.generator}}"
-DCTEST_CMAKE_GENERATOR="${{matrix.generator}}"
-DCTEST_SITE="Github"
-DCTEST_SOURCE_DIRECTORY="${{github.workspace}}"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: TheMrMilchmann/setup-msvc-dev@v3
if: startsWith(matrix.generator, 'Visual Studio')
with:
arch: ${{matrix.platform}}

- name: Install compiler
if: startsWith(matrix.generator, 'MinGW')
id: install_cc
uses: rlalik/setup-cpp-compiler@master
with:
compiler: latest

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
architecture: ${{matrix.platform}}

- name: Install zfpy dependencies
run: |
python -m pip install cython
python -m pip install oldest-supported-numpy
python -m pip install setuptools

- if: github.event_name == 'pull_request'
run: echo "CDASH_ARGS=${CDASH_ARGS} -DCTEST_UPDATE_VERSION_OVERRIDE=${{ github.event.pull_request.head.sha }}" > "${GITHUB_ENV}"

- if: startsWith(matrix.generator, 'Visual Studio')
run: |
echo "CDASH_ARGS=${CDASH_ARGS} -DCMAKE_CXX_FLAGS:STRING=//wd4530 -DCTEST_CMAKE_EXTRA_OPTIONS=\"-A ${{matrix.platform == 'x86' && 'Win32' || 'x64'}}\"" >> "${GITHUB_ENV}"

- if: startsWith(matrix.generator, 'MinGW')
run: echo "CDASH_ARGS=${CDASH_ARGS} -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_FLAGS=-DMS_WIN64" > "${GITHUB_ENV}"

- name: Configure
run: >-
ctest -VV -S .github/ctest_configure.cmake ${{ env.CDASH_ARGS }}
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
-DBUILD_TESTING_FULL=ON
-DZFP_WITH_OPENMP=OFF
-DBUILD_ZFPY=ON

- name: Build
run: ctest -VV -S .github/ctest_build.cmake ${{ env.CDASH_ARGS }}

- name: Test
run: ctest -C ${{ matrix.build_type }} -VV -S .github/ctest_test.cmake ${{ env.CDASH_ARGS }}
72 changes: 0 additions & 72 deletions appveyor.sh

This file was deleted.

65 changes: 0 additions & 65 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,5 @@
version: 1.0.1-{build}

environment:
# zfpy only build for Release builds (otherwise need debug python libs python27_d.lib)
matrix:
- COMPILER: msvc
GENERATOR: Visual Studio 15 2017 Win64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PLATFORM: x64
BUILD_TYPE: Release
PYTHON_VERSION: 38

- COMPILER: msvc
GENERATOR: Visual Studio 15 2017
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PLATFORM: Win32
BUILD_TYPE: Release
PYTHON_VERSION: 38

- COMPILER: msvc
GENERATOR: Visual Studio 14 2015 Win64
PLATFORM: x64
BUILD_TYPE: Release
PYTHON_VERSION: 38

- COMPILER: msvc
GENERATOR: Visual Studio 14 2015
PLATFORM: Win32
BUILD_TYPE: Release
PYTHON_VERSION: 38

- COMPILER: mingw
GENERATOR: MinGW Makefiles
PLATFORM: Win32
BUILD_TYPE: Release

- COMPILER: mingw-w64
GENERATOR: MinGW Makefiles
PLATFORM: x64
BUILD_TYPE: Release

install:
- if "%COMPILER%"=="mingw" set PATH=C:\MinGW\bin;%PATH%
- if "%COMPILER%"=="mingw-w64" set PATH=C:\MinGW\bin;%PATH%

# set env vars for Python system dir (assumed to always be MSVC)
- ps: |
if ($env:PYTHON_VERSION) {
$env:PYTHON_DIR = "C:\Python$env:PYTHON_VERSION"
if ($env:PLATFORM -eq "x64") {
$env:PYTHON_DIR = "$env:PYTHON_DIR-x64"
}

$env:PYTHON_LIB_PATH = "$env:PYTHON_DIR\libs\python$env:PYTHON_VERSION.lib"
}

# placing these behind a conditional for some reason prevents CMake from picking up the virtualenv
- if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" set PATH=%PYTHON_DIR%;%PYTHON_DIR%\Scripts;%PATH%
- if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" pip install virtualenv
- if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" set VIRTUALENV_NAME=pyVirtualEnv
- if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" virtualenv %VIRTUALENV_NAME%
- if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" "%VIRTUALENV_NAME%\\Scripts\\activate.bat"
- if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" pip install -r python\requirements.txt
- if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" python --version


build_script:
- sh appveyor.sh
# uncomment to enable interactive remote desktop mode
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
3 changes: 3 additions & 0 deletions cmake/CTestCustom.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
"ld: warning: directory not found for option '-L/opt/homebrew/opt/llvm/lib'"
"Using deprecated NumPy API, disable it with"
"clang: warning: argument unused during compilation: '-fstack-clash-protection'"
"warning LNK4197:.*googletest"
"_ftelli64"
"_fseeki64"
)
list(APPEND CTEST_CUSTOM_COVERAGE_EXCLUDE)
list(APPEND CTEST_CUSTOM_TESTS_IGNORE)
Loading