-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
372 additions
and
255 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,125 @@ | ||
# This is the Linux_options workflow for the wgrib2 project. This | ||
# tests different wgrib2 build options. | ||
# | ||
# Ed Hartnett, 3/27/24 | ||
name: Linux_options | ||
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: | ||
Linux_options: | ||
runs-on: ubuntu-latest | ||
env: | ||
FC: gfortran | ||
CC: gcc | ||
|
||
strategy: | ||
# fail-fast: true | ||
matrix: | ||
config: | ||
- { | ||
options: "-DUSE_IPOLATES=1" | ||
} | ||
|
||
steps: | ||
|
||
- name: install | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libnetcdf-dev libnetcdff-dev netcdf-bin pkg-config | ||
sudo apt-get install libpng-dev autotools-dev autoconf | ||
- name: checkout-jasper | ||
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 | ||
./configure --prefix=$HOME/Jasper | ||
make | ||
make install | ||
- name: checkout-sp | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: NOAA-EMC/NCEPLIBS-sp | ||
path: sp | ||
ref: v2.3.3 | ||
|
||
- name: build-sp | ||
run: | | ||
cd sp | ||
mkdir build | ||
cd build | ||
cmake -DCMAKE_INSTALL_PREFIX=~/sp -DBUILD_8=ON .. | ||
make -j2 | ||
make install | ||
- name: cache-ip | ||
id: cache-ip | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/ip | ||
key: ip-${{ runner.os }}-${{ matrix.ip-version }} | ||
|
||
- name: checkout-ip | ||
if: steps.cache-ip.outputs.cache-hit != 'true' | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: NOAA-EMC/NCEPLIBS-ip | ||
path: ip | ||
ref: v3.3.3 | ||
|
||
- 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-ip2 | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: NOAA-EMC/NCEPLIBS-ip2 | ||
path: ip2 | ||
ref: develop | ||
|
||
- name: build-ip2 | ||
run: | | ||
cd ip2 | ||
mkdir build | ||
cd build | ||
cmake .. -DCMAKE_INSTALL_PREFIX=~/ip2 -DCMAKE_PREFIX_PATH=~ | ||
make -j2 | ||
make install | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
path: wgrib2 | ||
|
||
- name: build | ||
run: | | ||
cd wgrib2 | ||
mkdir b | ||
cd b | ||
cmake ${{ matrix.config.options }} -DCMAKE_PREFIX_PATH="~/sp;~/ip;~/ip2" .. | ||
make VERBOSE=1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.2.0 |
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,30 @@ | ||
# This is the CMake file for the test directory in the wgrib2 | ||
# project. | ||
# | ||
# Ed Hartnett 3/27/24 | ||
|
||
# Run each shell test. | ||
function(shell_test name) | ||
# Copy the test scripts. | ||
file(COPY "${CMAKE_SOURCE_DIR}/tests/${name}.sh" | ||
DESTINATION ${CMAKE_BINARY_DIR}/tests | ||
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) | ||
# Add the shell script as a test. | ||
add_test(NAME ${name}.sh COMMAND bash ${name}.sh) | ||
endfunction() | ||
|
||
# Some very small test files may be committed to the repo. This | ||
# function copies such a data file to the build directory. | ||
function(copy_test_data name) | ||
message(STATUS "Copying test file ${name}") | ||
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/data/${name}" | ||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/data | ||
FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) | ||
endfunction() | ||
|
||
# Copy test data file into buiild directory for testing. | ||
copy_test_data(gdaswave.t00z.wcoast.0p16.f000.grib2) | ||
copy_test_data(ref_gdaswave.t00z.wcoast.0p16.f000.grib2.inv) | ||
|
||
# Run these shell tests. | ||
shell_test(run_wgrib2_tests) |
Binary file not shown.
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,19 @@ | ||
1:0:d=2021113000:WIND:surface:anl: | ||
2:15254:d=2021113000:WDIR:surface:anl: | ||
3:37897:d=2021113000:UGRD:surface:anl: | ||
4:53794:d=2021113000:VGRD:surface:anl: | ||
5:69064:d=2021113000:HTSGW:surface:anl: | ||
6:79482:d=2021113000:PERPW:surface:anl: | ||
7:91308:d=2021113000:DIRPW:surface:anl: | ||
8:108541:d=2021113000:WVHGT:surface:anl: | ||
9:116716:d=2021113000:SWELL:1 in sequence:anl: | ||
10:128832:d=2021113000:SWELL:2 in sequence:anl: | ||
11:140848:d=2021113000:SWELL:3 in sequence:anl: | ||
12:151732:d=2021113000:WVPER:surface:anl: | ||
13:161021:d=2021113000:SWPER:1 in sequence:anl: | ||
14:173676:d=2021113000:SWPER:2 in sequence:anl: | ||
15:189425:d=2021113000:SWPER:3 in sequence:anl: | ||
16:205285:d=2021113000:WVDIR:surface:anl: | ||
17:218263:d=2021113000:SWDIR:1 in sequence:anl: | ||
18:237035:d=2021113000:SWDIR:2 in sequence:anl: | ||
19:259223:d=2021113000:SWDIR:3 in sequence:anl: |
Oops, something went wrong.