CI updates #332
Workflow file for this run
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
# This is a CI workflow for the NCEPLIBS-ip project. | |
# | |
# This workflow builds on Linux with different options. | |
# | |
# Ed Hartnett, 1/8/23 | |
name: Linux | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
Linux: | |
runs-on: ubuntu-latest | |
env: | |
FC: gfortran-10 | |
CC: gcc-10 | |
strategy: | |
matrix: | |
openmp: [ ON, OFF ] | |
options: [ -DBUILD_D=OFF, -DBUILD_4=OFF, -DBUILD_8=ON ] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
path: ip | |
- name: build | |
run: | | |
sudo apt install libopenblas-serial-dev | |
cmake -S ip -B ip/build -DCMAKE_PREFIX_PATH="~/" -DOPENMP=${{ matrix.openmp }} ${{ matrix.options }} -DCMAKE_INSTALL_PREFIX=~/install -DBLA_VENDOR=OpenBLAS | |
cmake --build ip/build --parallel 2 --verbose | |
cmake --install ip/build | |
# Ensure that manual setting of '-DBLA_VENDOR=...' is reflected in output CMake config | |
if [ $(grep -c "BLA_VENDOR OpenBLAS" ~/install/lib/cmake/ip/ip-config.cmake) -eq 0 ]; then | |
echo "OpenBLAS not set as BLA_VENDOR in ip-config.cmake!" | |
exit 1 | |
fi | |
- name: test | |
run: ctest --test-dir ip/build --verbose --output-on-failure --rerun-failed |