-
Notifications
You must be signed in to change notification settings - Fork 2
152 lines (131 loc) · 4.84 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
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
---
name: CI
on:
pull_request:
branches: [develop]
env:
REPO: ${{ github.event.repository.name }}
BUNDLE: pr-${{ github.event.number }}
jobs:
build1:
if: github.repository_owner == 'MetOffice'
name: gnu 11.3.1 (UKMO)
runs-on: jedi-self-hosted-rg
steps:
# - name: view secrets context
# shell: bash
# run: echo "$SECRETS_CONTEXT"
# env:
# SECRETS_CONTEXT: ${{ toJson(secrets) }}
# - name: view vars context
# shell: bash
# run: echo "$VARS_CONTEXT"
# env:
# VARS_CONTEXT: ${{ toJson(vars) }}
- name: pre-submit cleanup
run: |
ls -la ./
rm -fr ./${{ env.BUNDLE }} || true
ls -la ./
- name: checkout current
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/${{ env.REPO }}
- name: initiate bundle
run: cp ./${{ env.BUNDLE }}/${{ env.REPO }}/ci/* ./${{ env.BUNDLE }}/
- name: checkout jedicmake
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/jedicmake
repository: JCSDA-internal/jedi-cmake
submodules: true
token: ${{ secrets.GH_PAT }}
- name: checkout oops
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/oops
repository: JCSDA-internal/oops
token: ${{ secrets.GH_PAT }}
- name: matching branch checkout attempt oops ${{ github.head_ref }}
if: github.event_name == 'pull_request'
run: ./${{ env.BUNDLE }}/get-ref-branch ./${{ env.BUNDLE }}/oops
- name: build and test
run: |
az acr login --name ngmssboxjediacr
(cd ${PWD}/${BUNDLE} && ln -sfT /testdata/model-interface-data)
# docker run --rm \
# --entrypoint=/usr/local/src/${REPO}/${BUNDLE}/build-and-test \
# --workdir=/usr/local/src/${REPO}/${BUNDLE} \
# --volume ${PWD}/${BUNDLE}:/usr/local/src/${REPO}/${BUNDLE} \
# --volume ${{ runner.tool_cache }}/model-interface-data:/var/tmp/model-interface-data \
# 'ngmssboxjediacr.azurecr.io/jedibase:alma9' \
# && cd ${{ github.workspace }} \
# && rm -fr ${{ env.BUNDLE }}
build2:
if: '! github.event.pull_request.draft'
name: gnu 9.4.0 (JCSDA)
runs-on: ubuntu-latest
steps:
- name: checkout current
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/${{ env.REPO }}
- name: initiate bundle
run: cp ./${{ env.BUNDLE }}/${{ env.REPO }}/ci/* ./${{ env.BUNDLE }}/
- name: checkout jedicmake
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/jedicmake
repository: JCSDA-internal/jedi-cmake
submodules: true
token: ${{ secrets.GH_PAT }}
- name: checkout oops
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/oops
repository: JCSDA-internal/oops
token: ${{ secrets.GH_PAT }}
- name: matching branch checkout attempt oops ${{ github.head_ref }}
if: github.event_name == 'pull_request'
run: ./${{ env.BUNDLE }}/get-ref-branch ./${{ env.BUNDLE }}/oops
- name: build and lint
run: |
docker run --rm \
--entrypoint=/usr/local/src/${REPO}/${BUNDLE}/build-and-lint \
--workdir=/usr/local/src/${REPO}/${BUNDLE} \
--volume ${PWD}/${BUNDLE}:/usr/local/src/${REPO}/${BUNDLE} \
'jcsda/docker-gnu-openmpi-dev:latest'
build3:
if: '! github.event.pull_request.draft'
name: clang 10.0.0 (JCSDA)
runs-on: ubuntu-latest
steps:
- name: checkout current
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/${{ env.REPO }}
- name: initiate bundle
run: cp ./${{ env.BUNDLE }}/${{ env.REPO }}/ci/* ./${{ env.BUNDLE }}/
- name: checkout jedicmake
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/jedicmake
repository: JCSDA-internal/jedi-cmake
submodules: true
token: ${{ secrets.GH_PAT }}
- name: checkout oops
uses: actions/checkout@v4
with:
path: ./${{ env.BUNDLE }}/oops
repository: JCSDA-internal/oops
token: ${{ secrets.GH_PAT }}
- name: matching branch checkout attempt oops ${{ github.head_ref }}
if: github.event_name == 'pull_request'
run: ./${{ env.BUNDLE }}/get-ref-branch ./${{ env.BUNDLE }}/oops
- name: build and lint
run: |
docker run --rm \
--entrypoint=/usr/local/src/${REPO}/${BUNDLE}/build-and-lint \
--workdir=/usr/local/src/${REPO}/${BUNDLE} \
--volume ${PWD}/${BUNDLE}:/usr/local/src/${REPO}/${BUNDLE} \
'jcsda/docker-clang-mpich-dev:latest'