Replace Travis with GitHub actions #1145
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I saw in #1115 that one of the main barriers for creating a new release of GLM was the fact that Travis ci is no longer available and a new CI system is required for Linux/macOS so I thought I'd give this a go.
Here's my initial attempt at migrating to using GitHub actions. However there are a few issues that I came across:
reinterpret_cast
intest/core/core_func_integer.cpp
needed to be removed to avoid a segfault in gcc buildsvsprintf
so switch to usingvsnprintf
for C++11 builds.I haven't been able to fix the gcc C++11 and C++14 AVX builds seg fault issue when running some of the tests. I'm not very familiar with SIMD so was unable to start to figure out what's gone wrong with that code.
I have been able to replicate this on my machine (Linux x86_64; GCC 13; AMD 3900 CPU) with the following commands:
cmake -S . -B build -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_CXX_11=ON -DCMAKE_BUILD_TYPE=Debug cmake --build build --parallel ctest --test-dir build
Output:
Example build: https://github.com/hoyon/glm/actions/runs/6658885038/job/18096744066
I've also excluded C++98 as although the README claims support, some of the tests won't compile without at least C++11. If continued support for C++98 is desired, it can be added to the matrix and the offending tests rewritten but my feeling is that no one will complain if the minimum version is raised to C++11.
I've only replaced Travis and not Appveyor in this PR as the latter still appears to work and it's been a long time since I've done any C++ development on Windows.
The fact that these issues were able to slip through shows the importance of having a robust CI system in place.