This repository was archived by the owner on Nov 12, 2024. It is now read-only.
Apply scm policy #1384
Workflow file for this run
This file contains 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: CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build and test on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-2019] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
- name: Install dependencies on windows | |
if: startsWith(matrix.os, 'windows') | |
run: | | |
vcpkg install fmt:x64-windows | |
vcpkg install msgpack:x64-windows | |
- name: Install dependencies on ubuntu | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libfmt-dev libmsgpack-dev valgrind | |
- name: Install dependencies on macos | |
if: startsWith(matrix.os, 'mac') | |
run: | | |
brew install fmt msgpack-cxx | |
- name: Configure Windows specifics | |
if: startsWith(matrix.os, 'windows') | |
run: > | |
cmake -S core/ -B build/ | |
-DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake" | |
-DVCPKG_TARGET_TRIPLET=x64-windows | |
-G "Visual Studio 16 2019" | |
-A x64 | |
- name: Configure | |
run: > | |
cmake -S core/ -B build/ | |
-DBUILD_TESTING=ON | |
-DCMAKE_BUILD_TYPE=Release | |
-DCMAKE_POSITION_INDEPENDENT_CODE=ON | |
- name: Compile | |
run: cmake --build build/ --parallel --config Release | |
- name: Run tests | |
working-directory: build | |
run: ctest -C Release --output-on-failure | |
- name: Run valgrind | |
if: startsWith(matrix.os, 'ubuntu') | |
working-directory: build | |
run: | | |
valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=1 ./core-tests | |
- name: Install python dependencies | |
run: python -m pip install -r python/requirements-dev.txt | |
- name: Build python module | |
if: startsWith(matrix.os, 'windows') | |
working-directory: python | |
run: > | |
python setup.py | |
build_ext --inplace build | |
-- | |
-Doneseismic_DIR="${{ github.workspace }}/build" | |
-DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake" | |
-DVCPKG_TARGET_TRIPLET=x64-windows | |
- name: Build python module | |
if: ${{ !startsWith(matrix.os, 'windows') }} | |
working-directory: python | |
run: > | |
python setup.py | |
build_ext --inplace build | |
-- | |
-Doneseismic_DIR="${{ github.workspace }}/build" | |
- name: Run python tests | |
working-directory: python | |
run: pytest --hypothesis-profile=no-deadline |