From ed39842d5d97b4d19eb153c9f39d0ffb5c0d4404 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Thu, 7 Mar 2024 16:17:06 -0500 Subject: [PATCH 1/3] Add GitHub workflow for compile-only integration tests .github/workflows/gcclassic-compile-tests.yml - Workflow YAML file that invokes a set of compile-only tests (i.e. integration tests with "-s none") NOTE: Further updates may be necessary to tweak this. CHANGELOG.md - Updated accordingly Signed-off-by: Bob Yantosca --- .github/workflows/gcclassic-compile-tests.yml | 33 +++++++++++++++++++ CHANGELOG.md | 3 ++ 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/gcclassic-compile-tests.yml diff --git a/.github/workflows/gcclassic-compile-tests.yml b/.github/workflows/gcclassic-compile-tests.yml new file mode 100644 index 0000000..0bd61fa --- /dev/null +++ b/.github/workflows/gcclassic-compile-tests.yml @@ -0,0 +1,33 @@ +name: gcclassic-compile-tests + +on: [pull_request, push] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + cancel-in-progress: true + +jobs: + gnu: + runs-on: ubuntu-latest + strategy: + matrix: + build_type: [Debug, Release] + env: + CXX: g++ + CC: gcc + FC: gfortran + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt update -y + sudo apt install -y libnetcdf-dev netcdf-bin libnetcdff-dev + + - name: Compile-only tests + run: | + git submodule update --init --recursive + cd test/integration/GCClassic + ./integrationTest.sh -d /test -s none -e ~/.bashrc diff --git a/CHANGELOG.md b/CHANGELOG.md index 11a9b21..f9164e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ This file documents all notable changes to the GEOS-Chem Classic wrapper reposit The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] - TBD +### Added +- GitHub action to perform compile-only integration tests + ### Changed - Now use short submodule names (i.e. without the full path) in `.gitmodules` From c77c519dbb18d178ca742913fce2e7fba17105dc Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Tue, 12 Mar 2024 10:54:45 -0400 Subject: [PATCH 2/3] Update GitHub Actions YAML file, fix typo in changelog .github/workflows/gcclassic-compile-tests.yml - Updated the command that calls integrationTest.sh to consistent with https://github.com/geoschem/geos-chem/pull/2187 CHANGELOG.md - Fix typo: "integrationt" -> "integration Signed-off-by: Bob Yantosca --- .github/workflows/gcclassic-compile-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gcclassic-compile-tests.yml b/.github/workflows/gcclassic-compile-tests.yml index 0bd61fa..f65ac27 100644 --- a/.github/workflows/gcclassic-compile-tests.yml +++ b/.github/workflows/gcclassic-compile-tests.yml @@ -30,4 +30,4 @@ jobs: run: | git submodule update --init --recursive cd test/integration/GCClassic - ./integrationTest.sh -d /test -s none -e ~/.bashrc + ./integrationTest.sh -d /GCC_it -t compile From ccfb727539dcf450340911fda249d8ed9134d80c Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Fri, 22 Mar 2024 14:12:24 -0400 Subject: [PATCH 3/3] Fixes to GitHub action for compile-only tests .github/workflows/gcclassic-compile-tests.yml - Changed build_type to just use Debug (since the ITs require debug) - Now use $HOME/compile-tests as the integration test folder - Display the results.compile.log after the job finishes Signed-off-by: Bob Yantosca --- .github/workflows/gcclassic-compile-tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gcclassic-compile-tests.yml b/.github/workflows/gcclassic-compile-tests.yml index f65ac27..0c0a552 100644 --- a/.github/workflows/gcclassic-compile-tests.yml +++ b/.github/workflows/gcclassic-compile-tests.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - build_type: [Debug, Release] + build_type: [Debug] env: CXX: g++ CC: gcc @@ -30,4 +30,5 @@ jobs: run: | git submodule update --init --recursive cd test/integration/GCClassic - ./integrationTest.sh -d /GCC_it -t compile + ./integrationTest.sh -d $HOME/compile-tests -t compile + cat $HOME/compile-tests/logs/results.compile.log