File tree 2 files changed +44
-12
lines changed
2 files changed +44
-12
lines changed Original file line number Diff line number Diff line change 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
+ - ' mod1'
30
+ - ' mod2'
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
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
64
+ SHA=${{ inputs.commit }}
51
65
ENV="/mnt/tlo/env-${SHA}"
52
66
if [[ -d "${ENV}" ]]; then
53
67
echo "Virtual environment directory ${ENV} already exists, leaving..."
@@ -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-1, 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
Original file line number Diff line number Diff line change
1
+ name : " Calibrations (nightly)"
2
+
3
+ on :
4
+ schedule :
5
+ - cron : 31 2 * * *
6
+
7
+ jobs :
8
+ name : " Calibration for model ${{ matrix.model }}"
9
+ version-matrix :
10
+ strategy :
11
+ fail-fast : false
12
+ matrix :
13
+ model : [mod1, mod2]
14
+ uses : ./.github/workflows/calibration_common.yaml
15
+ with :
16
+ model : ${{ matrix.model }}
17
+ commit : ${{ github.sha }}
18
+ secrets : inherit
You can’t perform that action at this time.
0 commit comments