forked from icaven/glm
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
136 additions
and
392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Build and test | ||
|
||
inputs: | ||
build_dir: | ||
description: "The build dir to use" | ||
required: true | ||
std: | ||
description: "The C++ standard to use" | ||
required: true | ||
build_type: | ||
description: "The build type to use" | ||
default: Debug | ||
sse3: | ||
description: "Whether to enable sse3" | ||
default: OFF | ||
avx: | ||
description: "Whether to enable avx" | ||
default: OFF | ||
pure: | ||
description: "Whether to enable pure" | ||
default: OFF | ||
lang_extensions: | ||
description: "Whether to enable lang extensions" | ||
default: OFF | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Build GLM | ||
shell: bash | ||
run: | | ||
mkdir -p ${{ inputs.build_dir }} | ||
cmake -DCMAKE_INSTALL_PREFIX=$RUNNER_TEMP/install \ | ||
-DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \ | ||
-DGLM_TEST_ENABLE=ON \ | ||
-DGLM_TEST_ENABLE_CXX_${{ inputs.std}}=ON \ | ||
-DGLM_TEST_ENABLE_SIMD_SSE3=${{ inputs.sse3 }} \ | ||
-DGLM_TEST_ENABLE_SIMD_AVX=${{ inputs.avx }} \ | ||
-DGLM_TEST_FORCE_PURE=${{ inputs.pure }} \ | ||
-DGLM_TEST_ENABLE_LANG_EXTENSIONS=${{ inputs.lang_extensions }} \ | ||
-S . \ | ||
-B ${{ inputs.build_dir }} | ||
cmake --build ${{ inputs.build_dir }} --parallel 2 | ||
- name: Run tests | ||
shell: bash | ||
run: | ||
ctest --test-dir ${{ inputs.build_dir }} --output-on-failure --parallel 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: GLM tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
name: "${{ matrix.os}} ${{ matrix.cxx }} C++:${{ matrix.std }}" | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
cxx: [g++, clang++] | ||
std: [11, 14, 17] | ||
os: [ubuntu-latest, macos-latest] | ||
|
||
exclude: | ||
- os: macos-latest | ||
cxx: g++ | ||
|
||
env: | ||
CXX: ${{ matrix.cxx }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Tool versions | ||
run: | | ||
${CXX} --version | ||
cmake --version | ||
- name: Standard build | ||
uses: ./.github/actions/build-and-test | ||
with: | ||
build_dir: build | ||
std: ${{ matrix.std }} | ||
|
||
- name: SSE3 build | ||
uses: ./.github/actions/build-and-test | ||
with: | ||
build_dir: build_sse3 | ||
std: ${{ matrix.std }} | ||
sse3: ON | ||
|
||
- name: AVX build | ||
uses: ./.github/actions/build-and-test | ||
with: | ||
build_dir: build_avx | ||
std: ${{ matrix.std }} | ||
avx: ON | ||
|
||
- name: Pure build | ||
uses: ./.github/actions/build-and-test | ||
with: | ||
build_dir: build_pure | ||
std: ${{ matrix.std }} | ||
pure: ON | ||
|
||
- name: Lang extensions build | ||
uses: ./.github/actions/build-and-test | ||
with: | ||
build_dir: build_lang_extensions | ||
std: ${{ matrix.std }} | ||
lang_extensions: ON | ||
|
||
- name: release build | ||
uses: ./.github/actions/build-and-test | ||
with: | ||
build_dir: build_release | ||
std: ${{ matrix.std }} | ||
build_type: Release | ||
|
||
- name: Test installing and using GLM | ||
run: | | ||
cmake --build build --target install | ||
mkdir build_test_cmake | ||
cmake -DCMAKE_PREFIX_PATH=$RUNNER_TEMP/install -S ./test/cmake -B build_test_cmake | ||
cmake --build build_test_cmake | ||
./build_test_cmake/test_find_glm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ Makefile | |
*.log | ||
|
||
# local build(s) | ||
build* | ||
/build* | ||
|
||
/.vs | ||
/.vscode | ||
|
Oops, something went wrong.