- typo #58
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: | |
paths: | |
- "src/**" | |
- "CMakeModules/**" | |
- "CMakeLists.txt" | |
- "VERSION.txt" | |
- "!.github/**" | |
- ".github/workflows/main.yml" | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
# The CMake configure and build commands are platform agnostic and should work equally | |
# well on Windows or Mac. You can convert this to a matrix build if you need | |
# cross-platform coverage. | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- name: add SWIG to windows | |
# this is separate from the SWIG download itself, because it needs to be added to the path also when SWIG is cached | |
if: matrix.os == 'windows-latest' | |
shell: bash | |
run: | | |
choco install -y swig | |
- name: add linux dependencies | |
if: matrix.os == 'ubuntu-latest' | |
shell: bash | |
run: | | |
sudo apt-get install swig | |
- name: Install MacOS dependencies | |
# MacOS already has libxml2 by default | |
if: matrix.os == 'macos-latest' | |
shell: bash | |
run: | | |
brew install swig | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel setuptools | |
- name: Build | |
working-directory: ${{runner.workspace}}/libCombine/ | |
shell: bash | |
# Execute the build. You can specify a specific target with "--target <NAME>" | |
run: python src/bindings/python/setup.py bdist_wheel | |
- name: Test (windows) | |
working-directory: ${{runner.workspace}}/libCombine/ | |
if: matrix.os == 'windows-latest' | |
shell: bash | |
run: cd build/temp*/$BUILD_TYPE && cmake --build . --config $BUILD_TYPE -t libCombine-test && ctest -C $BUILD_TYPE | |
- name: Test | |
working-directory: ${{runner.workspace}}/libCombine/ | |
if: matrix.os != 'windows-latest' | |
shell: bash | |
# Execute tests defined by the CMake configuration. | |
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
run: cd build/temp*/ && cmake --build . -t Combine-test && ctest -C $BUILD_TYPE | |