diff --git a/.github/workflows/Intel.yml b/.github/workflows/Intel.yml deleted file mode 100644 index 2c08edeb..00000000 --- a/.github/workflows/Intel.yml +++ /dev/null @@ -1,60 +0,0 @@ -# This is a CI workflow for the NCEPLIBS-ip project. -# -# This workflow builds with the Intel Classic and OneAPI compilers. -# -# Ed Hartnett, 1/8/23 -name: Intel -on: - push: - branches: - - develop - pull_request: - branches: - - develop - -# Use custom shell with -l so .bash_profile is sourced which loads intel/oneapi/setvars.sh -# without having to do it in manually every step -defaults: - run: - shell: bash -leo pipefail {0} - -jobs: - Intel: - runs-on: ubuntu-latest - strategy: - matrix: - openmp: [ ON, OFF ] - compilers: ["CC=icc FC=ifort", "CC=icx FC=ifx"] - - steps: - - # See https://software.intel.com/content/www/us/en/develop/articles/oneapi-repo-instructions.html - - name: install-intel - run: | - cd /tmp - wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list - sudo apt-get update - sudo apt-get install intel-oneapi-openmp intel-oneapi-compiler-fortran-2023.2.1 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.1 intel-oneapi-mkl-devel-2023.2.0 - echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile - - - name: checkout - uses: actions/checkout@v2 - with: - path: ip - - - name: build - run: | - cd ip - mkdir build - cd build - ${{ matrix.compilers }} cmake -DOPENMP=${{ matrix.openmp }} -DBUILD_SHARED_LIBS=OFF -DBUILD_8=ON .. - make -j2 VERBOSE=1 - - - name: test - run: | - ulimit -s unlimited - cd $GITHUB_WORKSPACE/ip/build - ctest --verbose --output-on-failure --rerun-failed diff --git a/.github/workflows/Linux.yml b/.github/workflows/Linux.yml deleted file mode 100644 index 95baece0..00000000 --- a/.github/workflows/Linux.yml +++ /dev/null @@ -1,52 +0,0 @@ -# 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@v2 - with: - path: ip - - - name: build - run: | - sudo apt install libopenblas-serial-dev - cd ip - mkdir build - cd build - cmake -DCMAKE_PREFIX_PATH="~/" -DOPENMP=${{ matrix.openmp }} ${{ matrix.options }} -DCMAKE_INSTALL_PREFIX=~/install -DBLA_VENDOR=OpenBLAS .. - make -j2 VERBOSE=1 - make install - # 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: | - cd $GITHUB_WORKSPACE/ip/build - ctest --verbose --output-on-failure --rerun-failed diff --git a/.github/workflows/MacOS.yml b/.github/workflows/MacOS.yml deleted file mode 100644 index 9a6efc9c..00000000 --- a/.github/workflows/MacOS.yml +++ /dev/null @@ -1,47 +0,0 @@ -# This is a CI workflow for the NCEPLIBS-ip project. -# -# This workflow builds on MacOS with different options. -# -# Ed Hartnett, 1/8/23 -name: MacOS -on: - push: - branches: - - develop - pull_request: - branches: - - develop - -jobs: - MacOS: - runs-on: macos-latest - env: - FC: gfortran-11 - CC: gcc-11 - strategy: - matrix: - openmp: [ ON, OFF ] - sharedlibs: [ON, OFF] - - steps: - - - name: checkout - uses: actions/checkout@v2 - with: - path: ip - - - name: build - run: | - cd ip - mkdir build - cd build - cmake -DOPENMP=${{ matrix.openmp }} -DBUILD_SHARED_LIBS=${{ matrix.sharedlibs }} -DCMAKE_INSTALL_PREFIX=~/install -DBUILD_8=ON .. - make -j2 VERBOSE=2 - make install - ls -l ~/install - ls -l ~/install/lib - - - name: test - run: | - cd $GITHUB_WORKSPACE/ip/build - ctest --verbose --output-on-failure --rerun-failed diff --git a/.github/workflows/Spack.yml b/.github/workflows/Spack.yml index 7b9577d8..95219987 100644 --- a/.github/workflows/Spack.yml +++ b/.github/workflows/Spack.yml @@ -15,45 +15,26 @@ on: branches: - develop +env: + ACTIONS_STEP_DEBUG: true + jobs: # This job builds with Spack using every combination of variants and runs the CTest suite each time Spack: strategy: matrix: os: ["ubuntu-latest"] - variants: ["+openmp +shared +pic precision=d", "+openmp ~shared ~pic precision=4", "~openmp ~shared +pic precision=8"] +# variants: ["+openmp +shared +pic precision=d", "+openmp ~shared ~pic precision=4", "~openmp ~shared +pic precision=8"] runs-on: ${{ matrix.os }} steps: - - name: checkout-ip - uses: actions/checkout@v4 - with: - path: ip - - - name: spack-build-and-test - run: | - sudo apt install libopenblas-serial-dev - git clone -c feature.manyFiles=true https://github.com/spack/spack - . spack/share/spack/setup-env.sh - spack env create ip-env - spack env activate ip-env - cp $GITHUB_WORKSPACE/ip/spack/package.py $SPACK_ROOT/var/spack/repos/builtin/packages/ip/package.py - spack develop --no-clone --path $GITHUB_WORKSPACE/ip ip@develop - spack add ip@develop%gcc@11 ${{ matrix.variants }} target=x86_64 - precision=$(echo ${{ matrix.variants }} | grep -oP " precision=\K[4d8]") - if [ "$precision" == "d" ]; then spack add grib-util@develop ; fi - spack external find cmake gmake - spack external find --path /usr/lib/x86_64-linux-gnu/openblas-serial openblas - spack config add "packages:lapack:buildable:false" - spack concretize - # Run installation and run CTest suite - spack install --fail-fast --test root - # Run 'spack load' and check that key build options were respected - spack load ip - if [[ "${{ matrix.variants }}" =~ "+shared" ]]; then suffix="so" ; else suffix="a"; fi - libvar=IP_LIB${precision} - ls ${!libvar} | grep -cE "/libip_${precision}\."$suffix'$' + - name: "Test with Spack" + uses: AlexanderRichert-NOAA/spack-package-test@v1.5 + with: + package-name: ip + spack-compiler: gcc@11 + cache-secret: ${{ secrets.SPACKBUILDCACHE }} # This job validates the Spack recipe by making sure each cmake build option is represented recipe-check: diff --git a/.github/workflows/developer.yml b/.github/workflows/developer.yml deleted file mode 100644 index cd802787..00000000 --- a/.github/workflows/developer.yml +++ /dev/null @@ -1,67 +0,0 @@ -# This is a CI workflow for the NCEPLIBS-ip project. -# -# This workflow builds with all developer options, including address -# sanitizer and code coverage. -# -# Ed Hartnett, 1/8/23 -name: developer -on: - push: - branches: - - develop - pull_request: - branches: - - develop - -jobs: - developer: - runs-on: ubuntu-latest - env: - FC: gfortran-11 - CC: gcc-11 - - steps: - - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install doxygen libopenblas-dev - python3 -m pip install gcovr - - - name: checkout - uses: actions/checkout@v2 - with: - path: ip - - - name: build - run: | - cd ip - mkdir build - cd build - cmake -DENABLE_DOCS=YES -DOPENMP=ON -DCMAKE_Fortran_FLAGS="-g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -fsanitize=address" -DCMAKE_C_FLAGS="-g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -fsanitize=address" -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON -DBUILD_8=ON .. - make -j2 VERBOSE=1 - - - name: test - run: | - cd $GITHUB_WORKSPACE/ip/build - ctest -j2 --verbose --output-on-failure --rerun-failed - - - name: run-gcovr - run: | - cd $GITHUB_WORKSPACE/ip/build - gcovr -r .. -v --html-details --exclude ../tests --exclude CMakeFiles --print-summary -o test-coverage.html - - - name: upload-test-coverage - uses: actions/upload-artifact@v2 - with: - name: ip-test-coverage - path: | - ip/build/*.html - ip/build/*.css - - - uses: actions/upload-artifact@v2 - with: - name: docs - path: | - ip/build/docs/html -