Skip to content

Commit

Permalink
CI updates
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderRichert-NOAA committed May 17, 2024
1 parent 68f3445 commit 2677a55
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 600 deletions.
92 changes: 14 additions & 78 deletions .github/workflows/Intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
97 changes: 8 additions & 89 deletions .github/workflows/Linux_options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
101 changes: 10 additions & 91 deletions .github/workflows/Linux_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading

0 comments on commit 2677a55

Please sign in to comment.