File tree 3 files changed +59
-8
lines changed
3 files changed +59
-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
+ jobs :
8
+ create_release :
9
+ runs-on : ubuntu-20.04
10
+ steps :
11
+ - name : Create Development release
12
+ if : ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/develop' }}
13
+ uses : " marvinpinto/action-automatic-releases@latest"
14
+ with :
15
+ repo_token : " ${{ secrets.GITHUB_TOKEN }}"
16
+ automatic_release_tag : " latest"
17
+ prerelease : true
18
+ title : " Development Build"
19
+
20
+ build_thyme_ubuntu :
21
+ runs-on : ubuntu-latest
22
+
23
+ steps :
24
+ - uses : actions/checkout@v2
25
+ with :
26
+ submodules : " recursive"
27
+
28
+ - name : Install dependencies
29
+ run : |
30
+ sudo apt-get update && sudo apt-get install -y libgtk-3-dev ninja-build libwxgtk3.0-gtk3-dev libsdl2-dev libavcodec-dev libavformat-dev
31
+
32
+ - name : Configure Thyme
33
+ run : |
34
+ cmake -DSTANDALONE=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_BENCHMARKS=ON -B build -G Ninja
35
+
36
+ - name : Build Thyme
37
+ run : |
38
+ cmake --build build
39
+
40
+ - name : Bench Thyme
41
+ run : |
42
+ cd build
43
+ ./thyme_benchmarks --benchmark_format=json | tee benchmark_result.json
44
+
45
+ - name : Store benchmark result
46
+ uses : benchmark-action/github-action-benchmark@v1
47
+ with :
48
+ tool : ' googlecpp'
49
+ output-file-path : build/benchmark_result.json
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")
417
417
endif ()
418
418
419
419
# 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
+
420
430
if (BUILD_TESTS)
421
431
enable_testing ()
422
432
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
-
9
1
set (TEST_SRCS
10
2
main.cpp
11
3
globals.cpp
You can’t perform that action at this time.
0 commit comments