Skip to content

Citation

Citation #145

# This job installs AGNI and SOCRATES, and tests AGNI
# This occurs when a PR to main is created
name: Tests
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
install:
runs-on: ubuntu-latest
name: install_and_test
steps:
- uses: actions/checkout@v4
# Setup system
- name: NetCDF
run: |
sudo apt update
sudo apt-get install libnetcdff-dev netcdf-bin gfortran gcc
# Setup AGNI
- name: Setup Julia
uses: julia-actions/setup-julia@v2
with:
version: '1.11'
# Setup SOCRATES
- name: Get SOCRATES
uses: actions/checkout@v4
with:
repository: 'nichollsh/SOCRATES'
path: 'SOCRATES'
- uses: actions/cache@v4
id: cache-socrates
with:
path: |
SOCRATES/bin
SOCRATES/sbin
SOCRATES/set_rad_env
key: socrates-${{ hashFiles('SOCRATES/version') }}
- name: Build SOCRATES
if: steps.cache-socrates.outputs.cache-hit != 'true'
run: |
export LD_LIBRARY_PATH=""
export RAD_DIR="/home/runner/work/AGNI/AGNI/SOCRATES"
cd $RAD_DIR
./configure
./build_code
cd ..
- name: Build AGNI
run: |
export RAD_DIR="/home/runner/work/AGNI/AGNI/SOCRATES"
export RAD_BIN="$RAD_DIR/bin/"
export LD_LIBRARY_PATH=""
julia --project=. -e 'using Pkg; Pkg.build()'
- name: Test AGNI
run: |
export RAD_DIR="/home/runner/work/AGNI/AGNI/SOCRATES"
export LD_LIBRARY_PATH=""
./test/runtests.jl