-
Notifications
You must be signed in to change notification settings - Fork 31
130 lines (112 loc) · 4.49 KB
/
test_performance.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
name: Performance Test
on:
push:
branches:
- develop
- master
- fix_perftest
pull_request:
branches:
- master
workflow_dispatch:
schedule:
- cron: '48 4 * * *'
jobs:
build:
name: Performance Test
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.9]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v3
with:
fetch-depth: 20
- name: Install apt dependencies
uses: ./.github/actions/install-apt-dependencies
- run: pip3 install petab shyaml build
- run: echo "${HOME}/.local/bin/" >> $GITHUB_PATH
- run: echo "${GITHUB_WORKSPACE}/tests/performance/" >> $GITHUB_PATH
# install AMICI
- name: Create AMICI sdist
run: |
cd python/sdist \
&& check_time.sh create_sdist python3 -m build --sdist
- name: Install AMICI sdist
run: |
AMICI_PARALLEL_COMPILE=2 check_time.sh \
install_sdist pip3 install -v --user \
$(ls -t python/sdist/dist/amici-*.tar.gz | head -1)
# retrieve test model
- run: git clone --depth 1 https://github.com/ICB-DCM/CS_Signalling_ERBB_RAS_AKT
# import test model
- name: Import test model
run: |
AMICI_IMPORT_NPROCS=2 check_time.sh petab_import python tests/performance/test.py import
- name: "Upload artifact: CS_Signalling_ERBB_RAS_AKT_petab"
uses: actions/upload-artifact@v3
with:
name: model_performance_test
path: model_performance_test
# install model package
- name: Install test model
run: >
check_time.sh install_model tests/performance/test.py compile;
for opt in O0 O1 O2;
do
check_time.sh install_model_${opt} tests/performance/test.py compile_${opt};
done
# run simulations
- name: forward_simulation
run: >
check_time.sh forward_simulation tests/performance/test.py forward_simulation;
for opt in O0 O1 O2;
do
check_time.sh forward_simulation tests/performance/test.py forward_simulation_${opt};
done
- name: forward_sensitivities
run: >
check_time.sh forward_sensitivities tests/performance/test.py forward_sensitivities;
for opt in O0 O1 O2;
do
check_time.sh forward_sensitivities tests/performance/test.py forward_sensitivities_${opt};
done
- name: adjoint_sensitivities
run: >
check_time.sh adjoint_sensitivities tests/performance/test.py adjoint_sensitivities;
for opt in O0 O1 O2;
do
check_time.sh adjoint_sensitivities tests/performance/test.py adjoint_sensitivities_${opt};
done
- name: forward_simulation_non_optimal_parameters
run: |
check_time.sh forward_simulation_non_optimal_parameters tests/performance/test.py forward_simulation_non_optimal_parameters;
for opt in O0 O1 O2;
do
check_time.sh forward_simulation_non_optimal_parameters tests/performance/test.py forward_simulation_non_optimal_parameters_${opt};
done
- name: adjoint_sensitivities_non_optimal_parameters
run: |
check_time.sh adjoint_sensitivities_non_optimal_parameters tests/performance/test.py adjoint_sensitivities_non_optimal_parameters;
for opt in O0 O1 O2;
do
check_time.sh adjoint_sensitivities_non_optimal_parameters tests/performance/test.py adjoint_sensitivities_non_optimal_parameters_${opt};
done
- name: forward_steadystate_sensitivities_non_optimal_parameters
run: |
check_time.sh forward_steadystate_sensitivities_non_optimal_parameters tests/performance/test.py forward_steadystate_sensitivities_non_optimal_parameters;
for opt in O0 O1 O2;
do
check_time.sh forward_steadystate_sensitivities_non_optimal_parameters tests/performance/test.py forward_steadystate_sensitivities_non_optimal_parameters_${opt};
done
- name: adjoint_steadystate_sensitivities_non_optimal_parameters
run: |
check_time.sh adjoint_steadystate_sensitivities_non_optimal_parameters tests/performance/test.py adjoint_steadystate_sensitivities_non_optimal_parameters;
for opt in O0 O1 O2;
do
check_time.sh adjoint_steadystate_sensitivities_non_optimal_parameters tests/performance/test.py adjoint_steadystate_sensitivities_non_optimal_parameters_${opt};
done