Exclude failing tests on Windows #153
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: [push, pull_request] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
python-version: 3.9 | |
install: '' | |
flags: '--coverage' | |
linkflags: '--coverage' | |
tests: RMF | |
build: Debug | |
- os: ubuntu-latest | |
python-version: 3.9 | |
install: '' | |
flags: '--coverage' | |
linkflags: '--coverage' | |
tests: RMF | |
build: Release | |
- os: ubuntu-latest | |
python-version: 3.9 | |
install: 'libhdf5-dev liblog4cxx-dev' | |
flags: '--coverage' | |
linkflags: '--coverage' | |
tests: RMF | |
build: Debug | |
- os: macos-latest | |
python-version: 3.9 | |
install: '' | |
flags: '--coverage' | |
linkflags: '--coverage' | |
tests: RMF | |
build: Release | |
- os: windows-latest | |
python-version: 3.9 | |
install: '' | |
flags: '/DBOOST_ALL_DYN_LINK /EHsc /D_HDF5USEDLL_ /DH5_BUILT_AS_DYNAMIC_LIB /DWIN32 /bigobj /DBOOST_ZLIB_BINARY=kernel32' | |
linkflags: '' | |
tests: RMF | |
build: Release | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v6 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -qq libboost-all-dev swig libc-dbg ${{ matrix.install }} | |
pip install coverage | |
- name: Install dependencies (Mac) | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew install swig boost log4cxx ${{ matrix.install }} | |
pip install coverage numpy | |
- name: Install dependencies (Windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
choco install swig boost-msvc-14.3 | |
pip install numpy | |
- name: Build and test (Mac or Linux) | |
if: matrix.os != 'windows-latest' | |
run: | | |
mkdir build | |
cd build | |
../tools/coverage/setup.py | |
PYTHONPATH=`pwd`/coverage cmake .. -DCMAKE_BUILD_TYPE="${{ matrix.build }}" -DCMAKE_CXX_FLAGS="${{ matrix.flags }}" -DCMAKE_EXE_LINKER_FLAGS="${{ matrix.linkflags }}" -DCMAKE_MODULE_LINKER_FLAGS="${{ matrix.linkflags }}" -DCMAKE_SHARED_LINKER_FLAGS="${{ matrix.linkflags }}" | |
make -j 2 | |
ctest -j 2 --output-on-failure -L ${{ matrix.tests }} | |
- name: Build and test (Windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE="${{ matrix.build }}" -DCMAKE_CXX_FLAGS="${{ matrix.flags }}" -DCMAKE_EXE_LINKER_FLAGS="${{ matrix.linkflags }}" -DCMAKE_MODULE_LINKER_FLAGS="${{ matrix.linkflags }}" -DCMAKE_SHARED_LINKER_FLAGS="${{ matrix.linkflags }}" | |
cmake --build . --config Release -j 2 | |
copy lib\Release\*.dll lib\ | |
copy lib\Release\*.pyd lib\ | |
copy bin\Release\*.exe bin\ | |
copy C:\local\boost_1_87_0\lib64-msvc-14.3\*.dll lib\ | |
ctest -j 2 --output-on-failure -L ${{ matrix.tests }} -LE '(test|benchmark)-cpp' -E 'test_rmf_cat|test_rmf3_dump' | |
- name: Combine coverage | |
if: matrix.os != 'windows-latest' | |
run: | | |
cd build/coverage | |
coverage combine && coverage xml && mv coverage.xml ../.. | |
- uses: codecov/codecov-action@v5 | |
if: matrix.os != 'windows-latest' | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |