File tree Expand file tree Collapse file tree 3 files changed +68
-8
lines changed
Expand file tree Collapse file tree 3 files changed +68
-8
lines changed Original file line number Diff line number Diff line change 1+ name : bench-linux
2+
3+ on :
4+ pull_request :
5+ push :
6+
7+ permissions :
8+ # deployments permission to deploy GitHub pages website
9+ deployments : write
10+ # contents permission to update benchmark contents in gh-pages branch
11+ contents : write
12+
13+ jobs :
14+ create_release :
15+ runs-on : ubuntu-20.04
16+ steps :
17+ - name : Create Development release
18+ if : ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/develop' }}
19+ uses : " marvinpinto/action-automatic-releases@latest"
20+ with :
21+ repo_token : " ${{ secrets.GITHUB_TOKEN }}"
22+ automatic_release_tag : " latest"
23+ prerelease : true
24+ title : " Development Build"
25+
26+ build_thyme_ubuntu :
27+ runs-on : ubuntu-latest
28+
29+ steps :
30+ - uses : actions/checkout@v2
31+ with :
32+ submodules : " recursive"
33+
34+ - name : Install dependencies
35+ run : |
36+ sudo apt-get update && sudo apt-get install -y libgtk-3-dev ninja-build libwxgtk3.0-gtk3-dev libsdl2-dev libavcodec-dev libavformat-dev
37+
38+ - name : Configure Thyme
39+ run : |
40+ cmake -DSTANDALONE=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_BENCHMARKS=ON -B build -G Ninja
41+
42+ - name : Build Thyme
43+ run : |
44+ cmake --build build
45+
46+ - name : Bench Thyme
47+ run : |
48+ cd build
49+ ./thyme_benchmarks --benchmark_format=json | tee benchmark_result.json
50+
51+ - name : Store benchmark result
52+ uses : benchmark-action/github-action-benchmark@v1
53+ with :
54+ name : Thyme Benchmarks
55+ tool : ' googlecpp'
56+ output-file-path : build/benchmark_result.json
57+ github-token : ${{ secrets.GITHUB_TOKEN }}
58+ auto-push : true
Original file line number Diff line number Diff line change @@ -417,6 +417,16 @@ if(DLL_INSTALL_PREFIX AND ${CMAKE_VERSION} VERSION_GREATER "3.13.0")
417417endif ()
418418
419419# Build tests
420+ if (BUILD_TESTS OR BUILD_BENCHMARKS)
421+ FetchContent_Declare(
422+ googletest
423+ GIT_REPOSITORY https://github.com/google/googletest.git
424+ GIT_TAG release-1.12.1
425+ )
426+
427+ FetchContent_MakeAvailable(googletest)
428+ endif ()
429+
420430if (BUILD_TESTS)
421431 enable_testing ()
422432 add_subdirectory (tests)
Original file line number Diff line number Diff line change 1- FetchContent_Declare(
2- googletest
3- GIT_REPOSITORY https://github.com/google/googletest.git
4- GIT_TAG release-1.12.1
5- )
6-
7- FetchContent_MakeAvailable(googletest)
8-
91set (TEST_SRCS
102 main.cpp
113 globals.cpp
You can’t perform that action at this time.
0 commit comments