-
Notifications
You must be signed in to change notification settings - Fork 13
41 lines (33 loc) · 1.12 KB
/
CI.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
name: eCLM CI Test
# Controls when the action will run.
on: [push, pull_request]
jobs:
eclm_build_job:
runs-on: ubuntu-22.04
env:
CC: mpicc
FC: mpifort
BUILD_DIR: bld
INSTALL_DIR: install
CMAKE_BUILD_PARALLEL_LEVEL: 4
steps:
- uses: actions/checkout@v4
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libxml2-utils pylint wget cmake netcdf-bin libnetcdf-dev libnetcdff-dev libpnetcdf-dev
version: 1.0
execute_install_scripts: true
- name: Download MPI Fortran compiler
run: sudo apt-get install gfortran openmpi-bin libopenmpi-dev
- name: Configure eCLM
run: |
cmake -S src -B $BUILD_DIR \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
-DCMAKE_C_COMPILER=$CC \
-DCMAKE_Fortran_COMPILER=$FC
- name: Build eCLM
run: cmake --build $BUILD_DIR
- name: Install eCLM
run: cmake --install $BUILD_DIR
- name: Install eCLM namelist generator
run: pip3 install --user ./namelist_generator