Skip to content

Commit

Permalink
Merge pull request NOAA-EMC#277 from AlysonStahl-NOAA/as_ci
Browse files Browse the repository at this point in the history
CI updates
  • Loading branch information
AlysonStahl-NOAA authored Nov 13, 2024
2 parents d8ddcaf + dbee0aa commit 345da2a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 120 deletions.
72 changes: 8 additions & 64 deletions .github/workflows/Linux_options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,69 +57,12 @@ jobs:
echo "CC=gcc-${{ matrix.gcc-version }}" >> $GITHUB_ENV
echo "FC=gfortran-${{ matrix.gcc-version }}" >> $GITHUB_ENV
- 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 }}-gcc${{ matrix.gcc-version }}-1.900.1

- name: checkout-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: jasper-software/jasper
path: jasper
ref: version-1.900.1

- name: build-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
run: |
cd jasper
CFLAGS="-Wno-implicit-function-declaration -Wno-incompatible-pointer-types" ./configure --prefix=$HOME/jasper
make
make install
- name: cache-ip
id: cache-ip
uses: actions/cache@v3
with:
path: ~/ip
key: ip-${{ runner.os }}-gcc${{ matrix.gcc-version }}-develop

- name: checkout-ip
if: steps.cache-ip.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: NOAA-EMC/NCEPLIBS-ip
path: ip
ref: develop

- name: build-ip
if: steps.cache-ip.outputs.cache-hit != 'true'
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@v4
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 -DUSE_OpenJPEG=ON -DUSE_Jasper=OFF
make -j2
make install
ip-version: develop
g2c-version: develop
g2c-cmake-args: -DUSE_OpenJPEG=ON -DUSE_Jasper=OFF

- name: checkout
uses: actions/checkout@v2
Expand All @@ -131,7 +74,8 @@ jobs:
cd wgrib2
mkdir b
cd b
export CFLAGS='-I/home/runner/g2c/include'
cmake ${{ matrix.config.options }} -DCMAKE_PREFIX_PATH="~/ip;~/g2c" ..
export CFLAGS='-I/home/runner/work/wgrib2/wgrib2/nceplibs/NCEPLIBS-g2c/include'
cmake ${{ matrix.config.options }} -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-ip;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-g2c" ..
make VERBOSE=1
ctest --verbose --output-on-failure --rerun-failed
64 changes: 8 additions & 56 deletions .github/workflows/developer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
env:
FC: gfortran
CC: gcc
LD_LIBRARY_PATH: "/home/runner/jasper/lib/"
LD_LIBRARY_PATH: "/home/runner/work/wgrib2/wgrib2/nceplibs/jasper/lib/"

permissions:
id-token: write
Expand All @@ -35,60 +35,12 @@ jobs:
sudo apt-get install libnetcdf-dev libnetcdff-dev netcdf-bin pkg-config libopenblas-dev
sudo apt-get install libpng-dev autotools-dev libaec-dev autoconf gcovr doxygen
- name: cache-jasper
id: cache-jasper
uses: actions/cache@v4
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
cmake -B build_dir -DCMAKE_INSTALL_PREFIX=~/jasper
cmake --build build_dir
cmake --install build_dir
- name: checkout-ip
uses: actions/checkout@v4
- name: "Build dependencies"
uses: NOAA-EMC/ci-build-nceplibs@develop
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=~
make -j2
make install
- name: checkout-g2c
uses: actions/checkout@v4
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
jasper-version: version-4.0.0
ip-version: develop
g2c-version: develop

- name: checkout
uses: actions/checkout@v4
Expand All @@ -107,10 +59,10 @@ jobs:
cd wgrib2
mkdir build
cd build
export CFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -I/home/runner/g2c/include'
export CFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -I/home/runner/work/wgrib2/wgrib2/nceplibs/NCEPLIBS-g2c/include'
export FCFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0'
export FFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0'
cmake .. -DENABLE_DOCS=ON -DFTP_TEST_FILES=ON -DCMAKE_PREFIX_PATH="~/ip;~/jasper;~/g2c" -DTEST_FILE_DIR=/home/runner/data -DUSE_NETCDF4=ON -DUSE_AEC=ON -DUSE_IPOLATES=ON -DUSE_JASPER=ON -DMAKE_FTN_API=ON
cmake .. -DENABLE_DOCS=ON -DFTP_TEST_FILES=ON -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-ip;$GITHUB_WORKSPACE/nceplibs/jasper;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-g2c" -DTEST_FILE_DIR=/home/runner/data -DMAKE_FTN_API=ON -DUSE_NETCDF4=ON -DUSE_AEC=ON -DUSE_IPOLATES=ON -DUSE_JASPER=ON
make VERBOSE=1
ctest --verbose --output-on-failure --rerun-failed
gcovr --root .. -v --html-details --exclude ../tests --exclude CMakeFiles --print-summary -o test-coverage.html &> /dev/null
Expand Down

0 comments on commit 345da2a

Please sign in to comment.