11name : CI
2+
23on :
34 push :
45 branches : [main]
56 pull_request :
67 workflow_dispatch :
78
89jobs :
9- build :
10+ build-instrumentation :
1011 runs-on : ubuntu-latest
1112
1213 steps :
@@ -16,10 +17,46 @@ jobs:
1617 - name : Install dependencies
1718 run : sudo apt-get update && sudo apt-get install -y build-essential cmake
1819
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
2030
2131 - 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
2357
2458 - 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