1
1
name : Performance Monitor
2
2
3
- on : [pull_request]
3
+ on : [push, pull_request]
4
4
5
5
jobs :
6
6
build-test-perfmon :
11
11
working-directory : .testing
12
12
13
13
steps :
14
- - uses : actions/checkout@v2
14
+ - uses : actions/checkout@v3
15
15
with :
16
16
submodules : recursive
17
17
@@ -20,19 +20,56 @@ jobs:
20
20
- uses : ./.github/actions/testing-setup
21
21
22
22
- name : Compile optimized models
23
+ if : ${{ github.event_name == 'pull_request' }}
23
24
run : >-
24
25
make -j build.prof
25
26
MOM_TARGET_SLUG=$GITHUB_REPOSITORY
26
27
MOM_TARGET_LOCAL_BRANCH=$GITHUB_BASE_REF
27
28
DO_REGRESSION_TESTS=true
28
29
29
30
- name : Generate profile data
31
+ if : ${{ github.event_name == 'pull_request' }}
30
32
run : >-
31
33
pip install f90nml &&
32
34
make profile
33
35
DO_REGRESSION_TESTS=true
34
36
35
37
- name : Generate perf data
38
+ if : ${{ github.event_name == 'pull_request' }}
36
39
run : |
37
40
sudo sysctl -w kernel.perf_event_paranoid=2
38
41
make perf DO_REGRESSION_TESTS=true
42
+
43
+ # This job assumes that build/target_codebase was cloned above
44
+ - name : Compile timing tests for reference code
45
+ if : ${{ github.event_name == 'pull_request' }}
46
+ run : >-
47
+ make -j build.timing_target
48
+ MOM_TARGET_SLUG=$GITHUB_REPOSITORY
49
+ MOM_TARGET_LOCAL_BRANCH=$GITHUB_BASE_REF
50
+ DO_REGRESSION_TESTS=true
51
+
52
+ - name : Compile timing tests
53
+ run : |
54
+ make -j build.timing
55
+
56
+ # DO_REGERESSION_TESTS=true is needed here to set the internal macro TARGET_CODEBASE
57
+ - name : Run timing tests for reference code
58
+ if : ${{ github.event_name == 'pull_request' }}
59
+ run : >-
60
+ make -j run.timing_target
61
+ DO_REGRESSION_TESTS=true
62
+
63
+ - name : Run timing tests
64
+ run : |
65
+ make -j run.timing
66
+
67
+ - name : Display timing results
68
+ run : |
69
+ make -j show.timing
70
+
71
+ - name : Display comparison of timing results
72
+ if : ${{ github.event_name == 'pull_request' }}
73
+ run : >-
74
+ make -j compare.timing
75
+ DO_REGRESSION_TESTS=true
0 commit comments