Skip to content

Commit abcc96b

Browse files
christophechristophe-lunarg
authored andcommitted
Fix macOS C.I.
1 parent a036baa commit abcc96b

File tree

4 files changed

+68
-14
lines changed

4 files changed

+68
-14
lines changed

.github/workflows/ci.yml

Lines changed: 61 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: ci
22
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
33

44
on:
5+
pull_request:
6+
branches:
7+
- main
58
push:
69
workflow_dispatch:
710

@@ -68,7 +71,7 @@ jobs:
6871
6972
- name: Run with GLM_ENABLE_SIMD_SSE2
7073
run: |
71-
cmake -S. -B ./build_sse2_std -T ${{matrix.toolkit}} -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
74+
cmake -S. -B ./build_sse2_std -T ${{matrix.toolkit}} -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
7275
cmake --build ./build_sse2_std --config ${{matrix.config}}
7376
ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_std
7477
@@ -149,7 +152,7 @@ jobs:
149152
150153
- name: Run with GLM_ENABLE_SIMD_SSE2
151154
run: |
152-
cmake -S. -B ./build_sse2_std -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
155+
cmake -S. -B ./build_sse2_std -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
153156
cmake --build ./build_sse2_std --config ${{matrix.config}}
154157
ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_std
155158
- name: Run with GLM_ENABLE_SIMD_SSE2 and language extensions
@@ -180,17 +183,14 @@ jobs:
180183
cmake --build ./build_avx2_ext --config ${{matrix.config}}
181184
ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx2_ext
182185
183-
macos:
186+
macos-13:
184187
runs-on: ${{ matrix.os }}
185188
strategy:
186189
fail-fast: false
187190
matrix:
188-
os: [macos-latest, macos-13]
191+
os: [macos-13]
189192
std: [98, 11, 14, 17, 20]
190193
config: [Debug, Release]
191-
exclude:
192-
- os: macos-13
193-
std: 20
194194

195195
steps:
196196
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
@@ -225,7 +225,7 @@ jobs:
225225
226226
- name: Run with GLM_ENABLE_SIMD_SSE2
227227
run: |
228-
cmake -S. -B ./build_sse2_std -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
228+
cmake -S. -B ./build_sse2_std -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
229229
cmake --build ./build_sse2_std --config ${{matrix.config}}
230230
ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_std
231231
- name: Run with GLM_ENABLE_SIMD_SSE2 and language extensions
@@ -244,4 +244,56 @@ jobs:
244244
cmake -S. -B ./build_avx1_ext -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
245245
cmake --build ./build_avx1_ext --config ${{matrix.config}}
246246
ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_ext
247-
247+
248+
macos-latest:
249+
runs-on: ${{ matrix.os }}
250+
strategy:
251+
fail-fast: false
252+
matrix:
253+
os: [macos-latest]
254+
std: [98, 11, 14, 17, 20]
255+
config: [Debug, Release]
256+
257+
steps:
258+
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
259+
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
260+
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
261+
- name: Check out repository code
262+
uses: actions/checkout@v4
263+
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
264+
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
265+
- name: List files in the repository
266+
run: |
267+
ls ${{ github.workspace }}
268+
- run: echo "🍏 This job's status is ${{ job.status }}."
269+
- name: CMake Version
270+
run: cmake --version
271+
- name: Run with automagic detection
272+
run: |
273+
cmake -S. -B ./build_auto -DGLM_BUILD_TESTS=ON
274+
cmake --build ./build_auto --config ${{matrix.config}}
275+
ctest --rerun-failed --output-on-failure -C ${{matrix.config}} --test-dir ./build_auto
276+
277+
- name: Run with GLM_FORCE_PURE
278+
run: |
279+
cmake -S. -B ./build_pure_std -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
280+
cmake --build ./build_pure_std --config ${{matrix.config}}
281+
ctest --rerun-failed --output-on-failure -C ${{matrix.config}} --test-dir ./build_pure_std
282+
- name: Run with GLM_FORCE_PURE and language extensions
283+
run: |
284+
cmake -S. -B ./build_pure_ext -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
285+
cmake --build ./build_pure_ext --config ${{matrix.config}}
286+
ctest --rerun-failed --output-on-failure -C ${{matrix.config}} --test-dir ./build_pure_ext
287+
288+
- name: Run with GLM_ENABLE_SIMD_NEON
289+
run: |
290+
cmake -S. -B ./build_neon_std -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_NEON=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
291+
cmake --build ./build_neon_std --config ${{matrix.config}}
292+
ctest --rerun-failed --output-on-failure -C ${{matrix.config}} --test-dir ./build_neon_std
293+
- name: Run with GLM_ENABLE_SIMD_NEON and language extensions
294+
run: |
295+
cmake -S. -B ./build_neon_ext -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_NEON=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
296+
cmake --build ./build_neon_ext --config ${{matrix.config}}
297+
ctest --rerun-failed --output-on-failure -C ${{matrix.config}} --test-dir ./build_neon_ext
298+
299+

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ option(GLM_ENABLE_SIMD_SSE4_1 "Enable SSE 4.1 optimizations" OFF)
150150
option(GLM_ENABLE_SIMD_SSE4_2 "Enable SSE 4.2 optimizations" OFF)
151151
option(GLM_ENABLE_SIMD_AVX "Enable AVX optimizations" OFF)
152152
option(GLM_ENABLE_SIMD_AVX2 "Enable AVX2 optimizations" OFF)
153-
option(GLM_TEST_ENABLE_SIMD_NEON "Enable ARM NEON optimizations" OFF)
153+
option(GLM_ENABLE_SIMD_NEON "Enable ARM NEON optimizations" OFF)
154154
option(GLM_FORCE_PURE "Force 'pure' instructions" OFF)
155155

156156
if(GLM_FORCE_PURE)
@@ -244,7 +244,7 @@ elseif(GLM_ENABLE_SIMD_SSE2)
244244
add_compile_options(/arch:SSE2)
245245
endif()
246246
message(STATUS "GLM: SSE2 instruction set")
247-
elseif(GLM_TEST_ENABLE_SIMD_NEON)
247+
elseif(GLM_ENABLE_SIMD_NEON)
248248
add_definitions(-DGLM_FORCE_NEON)
249249
message(STATUS "GLM: ARM NEON instruction set")
250250
endif()

glm/detail/func_common_simd.inl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,10 @@ namespace glm {
572572
template<length_t L, qualifier Q>
573573
struct compute_splat<L, float, Q, true> {
574574
template<int c>
575-
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<L, float, Q> call(vec<L, float, Q> const&)
576-
{}
575+
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<L, float, Q> call(vec<L, float, Q> const& a)
576+
{
577+
(void)a;
578+
}
577579

578580
template<>
579581
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<L, float, Q> call<0>(vec<L, float, Q> const& a)

test/gtc/gtc_type_aligned.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <glm/glm.hpp>
22

3-
#if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
3+
#if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE && !defined(GLM_FORCE_NEON)
44
#include <glm/gtc/type_aligned.hpp>
55
#include <glm/gtc/type_precision.hpp>
66
#include <glm/ext/scalar_relational.hpp>

0 commit comments

Comments
 (0)