1
1
name : CI
2
+
2
3
on :
3
4
push :
4
5
branches : [main]
5
6
pull_request :
6
7
workflow_dispatch :
7
8
8
9
jobs :
9
- build :
10
+ build-instrumentation :
10
11
runs-on : ubuntu-latest
11
12
12
13
steps :
@@ -16,10 +17,46 @@ jobs:
16
17
- name : Install dependencies
17
18
run : sudo apt-get update && sudo apt-get install -y build-essential cmake
18
19
19
- - run : cd examples/google_benchmark && mkdir build
20
+ - name : Cache instrumentation build
21
+ uses : actions/cache@v3
22
+ with :
23
+ path : examples/google_benchmark/build-instrumentation
24
+ key : ${{ runner.os }}-build-instrumentation-${{ hashFiles('**/CMakeLists.txt', '**/examples/google_benchmark/**') }}
25
+ restore-keys : |
26
+ ${{ runner.os }}-build-instrumentation-
27
+
28
+ - name : Create build directory
29
+ run : mkdir -p examples/google_benchmark/build-instrumentation
20
30
21
31
- name : Build google_benchmark instrumentation
22
- run : cd examples/google_benchmark/build && cmake -DCODSPEED_MODE=instrumentation .. && make -j
32
+ run : |
33
+ cd examples/google_benchmark/build-instrumentation
34
+ cmake -DCODSPEED_MODE=instrumentation ..
35
+ make -j
36
+
37
+ build-walltime :
38
+ runs-on : ubuntu-latest
39
+
40
+ steps :
41
+ - name : Checkout code
42
+ uses : actions/checkout@v3
43
+
44
+ - name : Install dependencies
45
+ run : sudo apt-get update && sudo apt-get install -y build-essential cmake
46
+
47
+ - name : Cache walltime build
48
+ uses : actions/cache@v3
49
+ with :
50
+ path : examples/google_benchmark/build-walltime
51
+ key : ${{ runner.os }}-build-walltime-${{ hashFiles('**/CMakeLists.txt', '**/examples/google_benchmark/**') }}
52
+ restore-keys : |
53
+ ${{ runner.os }}-build-walltime-
54
+
55
+ - name : Create build directory
56
+ run : mkdir -p examples/google_benchmark/build-walltime
23
57
24
58
- name : Build google_benchmark walltime
25
- run : cd examples/google_benchmark/build && cmake -DCODSPEED_MODE=walltime .. && make -j
59
+ run : |
60
+ cd examples/google_benchmark/build-walltime
61
+ cmake -DCODSPEED_MODE=walltime ..
62
+ make -j
0 commit comments