-
Notifications
You must be signed in to change notification settings - Fork 18
131 lines (127 loc) · 4.03 KB
/
workflow.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Build Tests
on:
pull_request:
types: [opened, synchronize, reopened]
# Do not run if the only files changed cannot affect the build
paths-ignore:
- "**.md"
- "**.json"
- "Python/**"
- ".github/CODEOWNERS"
- ".github/PULL_REQUEST_TEMPLATE.md"
- ".editorconfig"
jobs:
check-ford-docs:
name: Build Ford Docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and Deploy Docs
uses: ./.github/actions/deploy-ford-docs
with:
# Due to a bug in ford, for now we do *not* want to use
# the full path to the ford input file. Rather, the
# action will cd into docs/Ford and then run ford
# relative path to the ford input file.
ford-input: ford-ci.md
doc-folder: docs/Ford/ci-doc
token: ${{ secrets.GITHUB_TOKEN }}
build_test_mapl:
name: Build and Test MAPL GNU
runs-on: ubuntu-latest
container:
image: gmao/ubuntu20-geos-env-mkl:v7.27.0-openmpi_5.0.5-gcc_14.2.0
# Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495
# It seems like we might not need secrets on GitHub Actions which is good for forked
# pull requests
#credentials:
#username: ${{ secrets.DOCKERHUB_USERNAME }}
#password: ${{ secrets.DOCKERHUB_TOKEN }}
env:
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
OMPI_MCA_btl_vader_single_copy_mechanism: none
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Versions etc.
run: |
gfortran --version
mpirun --version
echo $BASEDIR
- name: Mepo clone external repos
run: |
mepo init
mepo clone
mepo status
- name: CMake
run: |
mkdir build
cd build
cmake .. -DBASEDIR=$BASEDIR/Linux -DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_BUILD_TYPE=Debug -DMPIEXEC_PREFLAGS='--oversubscribe'
- name: Build
run: |
cd build
make -j4 install
- name: Run MAPL unit tests
run: |
cd build
make -j4 build-tests
ctest -L 'ESSENTIAL' --output-on-failure
build_test_mapl_intel:
name: Build and Test MAPL Intel
runs-on: ubuntu-latest
container:
image: gmao/ubuntu20-geos-env:v7.27.0-intelmpi_2021.13-ifort_2021.13
# Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495
# It seems like we might not need secrets on GitHub Actions which is good for forked
# pull requests
#credentials:
#username: ${{ secrets.DOCKERHUB_USERNAME }}
#password: ${{ secrets.DOCKERHUB_TOKEN }}
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Versions etc.
run: |
ifort --version
mpirun --version
echo $BASEDIR
- name: Mepo clone external repos
run: |
mepo init
mepo clone
mepo status
- name: CMake
run: |
mkdir build
cd build
cmake .. -DBASEDIR=$BASEDIR/Linux -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_BUILD_TYPE=Debug
- name: Build
run: |
cd build
make -j4 install
- name: Run MAPL unit tests
run: |
cd build
make -j4 build-tests
ctest -L 'ESSENTIAL' --output-on-failure