From 35d4b61c234b5e268c9040be9866d0c2aebf1daf Mon Sep 17 00:00:00 2001 From: Ho-Yon Mak Date: Sat, 25 Mar 2023 20:32:31 +0000 Subject: [PATCH] Replace Travis with GitHub actions --- .github/actions/build-and-test/action.yml | 49 +++ .github/workflows/test.yml | 78 +++++ .gitignore | 2 +- .travis.yml | 388 ---------------------- glm/gtx/string_cast.inl | 4 + readme.md | 2 +- test/CMakeLists.txt | 3 +- test/core/core_func_integer.cpp | 2 +- 8 files changed, 136 insertions(+), 392 deletions(-) create mode 100644 .github/actions/build-and-test/action.yml create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/actions/build-and-test/action.yml b/.github/actions/build-and-test/action.yml new file mode 100644 index 000000000..88b7909bf --- /dev/null +++ b/.github/actions/build-and-test/action.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..53455af65 --- /dev/null +++ b/.github/workflows/test.yml @@ -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 diff --git a/.gitignore b/.gitignore index 9dbd6d8c0..b79427b1b 100644 --- a/.gitignore +++ b/.gitignore @@ -52,7 +52,7 @@ Makefile *.log # local build(s) -build* +/build* /.vs /.vscode diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1660ec0c5..000000000 --- a/.travis.yml +++ /dev/null @@ -1,388 +0,0 @@ -language: cpp - -branches: - only: - - master - - stable - -jobs: - include: - - name: "Xcode 7.3 C++98 pure release" - os: osx - osx_image: xcode7.3 - env: - - MATRIX_EVAL="" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON" - - - name: "Xcode 7.3 C++98 sse2 release" - os: osx - osx_image: xcode7.3 - env: - - MATRIX_EVAL="" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON" - - - name: "Xcode 7.3 C++98 ms release" - os: osx - osx_image: xcode7.3 - env: - - MATRIX_EVAL="" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON" - - - name: "XCode 7.3 C++11 pure release" - os: osx - osx_image: xcode7.3 - env: - - MATRIX_EVAL="" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_FORCE_PURE=ON" - - - name: "XCode 7.3 C++11 sse2 release" - os: osx - osx_image: xcode7.3 - env: - - MATRIX_EVAL="" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON" - - - name: "XCode 10.3 C++11 sse2 release" - os: osx - osx_image: xcode10.3 - env: - - MATRIX_EVAL="" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON" - - - name: "XCode 12.2 C++11 sse2 release" - os: osx - osx_image: xcode12.2 - env: - - MATRIX_EVAL="" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "XCode 12.2 C++11 sse2 debug" - os: osx - osx_image: xcode12.2 - env: - - MATRIX_EVAL="" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "XCode 12.2 C++11 avx debug" - os: osx - osx_image: xcode12.2 - env: - - MATRIX_EVAL="" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "XCode 12.2 C++14 avx debug" - os: osx - osx_image: xcode12.2 - env: - - MATRIX_EVAL="" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "XCode 12.2 C++14 pure debug" - os: osx - osx_image: xcode12.2 - env: - - MATRIX_EVAL="" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_FORCE_PURE=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "XCode 12.2 C++17 pure debug" - os: osx - osx_image: xcode12.2 - env: - - MATRIX_EVAL="" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_FORCE_PURE=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "XCode 12.2 C++17 sse2 debug" - os: osx - osx_image: xcode12.2 - env: - - MATRIX_EVAL="" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "XCode 12.2 C++17 sse2 release" - os: osx - osx_image: xcode12.2 - env: - - MATRIX_EVAL="" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "XCode 12.2 C++17 avx release" - os: osx - osx_image: xcode12.2 - env: - - MATRIX_EVAL="" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "GCC 4.9 C++98 pure release" - os: linux - dist: Xenial - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.9 - env: - - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "GCC 4.9 C++98 pure debug" - os: linux - dist: Xenial - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.9 - env: - - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "GCC 4.9 C++98 ms debug" - os: linux - dist: Xenial - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.9 - env: - - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "GCC 4.9 C++11 ms debug" - os: linux - dist: Xenial - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.9 - env: - - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "GCC 4.9 C++11 pure debug" - os: linux - dist: Xenial - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.9 - env: - - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_FORCE_PURE=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "GCC 6 C++14 pure debug" - os: linux - dist: bionic - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-6 - env: - - MATRIX_EVAL="CC=gcc-6 && CXX=g++-6" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "GCC 6 C++14 ms debug" - os: linux - dist: bionic - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-6 - env: - - MATRIX_EVAL="CC=gcc-6 && CXX=g++-6" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "GCC 7 C++17 ms debug" - os: linux - dist: bionic - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-7 - env: - - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "GCC 7 C++17 pure debug" - os: linux - dist: bionic - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-7 - env: - - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "GCC 10 C++17 pure debug" - os: linux - dist: bionic - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-10 - env: - - MATRIX_EVAL="CC=gcc-10 && CXX=g++-10" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "GCC 10 C++17 pure release" - os: linux - dist: bionic - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-10 - env: - - MATRIX_EVAL="CC=gcc-10 && CXX=g++-10" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "Clang C++14 pure release" - os: linux - dist: Xenial - env: - - MATRIX_EVAL="CC=clang && CXX=clang++" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "Clang C++14 pure debug" - os: linux - dist: Xenial - env: - - MATRIX_EVAL="CC=clang && CXX=clang++" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "Clang C++14 sse2 debug" - os: linux - dist: Xenial - env: - - MATRIX_EVAL="CC=clang && CXX=clang++" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "Clang C++14 sse2 debug" - os: linux - dist: focal - env: - - MATRIX_EVAL="CC=clang && CXX=clang++" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "Clang C++17 sse2 debug" - os: linux - dist: focal - env: - - MATRIX_EVAL="CC=clang && CXX=clang++" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "Clang C++17 avx2 debug" - os: linux - dist: focal - env: - - MATRIX_EVAL="CC=clang && CXX=clang++" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX2=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "Clang C++17 pure debug" - os: linux - dist: focal - env: - - MATRIX_EVAL="CC=clang && CXX=clang++" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - - - name: "Clang C++17 pure release" - os: linux - dist: focal - env: - - MATRIX_EVAL="CC=clang && CXX=clang++" - - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON" - - CTEST_ENV="--parallel 4 --output-on-failure" - - CMAKE_ENV="--parallel" - -before_script: - - cmake --version - - eval "${MATRIX_EVAL}" - -script: - - ${CC} --version - - mkdir ./build - - cd ./build - - cmake -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/install -DCMAKE_CXX_COMPILER=$COMPILER ${CMAKE_BUILD_ENV} .. - - cmake --build . ${CMAKE_ENV} - - ctest ${CTEST_ENV} - - cmake --build . --target install ${CMAKE_ENV} - - cd $TRAVIS_BUILD_DIR - - mkdir ./build_test_cmake - - cd ./build_test_cmake - - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -DCMAKE_PREFIX_PATH=$TRAVIS_BUILD_DIR/install - - cmake --build . - - diff --git a/glm/gtx/string_cast.inl b/glm/gtx/string_cast.inl index f67751d41..0360b07c8 100644 --- a/glm/gtx/string_cast.inl +++ b/glm/gtx/string_cast.inl @@ -30,6 +30,10 @@ namespace detail va_start(list, msg); # if (GLM_COMPILER & GLM_COMPILER_VC) vsprintf_s(text, STRING_BUFFER, msg, list); + +# elif GLM_HAS_CXX11_STL + std::vsnprintf(text, STRING_BUFFER, msg, list); + # else// std::vsprintf(text, msg, list); # endif// diff --git a/readme.md b/readme.md index dd47f459f..18bed4a70 100644 --- a/readme.md +++ b/readme.md @@ -48,7 +48,7 @@ glm::mat4 camera(float Translate, glm::vec2 const& Rotate) | Service | System | Compiler | Status | | ------- | ------ | -------- | ------ | -| [Travis CI](https://travis-ci.org/g-truc/glm)| MacOSX, Linux 64 bits | Clang 3.6, Clang 5.0, GCC 4.9, GCC 7.3 | [![Travis CI](https://travis-ci.org/g-truc/glm.svg?branch=master)](https://travis-ci.org/g-truc/glm) +| [GitHub actions](https://github.com/g-truc/glm/actions)| MacOSX, Linux 64 bits | Clang 14, GCC 11 | [![GLM tests](https://github.com/g-truc/glm/actions/workflows/test.yml/badge.svg?event=push)](https://github.com/g-truc/glm/actions/workflows/test.yml) | [AppVeyor](https://ci.appveyor.com/project/Groovounet/glm)| Windows 32 and 64 | Visual Studio 2013, Visual Studio 2015, Visual Studio 2017 | [![AppVeyor](https://ci.appveyor.com/api/projects/status/32r7s2skrgm9ubva?svg=true)](https://ci.appveyor.com/project/Groovounet/glm) ## Release notes diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 04ddbf8f2..328661a48 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -198,8 +198,9 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") endif() add_compile_options(-Werror -Weverything) + add_compile_options(-Wno-unknown-warning-option) add_compile_options(-Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-c++11-long-long -Wno-padded -Wno-gnu-anonymous-struct -Wno-nested-anon-types) - add_compile_options(-Wno-undefined-reinterpret-cast -Wno-sign-conversion -Wno-unused-variable -Wno-missing-prototypes -Wno-unreachable-code -Wno-missing-variable-declarations -Wno-sign-compare -Wno-global-constructors -Wno-unused-macros -Wno-format-nonliteral -Wno-float-equal) + add_compile_options(-Wno-undefined-reinterpret-cast -Wno-sign-conversion -Wno-unused-variable -Wno-missing-prototypes -Wno-unreachable-code -Wno-missing-variable-declarations -Wno-sign-compare -Wno-global-constructors -Wno-unused-macros -Wno-format-nonliteral -Wno-float-equal -Wno-unused-but-set-variable -Wno-invalid-utf8 -Wno-newline-eof -Wno-implicit-int-float-conversion -Wno-reserved-identifier -Wno-undef -Wno-unsafe-buffer-usage -Wno-float-conversion) elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") if(NOT GLM_QUIET) diff --git a/test/core/core_func_integer.cpp b/test/core/core_func_integer.cpp index 95d650c76..58c8f1869 100644 --- a/test/core/core_func_integer.cpp +++ b/test/core/core_func_integer.cpp @@ -1426,7 +1426,7 @@ namespace bitCount template static glm::vec bitCount_bitfield(glm::vec const& v) { - glm::vec::type, Q> x(*reinterpret_cast::type, Q> const *>(&v)); + glm::vec::type, Q> x(v); x = compute_bitfieldBitCountStep= 2>::call(x, static_cast::type>(0x5555555555555555ull), static_cast::type>( 1)); x = compute_bitfieldBitCountStep= 4>::call(x, static_cast::type>(0x3333333333333333ull), static_cast::type>( 2)); x = compute_bitfieldBitCountStep= 8>::call(x, static_cast::type>(0x0F0F0F0F0F0F0F0Full), static_cast::type>( 4));