Merge pull request #28 from SeverinDenisenko/23-create-python-interface #47
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: Astroimsum CI | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
build_type: [Release, Debug, DebugASAN, DebugTSAN] | |
cpp_compiler: [g++, clang++] | |
include: | |
- os: ubuntu-latest | |
cpp_compiler: g++ | |
- os: ubuntu-latest | |
cpp_compiler: clang++ | |
- os: macos-latest | |
cpp_compiler: clang++ | |
exclude: | |
- os: macos-latest | |
cpp_compiler: g++ | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install dependensies on MacOS | |
shell: bash | |
run: | | |
brew upgrade | |
brew install clang-format | |
brew install boost | |
brew install sextractor | |
if: runner.os == 'macOS' | |
- name: Install dependensies on Linux | |
shell: bash | |
run: | | |
sudo apt-get install libboost-all-dev | |
sudo apt-get install sextractor | |
if: runner.os == 'Linux' | |
- name: Clang-format check | |
shell: bash | |
run: | | |
clang-format --dry-run --Werror tests/*.cpp astroimsum/*.cpp astroimsumlib/*.cpp astroimsumlib/include/*.hpp | |
- name: Set reusable strings | |
id: strings | |
shell: bash | |
run: | | |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
- name: Configure CMake | |
run: > | |
cmake -B ${{ steps.strings.outputs.build-output-dir }} | |
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
-S ${{ github.workspace }} | |
- name: Build | |
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} | |
- name: Basic test | |
working-directory: ${{ github.workspace }} | |
run: ./scripts/run_basic_test.sh |