Skip to content

The Reunion [POC] (#412) #1

The Reunion [POC] (#412)

The Reunion [POC] (#412) #1

Workflow file for this run

name: CMake
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
INSTALL_PREFIX: /tmp/hstcal
jobs:
build_matrix:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
gcc: [12]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install -y libcfitsio-dev gfortran pkg-config
- name: MacOS dependencies
if: matrix.os == 'macos-latest'
run: |
brew update
brew install gcc@${{ matrix.gcc }} cfitsio
- name: Linux build
if: matrix.os == 'ubuntu-latest'
run: |
mkdir -p build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_PREFIX }}
make
- name: MacOS build
if: matrix.os == 'macos-latest'
env:
CC: gcc-${{ matrix.gcc }}
CXX: g++-${{ matrix.gcc }}
FC: gfortran-${{ matrix.gcc }}
run: |
mkdir -p build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_PREFIX }}
make
- name: Install
run: |
cd build
make install
- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}