ACSCTE: Serial CTE correction for subarrays #378
Workflow file for this run
This file contains hidden or 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: CMake | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
| BUILD_TYPE: Release | |
| INSTALL_PREFIX: /tmp/hstcal | |
| jobs: | |
| build_matrix: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-15, macos-14] | |
| gcc: [12, 14] | |
| cmake_options: ["", "-DENABLE_ASAN=ON"] | |
| exclude: | |
| - os: macos-15 | |
| cmake_options: "-DENABLE_ASAN=ON" | |
| - os: macos-15 | |
| gcc: 12 | |
| - os: macos-14 | |
| cmake_options: "-DENABLE_ASAN=ON" | |
| - os: macos-14 | |
| gcc: 14 | |
| - os: ubuntu-latest | |
| gcc: 14 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Linux dependencies | |
| if: startsWith(matrix.os, 'ubuntu') | |
| run: | | |
| sudo apt update | |
| sudo apt install -y libcfitsio-dev gfortran pkg-config | |
| - name: MacOS dependencies | |
| if: startsWith(matrix.os, 'macos') | |
| run: | | |
| brew update | |
| brew install gcc@${{ matrix.gcc }} cfitsio | |
| - name: Linux build | |
| if: startsWith(matrix.os, 'ubuntu') | |
| run: | | |
| mkdir -p build | |
| cd build | |
| cmake .. \ | |
| -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ | |
| -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_PREFIX }} ${{ matrix.cmake_options }} \ | |
| -DTESTS=ON | |
| make | |
| - name: MacOS build | |
| if: startsWith(matrix.os, 'macos') | |
| env: | |
| CC: gcc-${{ matrix.gcc }} | |
| CXX: g++-${{ matrix.gcc }} | |
| FC: gfortran-${{ matrix.gcc }} | |
| run: | | |
| mkdir -p build | |
| cd build | |
| export SDKROOT="$(xcrun --show-sdk-path)" | |
| cmake .. \ | |
| -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ | |
| -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_PREFIX }} ${{ matrix.cmake_options }} \ | |
| -DTESTS=ON | |
| make | |
| - name: Install | |
| run: | | |
| cd build | |
| make install | |
| - name: Generate source archive | |
| run: | | |
| cd build | |
| make dist | |
| - name: Generate binary archive | |
| run: | | |
| cd build | |
| cpack -G TGZ | |
| - 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 -V --output-on-failure |