From 4e2064952b3ccbb7e2cfab41d80186cb330ed799 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Thu, 18 Jul 2024 06:33:17 -0600 Subject: [PATCH 1/9] test --- docs/user_guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user_guide.md b/docs/user_guide.md index c88d4a74..7f2837db 100644 --- a/docs/user_guide.md +++ b/docs/user_guide.md @@ -2,7 +2,7 @@ # Introduction -This document briefly describes wgrib2. +This document briefly describes wgrib2. Test... ## Documentation for Previous Versions of wgrib2 From 88ed02f9b5973895879764038c4804c143a3276e Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Thu, 18 Jul 2024 06:46:22 -0600 Subject: [PATCH 2/9] experimenting with CI --- .github/workflows/developer.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/developer.yml b/.github/workflows/developer.yml index bdb2929b..c2308070 100644 --- a/.github/workflows/developer.yml +++ b/.github/workflows/developer.yml @@ -163,6 +163,14 @@ jobs: wgrib2/build/*.html wgrib2/build/*.css + - name: Upload Artifact + if: github.ref == 'refs/heads/main' + uses: actions/upload-pages-artifact@v1 + with: + path: | + wgrib2/build/*.html + wgrib2/build/*.css + - name: Upload built documentation uses: actions/upload-pages-artifact@v1 with: @@ -171,3 +179,21 @@ jobs: - name: Deploy uses: actions/deploy-pages@v1 + deploy-coverage: + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + needs: developer + + permissions: + pages: write + id-token: write + + environment: + # environment created automatically by GitHub + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 From fbacfe135fb733dca5737818564904d6db706c66 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Thu, 18 Jul 2024 06:53:24 -0600 Subject: [PATCH 3/9] experimenting with CI --- .github/workflows/developer.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/developer.yml b/.github/workflows/developer.yml index c2308070..4d044ae3 100644 --- a/.github/workflows/developer.yml +++ b/.github/workflows/developer.yml @@ -164,7 +164,7 @@ jobs: wgrib2/build/*.css - name: Upload Artifact - if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/develop' uses: actions/upload-pages-artifact@v1 with: path: | @@ -180,7 +180,7 @@ jobs: uses: actions/deploy-pages@v1 deploy-coverage: - if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/develop' runs-on: ubuntu-latest needs: developer From 78ef884a1f67ef488bcbcb732fffcbb8abb70213 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Thu, 18 Jul 2024 06:57:40 -0600 Subject: [PATCH 4/9] experimenting with CI --- .github/workflows/dev2.yml | 199 ++++++++++++++++++++++++++++++++ .github/workflows/developer.yml | 26 ----- 2 files changed, 199 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/dev2.yml diff --git a/.github/workflows/dev2.yml b/.github/workflows/dev2.yml new file mode 100644 index 00000000..a251e176 --- /dev/null +++ b/.github/workflows/dev2.yml @@ -0,0 +1,199 @@ +# This is the developer workflow for the wgrib2 project. +# +# Kyle Gerheiser, Ed Hartnett +name: dev2 +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: + dev2: + runs-on: ubuntu-latest + env: + FC: gfortran + CC: gcc + + permissions: + id-token: write + pages: write + + 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 libaec-dev autoconf gcovr doxygen + + - name: cache-jasper + id: cache-jasper + uses: actions/cache@v4 + with: + path: ~/jasper + key: jasper-${{ runner.os }}-1.900.1 + + - name: checkout-jasper + if: steps.cache-jasper.outputs.cache-hit != 'true' + uses: actions/checkout@v4 + 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@v4 + 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 -DBUILD_8=ON .. + make -j2 + make install + + - name: checkout-ip + uses: actions/checkout@v4 + with: + repository: NOAA-EMC/NCEPLIBS-ip + path: ip + ref: v3.3.3 + + - 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-ip2 + uses: actions/checkout@v4 + 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-ip + uses: actions/checkout@v4 + 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 + uses: actions/checkout@v4 + with: + path: wgrib2 + + - name: cache-data + id: cache-data + uses: actions/cache@v4 + with: + path: ~/data + key: data-2 + + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: build + run: | + cd wgrib2 + mkdir build + cd build + export CFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0' + 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;~/ip2;~/sp" -DTEST_FILE_DIR=/home/runner/data -DUSE_NETCDF4=ON -DUSE_AEC=ON -DUSE_IPOLATES=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 + + - name: cache-data + if: steps.cache-data.outputs.cache-hit != 'true' + run: | + mkdir ~/data + cp $GITHUB_WORKSPACE/wgrib2/build/tests/data/* ~/data + + - name: upload-test-coverage + uses: actions/upload-artifact@v4 + with: + name: wgrib2-test-coverage + path: | + wgrib2/build/*.html + wgrib2/build/*.css + + - name: Upload Artifact + if: github.ref == 'refs/heads/develop' + uses: actions/upload-pages-artifact@v1 + with: + path: | + wgrib2/build/*.html + wgrib2/build/*.css + + - name: Upload built documentation + uses: actions/upload-pages-artifact@v1 + with: + path: wgrib2/build/docs/html # Path to the built site files + + - name: Deploy + uses: actions/deploy-pages@v1 + + deploy-coverage: + if: github.ref == 'refs/heads/develop' + runs-on: ubuntu-latest + needs: dev2 + + permissions: + pages: write + id-token: write + + environment: + # environment created automatically by GitHub + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/.github/workflows/developer.yml b/.github/workflows/developer.yml index 4d044ae3..bdb2929b 100644 --- a/.github/workflows/developer.yml +++ b/.github/workflows/developer.yml @@ -163,14 +163,6 @@ jobs: wgrib2/build/*.html wgrib2/build/*.css - - name: Upload Artifact - if: github.ref == 'refs/heads/develop' - uses: actions/upload-pages-artifact@v1 - with: - path: | - wgrib2/build/*.html - wgrib2/build/*.css - - name: Upload built documentation uses: actions/upload-pages-artifact@v1 with: @@ -179,21 +171,3 @@ jobs: - name: Deploy uses: actions/deploy-pages@v1 - deploy-coverage: - if: github.ref == 'refs/heads/develop' - runs-on: ubuntu-latest - needs: developer - - permissions: - pages: write - id-token: write - - environment: - # environment created automatically by GitHub - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 From 689e9f9d933b574918a98a28160793d4d2d2da7d Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Thu, 18 Jul 2024 07:15:53 -0600 Subject: [PATCH 5/9] experimenting with CI --- .github/workflows/dev2.yml | 101 +------------------------------- .github/workflows/developer.yml | 5 -- 2 files changed, 3 insertions(+), 103 deletions(-) diff --git a/.github/workflows/dev2.yml b/.github/workflows/dev2.yml index a251e176..80ebbc2a 100644 --- a/.github/workflows/dev2.yml +++ b/.github/workflows/dev2.yml @@ -6,9 +6,6 @@ on: push: branches: - develop - pull_request: - branches: - - develop # Cancel in-progress workflows when pushing to a branch concurrency: @@ -57,70 +54,22 @@ jobs: make make install - - name: checkout-sp - uses: actions/checkout@v4 - 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 -DBUILD_8=ON .. - make -j2 - make install - - name: checkout-ip uses: actions/checkout@v4 with: repository: NOAA-EMC/NCEPLIBS-ip path: ip - ref: v3.3.3 + ref: v5.0.0 - name: build-ip run: | cd ip mkdir build cd build - cmake .. -DCMAKE_INSTALL_PREFIX=~/ip -DCMAKE_PREFIX_PATH=~/sp + cmake .. -DCMAKE_INSTALL_PREFIX=~/ip make -j2 make install - - name: checkout-ip2 - uses: actions/checkout@v4 - 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-ip - uses: actions/checkout@v4 - 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 uses: actions/checkout@v4 with: @@ -141,36 +90,9 @@ jobs: cd wgrib2 mkdir build cd build - export CFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0' - 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;~/ip2;~/sp" -DTEST_FILE_DIR=/home/runner/data -DUSE_NETCDF4=ON -DUSE_AEC=ON -DUSE_IPOLATES=ON + cmake .. -DENABLE_DOCS=ON -DCMAKE_PREFIX_PATH="~/ip" 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 - - name: cache-data - if: steps.cache-data.outputs.cache-hit != 'true' - run: | - mkdir ~/data - cp $GITHUB_WORKSPACE/wgrib2/build/tests/data/* ~/data - - - name: upload-test-coverage - uses: actions/upload-artifact@v4 - with: - name: wgrib2-test-coverage - path: | - wgrib2/build/*.html - wgrib2/build/*.css - - - name: Upload Artifact - if: github.ref == 'refs/heads/develop' - uses: actions/upload-pages-artifact@v1 - with: - path: | - wgrib2/build/*.html - wgrib2/build/*.css - - name: Upload built documentation uses: actions/upload-pages-artifact@v1 with: @@ -179,21 +101,4 @@ jobs: - name: Deploy uses: actions/deploy-pages@v1 - deploy-coverage: - if: github.ref == 'refs/heads/develop' - runs-on: ubuntu-latest - needs: dev2 - - permissions: - pages: write - id-token: write - environment: - # environment created automatically by GitHub - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 diff --git a/.github/workflows/developer.yml b/.github/workflows/developer.yml index bdb2929b..1bddfd9a 100644 --- a/.github/workflows/developer.yml +++ b/.github/workflows/developer.yml @@ -133,9 +133,6 @@ jobs: path: ~/data key: data-2 - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: build run: | cd wgrib2 @@ -168,6 +165,4 @@ jobs: with: path: wgrib2/build/docs/html # Path to the built site files - - name: Deploy - uses: actions/deploy-pages@v1 From 5ae93896c98d6ba7c70c4ac4c7193499e3bc8cfd Mon Sep 17 00:00:00 2001 From: Ed Date: Thu, 18 Jul 2024 08:01:32 -0600 Subject: [PATCH 6/9] testing more --- docs/user_guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user_guide.md b/docs/user_guide.md index 7f2837db..900e8215 100644 --- a/docs/user_guide.md +++ b/docs/user_guide.md @@ -2,7 +2,7 @@ # Introduction -This document briefly describes wgrib2. Test... +This document briefly describes wgrib2. Test... test ## Documentation for Previous Versions of wgrib2 From 8ff62d7168a896becb65afc19fefa1c78bf6cdf6 Mon Sep 17 00:00:00 2001 From: Ed Date: Thu, 18 Jul 2024 09:04:54 -0600 Subject: [PATCH 7/9] fixing user_guide --- docs/user_guide.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/user_guide.md b/docs/user_guide.md index 900e8215..5e93bb56 100644 --- a/docs/user_guide.md +++ b/docs/user_guide.md @@ -2,7 +2,8 @@ # Introduction -This document briefly describes wgrib2. Test... test +This document briefly describes wgrib2, which provides functionality +for interacting with, reading, writing, and manipulating GRIB2 files. ## Documentation for Previous Versions of wgrib2 From c030fab4abeeafb0e8e5dbea227a18d98d6a1380 Mon Sep 17 00:00:00 2001 From: Ed Date: Thu, 18 Jul 2024 09:06:04 -0600 Subject: [PATCH 8/9] fixing user_guide --- .github/workflows/dev2.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev2.yml b/.github/workflows/dev2.yml index 80ebbc2a..a2f1c0a0 100644 --- a/.github/workflows/dev2.yml +++ b/.github/workflows/dev2.yml @@ -1,6 +1,7 @@ -# This is the developer workflow for the wgrib2 project. +# This workflow builds the docs and uploads them to gh-pages branch +# for the wgrib2 project. # -# Kyle Gerheiser, Ed Hartnett +# Ed Hartnett name: dev2 on: push: From 074ba569f7a2379edbe7b8d365dac8fdbdcee547 Mon Sep 17 00:00:00 2001 From: Ed Date: Thu, 18 Jul 2024 09:08:00 -0600 Subject: [PATCH 9/9] rename yml --- .github/workflows/{dev2.yml => docs.yml} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{dev2.yml => docs.yml} (99%) diff --git a/.github/workflows/dev2.yml b/.github/workflows/docs.yml similarity index 99% rename from .github/workflows/dev2.yml rename to .github/workflows/docs.yml index a2f1c0a0..03759b69 100644 --- a/.github/workflows/dev2.yml +++ b/.github/workflows/docs.yml @@ -2,7 +2,7 @@ # for the wgrib2 project. # # Ed Hartnett -name: dev2 +name: docs on: push: branches: @@ -14,7 +14,7 @@ concurrency: cancel-in-progress: true jobs: - dev2: + docs: runs-on: ubuntu-latest env: FC: gfortran