1
- name : CMake
1
+ name : CI Build
2
2
3
3
on :
4
4
push :
7
7
branches : [ main ]
8
8
9
9
env :
10
- # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
11
- BUILD_TYPE : Release
10
+ BUILD_TYPE : Debug
12
11
13
12
jobs :
14
- build-ubuntu :
15
- name : ubuntu
16
-
17
- # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
18
- # You can convert this to a matrix build if you need cross-platform coverage.
19
- # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
13
+ build-ubuntu-gcc :
14
+ name : ubuntu-gcc
20
15
runs-on : ubuntu-latest
21
-
16
+ timeout-minutes : 4
22
17
steps :
23
- - uses : actions/checkout@v2
18
+ - uses : actions/checkout@v4
19
+
20
+ - name : Configure CMake
21
+ run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX2D_SAMPLES=OFF -DBUILD_SHARED_LIBS=OFF
24
22
25
- - name : Install dependencies
26
- run : |
27
- sudo apt update
28
- sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev
23
+ - name : Build
24
+ run : cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
29
25
26
+ - name : Test
27
+ working-directory : ${{github.workspace}}/build
28
+ run : ./bin/test
29
+
30
+ build-ubuntu-clang :
31
+ name : ubuntu-clang
32
+ runs-on : ubuntu-latest
33
+
34
+ steps :
35
+ - uses : actions/checkout@v4
36
+
30
37
- name : Configure CMake
31
- # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
32
- # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
33
- run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
38
+ run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_C_COMPILER=clang -DBOX2D_SAMPLES=OFF -DBUILD_SHARED_LIBS=OFF
34
39
35
40
- name : Build
36
- # Build your program with the given configuration
37
41
run : cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
38
42
39
43
- name : Test
40
44
working-directory : ${{github.workspace}}/build
41
- # Execute tests defined by the CMake configuration.
42
- # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
43
- run : ./bin/unit_test
45
+ run : ./bin/test
44
46
45
47
build-macos :
46
48
name : macos
47
49
runs-on : macos-latest
48
50
49
51
steps :
50
- - uses : actions/checkout@v2
52
+ - uses : actions/checkout@v4
51
53
52
54
- name : Configure CMake
53
- run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
55
+ # some problem with simde
56
+ # run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX2D_SAMPLES=OFF -DBOX2D_SANITIZE=ON -DBUILD_SHARED_LIBS=OFF
57
+ run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX2D_SAMPLES=OFF -DBUILD_SHARED_LIBS=OFF
54
58
55
59
- name : Build
56
60
run : cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
57
61
58
62
- name : Test
59
63
working-directory : ${{github.workspace}}/build
60
- run : ./bin/unit_test
64
+ run : ./bin/test
61
65
62
66
build-windows :
63
67
name : windows
64
68
runs-on : windows-latest
65
-
66
69
steps :
67
- - uses : actions/checkout@v2
70
+
71
+ - uses : actions/checkout@v4
72
+
73
+ - name : Setup MSVC dev command prompt
74
+ uses : TheMrMilchmann/setup-msvc-dev@v3
75
+ with :
76
+ arch : x64
68
77
69
78
- name : Configure CMake
70
- run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
79
+ # enkiTS is failing ASAN on windows
80
+ # run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX2D_SAMPLES=OFF -DBOX2D_SANITIZE=ON -DBUILD_SHARED_LIBS=OFF
81
+ run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX2D_SAMPLES=OFF -DBUILD_SHARED_LIBS=OFF
71
82
72
83
- name : Build
73
84
run : cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
74
85
75
86
- name : Test
76
87
working-directory : ${{github.workspace}}/build
77
- run : ./bin/${{env.BUILD_TYPE}}/unit_test
88
+ run : ./bin/${{env.BUILD_TYPE}}/test
78
89
0 commit comments