Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 43 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04] # NB: macos testing temporarily deactivated
fortran: [11, 12, 13]
os: [macos-13]
fortran: [12]
# compiler versions not available for specific runners
exclude:
- os: ubuntu-22.04
fortran: 13
# exclude:
# - os: ubuntu-22.04
# fortran: 13
fail-fast: false
permissions:
contents: read
Expand Down Expand Up @@ -86,8 +86,8 @@ jobs:
run: sudo apt-get install gfortran-11

# gfortran on macos
- name: Install gfortran-10 and gfortran-11 (macos-13)
if: matrix.os == 'macos-13' && (matrix.fortran == 10 || matrix.fortran == 11)
- name: Install gfortran-11 (macos-13)
if: matrix.os == 'macos-13' && matrix.fortran == 11
run: brew install gcc@${{ matrix.fortran }}

# -------------------------------------------------------------
Expand All @@ -107,13 +107,13 @@ jobs:
- name: Install numdiff
run: ./tools/install/install_numdiff.sh $PWD

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
# - name: Setup Ruby
# uses: ruby/setup-ruby@v1
# with:
# ruby-version: '3.0'

- name: Install FRUIT
run: ./tools/install/install_fruit.sh $PWD
# - name: Install FRUIT
# run: ./tools/install/install_fruit.sh $PWD

# -------------------------------------------------------------
# (4) Build AtChem2 using the standard compilation flags
Expand All @@ -137,40 +137,47 @@ jobs:
# (5) Run the Testsuite using the standard compilation flags and
# the default model settings

- name: Indent and Style tests
run: |
make indenttest
make styletest
# - name: Indent and Style tests
# run: |
# make indenttest
# make styletest

- name: Unit and Model tests
env:
FORT_VERSION: ${{ matrix.fortran }}
continue-on-error: true
run: |
export PATH=$PATH:$PWD/numdiff/bin
make unittests
make oldtests # NB: oldtests will eventually be merged into modeltests
# make unittests
# make oldtests # NB: oldtests will eventually be merged into modeltests
make modeltests

- name: Save logfile as artifact
uses: actions/upload-artifact@v4
with:
name: modeltests.log
path: tests/modeltests.log

# -------------------------------------------------------------
# (6) Recompile AtChem2 using the code coverage compilation flags,
# run the Testsuite and upload the gcov files to Codecov
#
# ACTION: https://github.com/marketplace/actions/codecov

- name: Unit and Model tests (x Codecov)
if: matrix.os == 'ubuntu-24.04' && matrix.fortran == 13
env:
FORT_VERSION: ${{ matrix.fortran }}
run: |
export PATH=$PATH:$PWD/numdiff/bin
make clean
# unit tests
make unittests CCOV=true
mv tests/unit_tests/*.gc* ./ # for gcc>=11 handling of *.gcda, *.gcna files
# model tests
make modeltests CCOV=true # run only the new Testsuite
find ./ -name "*.gc*"

- name: Upload coverage reports to Codecov
if: matrix.os == 'ubuntu-24.04' && matrix.fortran == 13
uses: codecov/codecov-action@v5
# - name: Unit and Model tests (x Codecov)
# if: matrix.os == 'ubuntu-24.04' && matrix.fortran == 13
# env:
# FORT_VERSION: ${{ matrix.fortran }}
# run: |
# export PATH=$PATH:$PWD/numdiff/bin
# make clean
# # unit tests
# make unittests CCOV=true
# mv tests/unit_tests/*.gc* ./ # for gcc>=11 handling of *.gcda, *.gcna files
# # model tests
# make modeltests CCOV=true # run only the new Testsuite
# find ./ -name "*.gc*"

# - name: Upload coverage reports to Codecov
# if: matrix.os == 'ubuntu-24.04' && matrix.fortran == 13
# uses: codecov/codecov-action@v5
2 changes: 1 addition & 1 deletion tests/makefile.tests
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ OLDTESTS := $(shell ls -d tests/tests/*/ | sed 's,tests/tests/,,g' | sed 's,/,,g

# search `tests/model_tests/` for all subdirectories, which should reflect the full list of model tests
MODELTESTDIR = tests/model_tests
MODELTESTS := $(shell ls -d tests/model_tests/*/ | sed 's,tests/model_tests/,,g' | sed 's,/,,g')
MODELTESTS := env_model_1 #$(shell ls -d tests/model_tests/*/ | sed 's,tests/model_tests/,,g' | sed 's,/,,g')

# ==================== Makefile rules ==================== #

Expand Down
Loading