CI #42
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: # build on PRs. Asks for maintainers approval before running for external PRs | |
workflow_dispatch: # allow to manually trigger the workflow | |
jobs: | |
windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
static: [0, 1] | |
steps: | |
- uses: actions/setup-python@v2 | |
with: | |
# Semantic version range syntax or exact version of a Python version | |
python-version: '3.7.9' | |
# Optional - x64 or x86 architecture, defaults to x64 | |
architecture: 'x64' | |
# You can test your matrix by printing the current Python version | |
- name: Install boost | |
run: c:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-x86_64-boost | |
- name: Boost library | |
run: Copy-Item "c:\msys64\mingw64\bin\libboost_unit_test_framework-mt.dll" -Destination "c:\msys64\mingw64\bin\boost_unit_test_framework.dll" | |
- name: Install swig | |
run: | | |
(New-Object System.Net.WebClient).DownloadFile("http://prdownloads.sourceforge.net/swig/swigwin-4.0.1.zip","d:\a\_temp\swigwin-4.0.1.zip"); | |
Expand-Archive d:\a\_temp\swigwin-4.0.1.zip d:\a\_temp\; | |
- name: setup-enviroment | |
run: | | |
echo "c:\msys64\mingw64\bin" >> $GITHUB_PATH | |
echo "c:\hostedtoolcache\windows\Python\3.7.9\x64" >> $GITHUB_PATH | |
echo "d:\a\_temp\swigwin-4.0.1" >> $GITHUB_PATH | |
- name: install python dependencies | |
run: python -m pip install scons pywin32 numpy scipy matplotlib | |
- uses: actions/checkout@v2 | |
- name: build | |
run: scons -j2 PYDOC=0 CHECK_STYLE=0 BUILD_STATICLIB=${{ matrix.static }} COMPILER=gnu OPT=1 GSL_INCLUDE_PATH="" CPPDEFINES="_POSIX_C_SOURCE=1" CC="C:\msys64\mingw64\bin\gcc.exe" CXX="C:\msys64\mingw64\bin\g++.exe" LINK="C:\msys64\mingw64\bin\g++.exe" BOOST_INCLUDE_PATH="C:\msys64\mingw64\include" BOOST_LIBRARY_PATH="C:\msys64\mingw64\bin" CPPFLAGS=-Werror | |
- name: on failed | |
if: ${{ failure() }} | |
run: type config.log | |
linux-minimal: | |
runs-on: ubuntu-latest | |
steps: | |
- name: install python dependencies | |
run: python -m pip install scons | |
- uses: actions/checkout@v2 | |
- name: build | |
run: scons -j 2 SG_PYTHON=0 RUN_CPP_EXAMPLES=1 CPPFLAGS=-Werror | |
linux-medium: | |
runs-on: ubuntu-latest | |
steps: | |
- name: install python dependencies | |
run: python -m pip install scons | |
- name: install apt packages | |
run: | | |
sudo apt update -y | |
sudo apt install -y libboost-test-dev swig python3-dev python3-numpy doxygen | |
- uses: actions/checkout@v2 | |
- name: build | |
run: scons -j 2 SG_ALL=0 SG_BASE=1 SG_PYTHON=1 RUN_CPP_EXAMPLES=1 RUN_PYTHON_EXAMPLES=1 CPPFLAGS=-Werror | |
linux-full: | |
runs-on: ubuntu-latest | |
steps: | |
- name: install python dependencies | |
run: python -m pip install scons | |
- name: install apt packages | |
run: | | |
sudo apt update -y | |
sudo apt install -y libboost-test-dev swig python3-dev python3-numpy doxygen graphviz libgsl-dev zlib1g-dev libeigen3-dev libsuitesparse-dev libarmadillo-dev libgmm++-dev | |
- uses: actions/checkout@v2 | |
- name: build | |
run: scons -j 2 RUN_CPP_EXAMPLES=1 RUN_PYTHON_EXAMPLES=1 CPPFLAGS=-Werror | |
linux-packaging: | |
runs-on: ubuntu-latest | |
steps: | |
- name: install scons | |
run: python -m pip install scons | |
- name: install apt packages | |
run: | | |
sudo apt update -y | |
sudo apt install -y fakeroot swig python3-pip python3-dev libgomp1 doxygen | |
- uses: actions/checkout@v2 | |
- name: prepare packaging | |
run: bash $GITHUB_WORKSPACE/tools/ci_scripts/install_pip_packaging_tools.sh | |
- name: test deb packaging | |
run: bash $GITHUB_WORKSPACE/tools/ci_scripts/create_deb_install_deb_and_test.sh | |
- name: test python packaging | |
run: bash $GITHUB_WORKSPACE/tools/ci_scripts/create_and_patch_python_wheel.sh | |