File tree Expand file tree Collapse file tree 2 files changed +127
-0
lines changed Expand file tree Collapse file tree 2 files changed +127
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and test
2
+
3
+ inputs :
4
+ build_dir :
5
+ description : " The build dir to use"
6
+ required : true
7
+ std :
8
+ description : " The C++ standard to use"
9
+ required : true
10
+ build_type :
11
+ description : " The build type to use"
12
+ default : Debug
13
+ sse3 :
14
+ description : " Whether to enable sse3"
15
+ default : OFF
16
+ avx :
17
+ description : " Whether to enable avx"
18
+ default : OFF
19
+ pure :
20
+ description : " Whether to enable pure"
21
+ default : OFF
22
+ lang_extensions :
23
+ description : " Whether to enable lang extensions"
24
+ default : OFF
25
+
26
+ runs :
27
+ using : " composite"
28
+ steps :
29
+ - name : Build GLM
30
+ shell : bash
31
+ run : |
32
+ mkdir -p ${{ inputs.build_dir }}
33
+
34
+ cmake -DCMAKE_INSTALL_PREFIX=$RUNNER_TEMP/install \
35
+ -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \
36
+ -DGLM_TEST_ENABLE=ON \
37
+ -DGLM_TEST_ENABLE_CXX_${{ inputs.std}}=ON \
38
+ -DGLM_TEST_ENABLE_SIMD_SSE3=${{ inputs.sse3 }} \
39
+ -DGLM_TEST_ENABLE_SIMD_AVX=${{ inputs.avx }} \
40
+ -DGLM_TEST_FORCE_PURE=${{ inputs.pure }} \
41
+ -DGLM_TEST_ENABLE_LANG_EXTENSIONS=${{ inputs.lang_extensions }} \
42
+ -S . \
43
+ -B ${{ inputs.build_dir }}
44
+ cmake --build ${{ inputs.build_dir }} --parallel 2
45
+
46
+ - name : Run tests
47
+ shell : bash
48
+ run :
49
+ ctest --test-dir ${{ inputs.build_dir }} --output-on-failure --parallel 4
Original file line number Diff line number Diff line change
1
+ name : GLM tests
2
+
3
+ on : [push]
4
+
5
+ jobs :
6
+ test :
7
+ name : " ${{ matrix.os}} ${{ matrix.cxx }} C++:${{ matrix.std }}"
8
+ runs-on : ${{ matrix.os }}
9
+ strategy :
10
+ fail-fast : false
11
+ matrix :
12
+ cxx : [g++, clang++]
13
+ std : [11, 14, 17]
14
+ os : [ubuntu-latest, macos-latest]
15
+
16
+ exclude :
17
+ - os : macos-latest
18
+ cxx : g++
19
+
20
+ env :
21
+ CXX : ${{ matrix.cxx }}
22
+
23
+ steps :
24
+ - uses : actions/checkout@v3
25
+
26
+ - name : Tool versions
27
+ run : |
28
+ ${CXX} --version
29
+ cmake --version
30
+
31
+ - name : Standard build
32
+ uses : ./.github/actions/build-and-test
33
+ with :
34
+ build_dir : build
35
+ std : ${{ matrix.std }}
36
+
37
+ - name : SSE3 build
38
+ uses : ./.github/actions/build-and-test
39
+ with :
40
+ build_dir : build_sse3
41
+ std : ${{ matrix.std }}
42
+ sse3 : ON
43
+
44
+ - name : AVX build
45
+ uses : ./.github/actions/build-and-test
46
+ with :
47
+ build_dir : build_avx
48
+ std : ${{ matrix.std }}
49
+ avx : ON
50
+
51
+ - name : Pure build
52
+ uses : ./.github/actions/build-and-test
53
+ with :
54
+ build_dir : build_pure
55
+ std : ${{ matrix.std }}
56
+ pure : ON
57
+
58
+ - name : Lang extensions build
59
+ uses : ./.github/actions/build-and-test
60
+ with :
61
+ build_dir : build_lang_extensions
62
+ std : ${{ matrix.std }}
63
+ lang_extensions : ON
64
+
65
+ - name : release build
66
+ uses : ./.github/actions/build-and-test
67
+ with :
68
+ build_dir : build_release
69
+ std : ${{ matrix.std }}
70
+ build_type : Release
71
+
72
+ - name : Test installing and using GLM
73
+ run : |
74
+ cmake --build build --target install
75
+ mkdir build_test_cmake
76
+ cmake -DCMAKE_PREFIX_PATH=$RUNNER_TEMP/install -S ./test/cmake -B build_test_cmake
77
+ cmake --build build_test_cmake
78
+ ./build_test_cmake/test_find_glm
You can’t perform that action at this time.
0 commit comments