diff --git a/.github/workflows/Intel.yml b/.github/workflows/Intel.yml index b6d76613..b1253eec 100644 --- a/.github/workflows/Intel.yml +++ b/.github/workflows/Intel.yml @@ -17,94 +17,30 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true -# 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 - env: - CC: icc - FC: ifort - CXX: icpc strategy: fail-fast: true matrix: - compilers: ["CC=icc FC=ifort", "CC=icx FC=ifx"] + compilers: ["oneapi", "classic"] steps: - # See https://software.intel.com/content/www/us/en/develop/articles/oneapi-repo-instructions.html - - name: install-intel - run: | - set -x - 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-dev-utilities intel-oneapi-mpi-devel intel-oneapi-compiler-fortran-2023.2.1 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.1 intel-oneapi-openmp - echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile - - - name: checkout-bacio - uses: actions/checkout@v3 - with: - repository: NOAA-EMC/NCEPLIBS-bacio - path: bacio - ref: develop - - - name: build-bacio - run: | - cd bacio - mkdir build - cd build - which ifort || which ifx - ${{ matrix.compilers }} cmake .. -DCMAKE_INSTALL_PREFIX=~/bacio - make -j2 - make install - - - name: checkout-w3emc - uses: actions/checkout@v3 - with: - repository: NOAA-EMC/NCEPLIBS-w3emc - path: w3emc - ref: develop - - - name: build-w3emc - run: | - cd w3emc - mkdir build - cd build - ${{ matrix.compilers }} cmake -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc -DBUILD_WITH_BUFR=OFF .. - make -j2 - make install - - - name: checkout-jasper - uses: actions/checkout@v3 + - name: "Install Intel" + uses: NOAA-EMC/ci-install-intel-toolkit@develop with: - repository: jasper-software/jasper - path: jasper - ref: version-4.0.0 - - - name: cache-jasper - id: cache-jasper - uses: actions/cache@v3 + install-mpi: true + mpi-wrapper-setup: ${{ matrix.compilers }} + + - name: "Build dependencies" + uses: NOAA-EMC/ci-build-nceplibs@develop with: - path: ~/Jasper - key: jasper-intel-${{ matrix.compilers }}-${{ runner.os }}-4.0.0 - - - name: build-jasper - if: steps.cache-jasper.outputs.cache-hit != 'true' - run: | - cd jasper - mkdir build-jasper && cd build-jasper - ${{ matrix.compilers }} cmake .. -DCMAKE_INSTALL_PREFIX=~/Jasper - make -j2 - make install + bacio-version: develop + jasper-version: version-4.0.0 + w3emc-version: develop + w3emc-cmake-args: -DBUILD_WITH_BUFR=OFF + key-prefix: Intel- - name: checkout uses: actions/checkout@v3 @@ -116,7 +52,7 @@ jobs: cd g2 mkdir build cd build - ${{ matrix.compilers }} cmake -DCMAKE_PREFIX_PATH="~/Jasper;~/bacio;~/w3emc" .. + cmake -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/jasper;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-bacio;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-w3emc" .. make -j2 - name: test diff --git a/.github/workflows/Linux_options.yml b/.github/workflows/Linux_options.yml index 33eb692d..fb48f31a 100644 --- a/.github/workflows/Linux_options.yml +++ b/.github/workflows/Linux_options.yml @@ -47,95 +47,14 @@ jobs: sudo apt-get update sudo apt-get install libpng-dev zlib1g-dev libjpeg-dev - - name: cache-bacio - id: cache-bacio - uses: actions/cache@v3 + - name: "Build dependencies" + uses: NOAA-EMC/ci-build-nceplibs@develop with: - path: ~/bacio - key: bacio-${{ runner.os }}-${{ matrix.bacio-version }} - - - name: checkout-bacio - if: steps.cache-bacio.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - with: - repository: NOAA-EMC/NCEPLIBS-bacio - path: bacio - ref: v${{ matrix.bacio-version }} - - - name: build-bacio - if: steps.cache-bacio.outputs.cache-hit != 'true' - run: | - cd bacio - mkdir build - cd build - cmake .. -DCMAKE_INSTALL_PREFIX=~/bacio - make -j2 - make install - - - name: cache-w3emc - id: cache-w3emc - uses: actions/cache@v3 - with: - path: ~/w3emc - key: w3emc-${{ runner.os }}-${{ matrix.w3emc-version }}-${{ matrix.bacio-version }} - - - name: checkout-w3emc - if: steps.cache-w3emc.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - with: - repository: NOAA-EMC/NCEPLIBS-w3emc - path: w3emc - ref: v${{ matrix.w3emc-version }} - - - name: build-w3emc - if: steps.cache-w3emc.outputs.cache-hit != 'true' - run: | - cd w3emc - mkdir build - cd build - cmake -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc -DBUILD_WITH_BUFR=OFF .. - make -j2 - make install - - - name: cache-jasper - id: cache-jasper - uses: actions/cache@v3 - with: - path: ~/jasper - key: jasper-${{ runner.os }}-4.0.0 - - - name: checkout-jasper - if: steps.cache-jasper.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - with: - repository: jasper-software/jasper - path: jasper - ref: version-4.0.0 - - - name: build-jasper - if: steps.cache-jasper.outputs.cache-hit != 'true' - run: | - cd jasper - mkdir build-jasper && cd build-jasper - cmake .. -DCMAKE_INSTALL_PREFIX=~/jasper - make -j2 - make install - - - name: checkout-g2c - uses: actions/checkout@v3 - with: - repository: NOAA-EMC/NCEPLIBS-g2c - path: g2c - ref: develop - - - name: build-g2c - run: | - cd g2c - mkdir build - cd build - cmake .. -DCMAKE_INSTALL_PREFIX=~/g2c -DJasper_ROOT=~/jasper - make -j2 - make install + bacio-version: ${{ matrix.bacio-version }} + g2c-version: develop + jasper-version: version-4.0.0 + w3emc-version: ${{ matrix.w3emc-version }} + w3emc-cmake-args: -DBUILD_WITH_BUFR=OFF - name: checkout uses: actions/checkout@v3 @@ -155,7 +74,7 @@ jobs: cd g2 mkdir build cd build - cmake ${{ matrix.config.options }} -DCMAKE_PREFIX_PATH="~/jasper;~/g2c;~/bacio;~/w3emc" -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data .. + cmake ${{ matrix.config.options }} -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/jasper;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-g2c;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-bacio;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-w3emc" -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data .. make -j2 VERBOSE=1 - name: cache-data diff --git a/.github/workflows/Linux_versions.yml b/.github/workflows/Linux_versions.yml index a0bf1e42..c1bb16b4 100644 --- a/.github/workflows/Linux_versions.yml +++ b/.github/workflows/Linux_versions.yml @@ -39,104 +39,23 @@ jobs: sudo apt-get update sudo apt-get install libpng-dev zlib1g-dev libjpeg-dev - - name: cache-bacio - id: cache-bacio - uses: actions/cache@v3 + - name: "Build dependencies" + uses: NOAA-EMC/ci-build-nceplibs@develop with: - path: ~/bacio - key: bacio-${{ runner.os }}-${{ matrix.bacio-version }} - - - name: checkout-bacio - if: steps.cache-bacio.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - with: - repository: NOAA-EMC/NCEPLIBS-bacio - path: bacio - ref: v${{ matrix.bacio-version }} - - - name: build-bacio - if: steps.cache-bacio.outputs.cache-hit != 'true' - run: | - cd bacio - mkdir build - cd build - cmake .. -DCMAKE_INSTALL_PREFIX=~/bacio - make -j2 - make install - - - name: cache-w3emc - id: cache-w3emc - uses: actions/cache@v3 - with: - path: ~/w3emc - key: w3emc-${{ runner.os }}-${{ matrix.w3emc-version }}-${{ matrix.bacio-version }}-1 - - - name: checkout-w3emc - if: steps.cache-w3emc.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - with: - repository: NOAA-EMC/NCEPLIBS-w3emc - path: w3emc - ref: v${{ matrix.w3emc-version }} - - - name: build-w3emc - if: steps.cache-w3emc.outputs.cache-hit != 'true' - run: | - cd w3emc - mkdir build - cd build - cmake -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc -DBUILD_WITH_BUFR=OFF .. - make -j2 - make install - - - name: cache-jasper - id: cache-jasper - uses: actions/cache@v3 - with: - path: ~/jasper - key: jasper-${{ runner.os }}-${{ matrix.jasper-version }} - - - name: checkout-jasper - if: steps.cache-jasper.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - with: - repository: jasper-software/jasper - path: jasper - ref: version-${{ matrix.jasper-version }} - - - name: build-jasper - if: steps.cache-jasper.outputs.cache-hit != 'true' - run: | - cd jasper - mkdir build-jasper && cd build-jasper - cmake .. -DCMAKE_INSTALL_PREFIX=~/jasper - make -j2 - make install - - - name: checkout-g2c - uses: actions/checkout@v3 - with: - repository: NOAA-EMC/NCEPLIBS-g2c - path: g2c - ref: develop - - - name: build-g2c - run: | - cd g2c - mkdir build - cd build - cmake .. -DCMAKE_INSTALL_PREFIX=~/g2c -DJasper_ROOT=~/jasper - make -j2 - make install + bacio-version: ${{ matrix.bacio-version }} + g2c-version: develop + jasper-version: ${{ matrix.jasper-version }} + w3emc-version: ${{ matrix.w3emc-version }} + w3emc-cmake-args: -DBUILD_WITH_BUFR=OFF - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: g2 - name: cache-data id: cache-data - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/data key: data-5 @@ -147,7 +66,7 @@ jobs: cd g2 mkdir build cd build - cmake -DCMAKE_PREFIX_PATH="~/jasper;~/g2c;~/bacio;~/w3emc" -DLOGGING=ON -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data .. + cmake -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/jasper;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-g2c;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-bacio;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-w3emc" -DLOGGING=ON -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data .. make -j2 VERBOSE=1 - name: cache-data diff --git a/.github/workflows/MacOS.yml b/.github/workflows/MacOS.yml index 4f7db8b5..a39ba106 100644 --- a/.github/workflows/MacOS.yml +++ b/.github/workflows/MacOS.yml @@ -39,97 +39,17 @@ jobs: brew install libpng brew install jpeg-turbo - - name: cache-bacio - id: cache-bacio - uses: actions/cache@v3 + - name: "Build dependencies" + uses: NOAA-EMC/ci-build-nceplibs@develop with: - path: ~/bacio - key: bacio-${{ runner.os }}-${{ matrix.bacio-version }} - - - name: checkout-bacio - if: steps.cache-bacio.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - with: - repository: NOAA-EMC/NCEPLIBS-bacio - path: bacio - ref: v${{ matrix.bacio-version }} + bacio-version: ${{ matrix.bacio-version }} + g2c-version: develop + jasper-version: ${{ matrix.jasper-version }} + w3emc-version: v2.9.2 + w3emc-cmake-args: -DBUILD_WITH_BUFR=OFF - - name: build-bacio - if: steps.cache-bacio.outputs.cache-hit != 'true' - run: | - cd bacio - mkdir build - cd build - cmake .. -DCMAKE_INSTALL_PREFIX=~/bacio - make -j2 - make install - - - name: cache-w3emc - id: cache-w3emc - uses: actions/cache@v3 - with: - path: ~/w3emc - key: w3emc-${{ runner.os }}-2.9.2-bacio-${{ matrix.bacio-version }} - - - name: checkout-w3emc - if: steps.cache-w3emc.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - with: - repository: NOAA-EMC/NCEPLIBS-w3emc - path: w3emc - ref: v2.9.2 - - - name: build-w3emc - if: steps.cache-w3emc.outputs.cache-hit != 'true' - run: | - cd w3emc - mkdir build - cd build - cmake .. -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc - make -j2 - make install - - - name: cache-jasper - id: cache-jasper - uses: actions/cache@v3 - with: - path: ~/jasper - key: jasper-${{ runner.os }}-${{ matrix.jasper-version }} - - - name: checkout-jasper - if: steps.cache-jasper.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - with: - repository: jasper-software/jasper - path: jasper - ref: version-${{ matrix.jasper-version }} - - - name: build-jasper - if: steps.cache-jasper.outputs.cache-hit != 'true' - run: | - cd jasper - mkdir build-jasper && cd build-jasper - cmake .. -DCMAKE_INSTALL_PREFIX=~/jasper - make -j2 - make install - - - name: checkout-g2c - uses: actions/checkout@v3 - with: - repository: NOAA-EMC/NCEPLIBS-g2c - path: g2c - ref: develop - - - name: build-g2c - run: | - cd g2c - mkdir build - cd build - cmake .. -DCMAKE_PREFIX_PATH=~/jasper -DCMAKE_INSTALL_PREFIX=~/g2c - make -j2 - make install - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: g2 @@ -138,7 +58,7 @@ jobs: cd g2 mkdir build cd build - cmake -DCMAKE_PREFIX_PATH="~/jasper;~/bacio;~/w3emc;~/g2c" -DCMAKE_BUILD_TYPE=Debug .. + cmake -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/jasper;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-g2c;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-bacio;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-w3emc" -DCMAKE_BUILD_TYPE=Debug .. make -j2 VERBOSE=1 - name: test diff --git a/.github/workflows/Spack.yml b/.github/workflows/Spack.yml index d79cd2ce..7d14989f 100644 --- a/.github/workflows/Spack.yml +++ b/.github/workflows/Spack.yml @@ -26,40 +26,20 @@ jobs: strategy: matrix: os: ["ubuntu-latest"] - pic: ["+pic", "~pic"] - precision: ["precision=d", "precision=4"] - w3emc: ["+w3emc", "~w3emc"] + variants: ["+pic precision=d +w3emc", "~pic precision=4 ~w3emc"] runs-on: ${{ matrix.os }} steps: - - name: checkout-g2 - uses: actions/checkout@v4 + - name: "Build Spack package" + uses: NOAA-EMC/ci-test-spack-package@develop with: - path: g2 - - - name: spack-build-and-test - run: | - git clone -c feature.manyFiles=true https://github.com/spack/spack - . spack/share/spack/setup-env.sh - spack env create g2-env - spack env activate g2-env - cp $GITHUB_WORKSPACE/g2/spack/package.py $SPACK_ROOT/var/spack/repos/builtin/packages/g2/package.py - spack develop --no-clone --path $GITHUB_WORKSPACE/g2 g2@develop - spack add g2@develop%gcc@11 ${{ matrix.pic }} ${{ matrix.precision }} ${{ matrix.w3emc }} - spack external find cmake gmake - spack concretize - # Run installation and run CTest suite - spack install --verbose --fail-fast --test root - # Run 'spack load' to check for obvious errors in setup_run_environment - spack load g2 - - - name: Upload test results - uses: actions/upload-artifact@v3 - if: ${{ failure() }} - with: - name: spackci-ctest-output-${{ matrix.os }}-${{ matrix.pic }}-${{ matrix.precision }}-${{ matrix.w3emc }} - path: ${{ github.workspace }}/g2/spack-build-*/Testing/Temporary/LastTest.log + package-name: g2 + package-variants: ${{ matrix.variants }} + custom-recipe: spack/package.py + use-repo-cache: true + spack-compiler: gcc + repo-cache-key-suffix: ${{ matrix.os }}-${{ matrix.variants }}-1 # This job validates the Spack recipe by making sure each cmake build option is represented @@ -68,15 +48,9 @@ jobs: steps: - - name: checkout-g2 - uses: actions/checkout@v4 - with: - path: g2 - - name: recipe-check - run: | - echo "If this jobs fails, look at the most recently output CMake option below and make sure that option appears in spack/package.py" - for opt in $(grep -ioP '^option\(\K(?!(ENABLE_DOCS|FTP_TEST_FILES|FTP_LARGE_TEST_FILES|FTP_EXTRA_TEST_FILES|LOGGING|BUILD_SHARED_LIBS))[^ ]+' $GITHUB_WORKSPACE/g2/CMakeLists.txt) ; do - echo "Checking for presence of '$opt' CMake option in package.py" - grep -cP "define.+\b${opt}\b" $GITHUB_WORKSPACE/g2/spack/package.py - done + uses: NOAA-EMC/ci-check-spack-recipe@develop + with: + recipe-file: package/spack/package.py + cmakelists-txt: package/CMakeLists.txt + ignore-list: ENABLE_DOCS,FTP_TEST_FILES,FTP_LARGE_TEST_FILES,FTP_EXTRA_TEST_FILES,LOGGING diff --git a/.github/workflows/developer.yml b/.github/workflows/developer.yml index 791a7277..6e1bc0fd 100644 --- a/.github/workflows/developer.yml +++ b/.github/workflows/developer.yml @@ -32,61 +32,13 @@ jobs: sudo apt-get update sudo apt-get install libpng-dev zlib1g-dev libjpeg-dev doxygen gcovr valgrind - - name: checkout-bacio - uses: actions/checkout@v4 - with: - repository: NOAA-EMC/NCEPLIBS-bacio - path: bacio - ref: develop - - - name: build-bacio - run: | - cd bacio - mkdir build - cd build - cmake .. -DCMAKE_INSTALL_PREFIX=~/bacio - make -j2 - make install - - - name: checkout-w3emc - uses: actions/checkout@v4 - with: - repository: NOAA-EMC/NCEPLIBS-w3emc - path: w3emc - ref: develop - - - name: build-w3emc - run: | - cd w3emc - mkdir build - cd build - cmake -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc -DBUILD_WITH_BUFR=OFF .. - make -j2 - make install - - - name: cache-jasper - id: cache-jasper - uses: actions/cache@v4 + - name: "Build dependencies" + uses: NOAA-EMC/ci-build-nceplibs@develop with: - path: ~/Jasper - key: jasper-${{ runner.os }}-4.0.0 - - - name: checkout-jasper - if: steps.cache-jasper.outputs.cache-hit != 'true' - uses: actions/checkout@v4 - with: - repository: jasper-software/jasper - path: jasper - ref: version-4.0.0 - - - name: build-jasper - if: steps.cache-jasper.outputs.cache-hit != 'true' - run: | - cd jasper - mkdir build-jasper && cd build-jasper - cmake .. -DCMAKE_INSTALL_PREFIX=~/Jasper - make -j2 - make install + bacio-version: develop + w3emc-version: develop + jasper-version: version-4.0.0 + w3emc-cmake-args: -DBUILD_WITH_BUFR=OFF - name: checkout uses: actions/checkout@v4 @@ -107,7 +59,7 @@ jobs: mkdir build doxygen --version cd build - cmake -DFTP_LARGE_TEST_FILES=ON -DENABLE_DOCS=On -DJasper_ROOT=~/Jasper -DCMAKE_PREFIX_PATH="~/bacio;~/w3emc" -DCMAKE_Fortran_FLAGS="-g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -Wall -fno-omit-frame-pointer -fsanitize=address" -DCMAKE_C_FLAGS="-g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -Wall -fno-omit-frame-pointer -fsanitize=address" -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data -DCMAKE_BUILD_TYPE=Debug .. + cmake -DFTP_LARGE_TEST_FILES=OFF -DENABLE_DOCS=On -DJasper_ROOT=$GITHUB_WORKSPACE/nceplibs/Jasper -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-bacio;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-w3emc" -DCMAKE_Fortran_FLAGS="-g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -Wall -fno-omit-frame-pointer -fsanitize=address" -DCMAKE_C_FLAGS="-g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -Wall -fno-omit-frame-pointer -fsanitize=address" -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data -DCMAKE_BUILD_TYPE=Debug .. make -j2 VERBOSE=1 - name: test_asan diff --git a/.github/workflows/grib_utils.yml b/.github/workflows/grib_utils.yml index c02e88b1..64156d1f 100644 --- a/.github/workflows/grib_utils.yml +++ b/.github/workflows/grib_utils.yml @@ -37,109 +37,16 @@ jobs: sudo apt-get update sudo apt-get install libpng-dev zlib1g-dev libjpeg-dev - - name: cache-jasper - id: cache-jasper - uses: actions/cache@v3 + - name: "Build dependencies" + uses: NOAA-EMC/ci-build-nceplibs@develop with: - path: ~/jasper - key: jasper-${{ runner.os }}-${{ matrix.jasper-version }} - - - name: checkout-jasper - if: steps.cache-jasper.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - with: - repository: jasper-software/jasper - path: jasper - ref: version-${{ matrix.jasper-version }} - - - name: build-jasper - if: steps.cache-jasper.outputs.cache-hit != 'true' - run: | - cd jasper - mkdir build-jasper && cd build-jasper - cmake .. -DCMAKE_INSTALL_PREFIX=~/jasper - make -j2 - make install - - - name: checkout-bacio - uses: actions/checkout@v3 - with: - repository: NOAA-EMC/NCEPLIBS-bacio - path: bacio - ref: develop - - - name: build-bacio - run: | - cd bacio - mkdir build - cd build - cmake .. -DCMAKE_INSTALL_PREFIX=~/bacio - make -j2 - make install - - - name: checkout-w3emc - uses: actions/checkout@v3 - with: - repository: NOAA-EMC/NCEPLIBS-w3emc - path: w3emc - ref: develop - - - name: checkout-sp - uses: actions/checkout@v3 - with: - repository: NOAA-EMC/NCEPLIBS-sp - path: sp - ref: develop - - - name: build-sp - run: | - cd sp - mkdir build - cd build - cmake .. -DCMAKE_INSTALL_PREFIX=~/sp - make -j2 - make install - - - name: checkout-ip - uses: actions/checkout@v3 - with: - repository: NOAA-EMC/NCEPLIBS-ip - path: ip - ref: develop - - - name: build-ip - run: | - cd ip - mkdir build - cd build - cmake .. -DCMAKE_INSTALL_PREFIX=~/ip -DCMAKE_PREFIX_PATH=~/sp - make -j2 - make install - - - name: checkout-g2c - uses: actions/checkout@v3 - with: - repository: NOAA-EMC/NCEPLIBS-g2c - path: g2c - ref: develop - - - name: build-g2c - run: | - cd g2c - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=~/g2c -DCMAKE_PREFIX_PATH="~/jasper" .. - make -j2 - make install - - - name: build-w3emc - run: | - cd w3emc - mkdir build - cd build - cmake -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc -DBUILD_WITH_BUFR=OFF -DBUILD_WITH_EXTRA_DEPS=ON .. - make -j2 - make install + bacio-version: develop + g2c-develop: develop + ip-version: develop + jasper-version: ${{ matrix.jasper-version }} + sp-version: develop + w3emc-version: develop + w3emc-cmake-args: -DBUILD_WITH_BUFR=OFF - name: checkout uses: actions/checkout@v3 @@ -152,7 +59,7 @@ jobs: cd g2 mkdir build cd build - cmake -DJasper_ROOT=~/jasper -DCMAKE_PREFIX_PATH="~/bacio;~/w3emc" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/g2 .. + cmake -DJasper_ROOT=$GITHUB_WORKSPACE/nceplibs/jasper -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-bacio;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-w3emc" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/g2 .. make -j2 VERBOSE=1 make install @@ -176,6 +83,7 @@ jobs: export LD_LIBRARY_PATH=/home/runner/jasper/lib export PATH="~/g2c/bin:$PATH" cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH="~/bacio;~/jasper;~/sp;~/ip;~/w3emc;~/g2;~/g2c" .. +-DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-bacio;$GITHUB_WORKSPACE/nceplibs/jasper;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-sp;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-ip;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-w3emc;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-g2;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-g2c" make -j2 VERBOSE=1 ctest --output-on-failure --rerun-failed --verbose diff --git a/.github/workflows/memcheck.yml b/.github/workflows/memcheck.yml index 9adf9566..fc6cd164 100644 --- a/.github/workflows/memcheck.yml +++ b/.github/workflows/memcheck.yml @@ -31,61 +31,13 @@ jobs: sudo apt-get update sudo apt-get install libpng-dev zlib1g-dev libjpeg-dev doxygen gcovr valgrind - - name: checkout-bacio - uses: actions/checkout@v4 - with: - repository: NOAA-EMC/NCEPLIBS-bacio - path: bacio - ref: develop - - - name: build-bacio - run: | - cd bacio - mkdir build - cd build - cmake .. -DCMAKE_INSTALL_PREFIX=~/bacio - make -j2 - make install - - - name: checkout-w3emc - uses: actions/checkout@v4 - with: - repository: NOAA-EMC/NCEPLIBS-w3emc - path: w3emc - ref: develop - - - name: build-w3emc - run: | - cd w3emc - mkdir build - cd build - cmake -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc -DBUILD_WITH_BUFR=OFF .. - make -j2 - make install - - - name: cache-jasper - id: cache-jasper - uses: actions/cache@v4 + - name: "Build dependencies" + uses: NOAA-EMC/ci-build-nceplibs@develop with: - path: ~/Jasper - key: jasper-${{ runner.os }}-4.0.0 - - - name: checkout-jasper - if: steps.cache-jasper.outputs.cache-hit != 'true' - uses: actions/checkout@v4 - with: - repository: jasper-software/jasper - path: jasper - ref: version-4.0.0 - - - name: build-jasper - if: steps.cache-jasper.outputs.cache-hit != 'true' - run: | - cd jasper - mkdir build-jasper && cd build-jasper - cmake .. -DCMAKE_INSTALL_PREFIX=~/Jasper - make -j2 - make install + bacio-version: develop + w3emc-version: develop + jasper-version: version-4.0.0 + w3emc-cmake-args: -DBUILD_WITH_BUFR=OFF - name: checkout uses: actions/checkout@v4 @@ -104,7 +56,7 @@ jobs: cd g2 mkdir build cd build - cmake -DFTP_LARGE_TEST_FILES=ON -DJasper_ROOT=~/Jasper -DCMAKE_PREFIX_PATH="~/bacio;~/w3emc" -DCMAKE_Fortran_FLAGS="-g -O0" -DCMAKE_C_FLAGS="-g -O0" -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data -DCMAKE_BUILD_TYPE=Debug .. + cmake -DFTP_LARGE_TEST_FILES=ON -DJasper_ROOT=$GITHUB_WORKSPACE/nceplibs/Jasper -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-bacio;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-w3emc" -DCMAKE_Fortran_FLAGS="-g -O0" -DCMAKE_C_FLAGS="-g -O0" -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data -DCMAKE_BUILD_TYPE=Debug .. make -j2 VERBOSE=1 - name: test_memcheck