File tree Expand file tree Collapse file tree 3 files changed +77
-1
lines changed
Expand file tree Collapse file tree 3 files changed +77
-1
lines changed Original file line number Diff line number Diff line change 1+ name : " Linux Benchmark"
2+ description : " Run the C++ unit tests on linux."
3+ inputs :
4+ build-artifact :
5+ description : " Name of the build artifact that contains the benchmark binary."
6+ required : true
7+ runs :
8+ using : " composite"
9+ steps :
10+ - name : Install Dependencies
11+ shell : bash
12+ run : |
13+ sudo apt-get -qq update
14+ sudo apt-get -qq -y install libhdf5-10* wget gnupg lcov
15+ sudo apt-get -qq update
16+ - name : Download built test directory
17+ uses : actions/download-artifact@v3
18+ with :
19+ name : ${{ inputs.build-artifact }}
20+ path : cpp
21+ - name : extract build archive
22+ shell : bash
23+ run : |
24+ cd cpp
25+ tar -xzf build.tar.gz
26+ - name : Run benchmark
27+ shell : bash
28+ run : |
29+ cd cpp/build/bin
30+ sudo chmod a+x abm_benchmark
31+ ./abm_benchmark --benchmark_out="abm_benchmark.json" --benchmark_repetitions=10
32+ - name : Upload benchmark result
33+ uses : actions/upload-artifact@v3
34+ with :
35+ name : abm-benchmark-report
36+ path : cpp/build/bin/abm_benchmark.json
37+ if-no-files-found : error
38+ retention-days : 10
Original file line number Diff line number Diff line change @@ -29,6 +29,14 @@ inputs:
2929 description : " Turn on address sanitzer (ON or OFF)"
3030 required : false
3131 default : " OFF"
32+ build-tests :
33+ description : " Build tests"
34+ required : false
35+ default : " ON"
36+ build-benchmarks :
37+ description : " Build benchmarks"
38+ required : false
39+ default : " OFF"
3240runs :
3341 using : " composite"
3442 steps :
7785 exit 1
7886 fi
7987 mkdir -p build && cd build
80- cmake -DCMAKE_BUILD_TYPE=${{ inputs.config }} -DMEMILIO_TEST_COVERAGE=${{ inputs.coverage }} -DMEMILIO_SANITIZE_ADDRESS=${{ inputs.sanitize-addr }} -DMEMILIO_SANITIZE_UNDEFINED=${{ inputs.sanitize-ub }} -DMEMILIO_USE_BUNDLED_JSONCPP=${{ inputs.optional-dependencies }} ..
88+ cmake -DCMAKE_BUILD_TYPE=${{ inputs.config }} -DMEMILIO_BUILD_TESTS=${{ inputs.build-tests }} -DMEMILIO_BUILD_BENCHMARKS=${{ inputs.build-benchmarks }} - DMEMILIO_TEST_COVERAGE=${{ inputs.coverage }} -DMEMILIO_SANITIZE_ADDRESS=${{ inputs.sanitize-addr }} -DMEMILIO_SANITIZE_UNDEFINED=${{ inputs.sanitize-ub }} -DMEMILIO_USE_BUNDLED_JSONCPP=${{ inputs.optional-dependencies }} ..
8189 make -j4
8290 - name : create build dir archive
8391 shell : bash
Original file line number Diff line number Diff line change 1+ # experimental pipeline to test benchmarks on github runners
2+
3+ name : abm_benchmark_test
4+
5+ on :
6+ schedule :
7+ - cron : " 0 3,9,15,21 * * *" # every day on a few different hours
8+ workflow_dispatch :
9+
10+ jobs :
11+ build :
12+ runs-on : " ubuntu-latest"
13+ steps :
14+ - uses : actions/checkout@v3
15+ - uses : ./.github/actions/linux-build
16+ with :
17+ compiler : gcc
18+ config : Release
19+ version : latest
20+ build-tests : " OFF"
21+ build-benchmarks : " ON"
22+
23+ bench :
24+ needs : build
25+ runs-on : ubuntu-latest
26+ steps :
27+ - uses : actions/checkout@v3
28+ - uses : ./.github/actions/linux-benchmark
29+ with :
30+ build-artifact : build-cpp-linux-gcc-latest-Release-full
You can’t perform that action at this time.
0 commit comments