1
- name : Calibration
1
+ name : " Calibration (reusable) "
2
2
3
3
on :
4
+ workflow_call :
5
+ inputs :
6
+ commit :
7
+ description : ' 40-character commit hash'
8
+ required : true
9
+ default : ' '
10
+ type : string
11
+ model :
12
+ description : ' Model'
13
+ required : true
14
+ default : ' '
15
+ type : string
4
16
workflow_dispatch :
5
17
inputs :
6
18
commit :
7
19
description : ' 40-character commit hash'
8
20
required : true
9
- default : " "
21
+ default : ' '
10
22
type : string
11
- schedule :
12
- - cron : 31 2 * * *
23
+ model :
24
+ description : ' Model'
25
+ required : true
26
+ default : ' '
27
+ type : choice
28
+ options :
29
+ - ' mode1'
30
+ - ' mode2'
13
31
14
32
env :
15
33
REPO_PATH : /mnt/tlo/TLOmodel
16
34
OUTPUT_ROOT : /mnt/tlodev2stg/tlo-dev-fs-2/task-runner/output
17
35
RUNS_NUMBER : 10
18
36
PYTHON_VER : 3.11
19
- RUN_NAME : 021_long_run_all_diseases_run
20
- PROCESS_NAME : 022_long_run_all_diseases_process
37
+ RUN_NAME : 021_long_run_all_diseases_${{ inputs.model }}_run
38
+ PROCESS_NAME : 022_long_run_all_diseases_${{ inputs.model }}_process
21
39
22
40
jobs :
23
41
27
45
# `actions/checkout` workflow.
28
46
setup :
29
47
name : Setup
30
- runs-on : [tlo-dev-vm-1 ]
48
+ runs-on : [tlo-dev-vm-3 ]
31
49
strategy :
32
50
fail-fast : false
33
51
outputs :
@@ -43,17 +61,13 @@ jobs:
43
61
- name : Generate environment variables
44
62
id : vars
45
63
run : |
46
- if [[ ${{ github.event_name }} == 'workflow_dispatch' ]] && [[ -n "${{ inputs.commit }}" ]]; then
47
- SHA=${{ inputs.commit }}
48
- else
49
- SHA=${{ github.sha }}
50
- fi
51
- ENV="/mnt/tlo/env-${SHA}"
64
+ SHA=${{ inputs.commit }}
65
+ ENV="/mnt/tlo/env-${{ inputs.model }}-${SHA}"
52
66
if [[ -d "${ENV}" ]]; then
53
67
echo "Virtual environment directory ${ENV} already exists, leaving..."
54
68
exit 1
55
69
fi
56
- WORKTREE_PATH="/mnt/tlo/${SHA}"
70
+ WORKTREE_PATH="/mnt/tlo/${{ inputs.model }}-${ SHA}"
57
71
if [[ -d "${WORKTREE_PATH}" ]]; then
58
72
echo "Worktree directory ${WORKTREE_PATH} already exists, leaving..."
59
73
exit 1
@@ -134,7 +148,7 @@ jobs:
134
148
tasks :
135
149
needs : setup
136
150
name : Run task ${{ matrix.index }}
137
- runs-on : [tlo-dev-vm-1 , tasks] # Use only runners dedicated to running the tasks.
151
+ runs-on : [tlo-dev-vm-3 , tasks, ${{ inputs.model }} ] # Use only runners dedicated to running the tasks.
138
152
timeout-minutes : 5760 # = 4 * 24 * 60 minutes = 4 days
139
153
strategy :
140
154
fail-fast : false
@@ -159,7 +173,7 @@ jobs:
159
173
postprocess :
160
174
name : Post processing
161
175
needs : [setup, tasks]
162
- runs-on : [tlo-dev-vm-1 , postprocess] # Use only the runners dedicated to postprocessing
176
+ runs-on : [tlo-dev-vm-3 , postprocess] # Use only the runners dedicated to postprocessing
163
177
strategy :
164
178
fail-fast : false
165
179
steps :
@@ -190,7 +204,7 @@ jobs:
190
204
# `setup` was successful, to avoid cleaning up existing worktrees and
191
205
# environments used by other builds.
192
206
if : ${{ always() && needs.setup.result == 'success' }}
193
- runs-on : [tlo-dev-vm-1 ]
207
+ runs-on : [tlo-dev-vm-3 ]
194
208
strategy :
195
209
fail-fast : false
196
210
steps :
0 commit comments