-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (58 loc) · 1.65 KB
/
install_and_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# 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