-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #316 from AlysonStahl-NOAA/as_build
Fix library build issues and test on MacOS
- Loading branch information
Showing
5 changed files
with
168 additions
and
85 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# This is a GitHub actions workflow for wgrib2. | ||
# | ||
# This builds the develop branch on MacOS. | ||
# | ||
# Alyson Stahl, 2/11/2025 | ||
name: MacOS | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
# Cancel in-progress workflows when pushing to a branch | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
MacOS: | ||
runs-on: macos-latest | ||
env: | ||
FC: gfortran-12 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ccompiler: [gcc, clang] | ||
sharedlib: [ON, OFF] | ||
jasper: [ON, OFF] | ||
openjpeg: [ON, OFF] | ||
exclude: | ||
- jasper: ON | ||
openjpeg: ON | ||
- jasper: OFF | ||
openjpeg: OFF | ||
|
||
steps: | ||
- name: install-dependencies | ||
run: | | ||
find /Library/Frameworks/ -name "png*" | ||
sudo rm -rf /Library/Frameworks/Mono.framework | ||
brew install jasper libpng jpeg-turbo openjpeg libaec libomp | ||
- name: "Build dependencies" | ||
uses: NOAA-EMC/ci-build-nceplibs@develop | ||
with: | ||
g2c-version: develop | ||
g2c-cmake-args: -DUSE_OpenJPEG=${{matrix.openjpeg}} -DUSE_Jasper=${{matrix.jasper}} | ||
ip-version: develop | ||
|
||
- name: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: wgrib2 | ||
|
||
- name: build | ||
run: | | ||
cd wgrib2 | ||
mkdir build | ||
cd build | ||
#export CFLAGS='-I/Users/runner/work/wgrib2/wgrib2/nceplibs/NCEPLIBS-g2c/include' | ||
cmake -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/jasper;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-g2c;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-ip" .. -DUSE_AEC=ON -DUSE_PNG=ON -DUSE_JASPER=${{matrix.jasper}} -DUSE_OPENJPEG=${{matrix.openjpeg}} -DBUILD_SHARED_LIB=${{matrix.sharedlib}} -DMAKE_FTN_API=ON | ||
make VERBOSE=1 | ||
- name: test | ||
run: | | ||
cd $GITHUB_WORKSPACE/wgrib2/build | ||
ctest --verbose --output-on-failure --rerun-failed |
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 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 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 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