mirror of
https://github.com/recp/cglm.git
synced 2025-10-03 08:41:55 +00:00
Update ci.yml
This commit is contained in:
31
.github/workflows/ci.yml
vendored
31
.github/workflows/ci.yml
vendored
@@ -187,26 +187,28 @@ jobs:
|
||||
run: brew upgrade && brew install ninja
|
||||
|
||||
- name: Set SIMD flags
|
||||
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
|
||||
run: |
|
||||
if ($Env:RUNNER_OS -eq 'Windows') {
|
||||
if ($Env:SIMD -eq 'none') {
|
||||
${{ runner.os == 'Windows' && '
|
||||
$simd = "${{ matrix.simd }}"
|
||||
if ($simd -eq "none") {
|
||||
$Env:CFLAGS = ""
|
||||
} elseif ($Env:SIMD -eq 'sse') {
|
||||
} elseif ($simd -eq "sse") {
|
||||
$Env:CFLAGS = "-arch:SSE"
|
||||
} elseif ($Env:SIMD -eq 'sse2') {
|
||||
} elseif ($simd -eq "sse2") {
|
||||
$Env:CFLAGS = "-arch:SSE2"
|
||||
} elseif ($Env:SIMD -eq 'sse3') {
|
||||
} elseif ($simd -eq "sse3") {
|
||||
$Env:CFLAGS = "-arch:SSE3"
|
||||
} elseif ($Env:SIMD -eq 'sse4') {
|
||||
} elseif ($simd -eq "sse4") {
|
||||
$Env:CFLAGS = "-arch:SSE4"
|
||||
} elseif ($Env:SIMD -eq 'avx') {
|
||||
} elseif ($simd -eq "avx") {
|
||||
$Env:CFLAGS = "-arch:AVX"
|
||||
} elseif ($Env:SIMD -eq 'avx2') {
|
||||
} elseif ($simd -eq "avx2") {
|
||||
$Env:CFLAGS = "-arch:AVX2"
|
||||
} elseif ($Env:SIMD -eq 'neon') {
|
||||
} elseif ($simd -eq "neon") {
|
||||
$Env:CFLAGS = "-arch:NEON"
|
||||
}
|
||||
} else {
|
||||
' || '
|
||||
if [ "${{ matrix.simd }}" == "none" ]; then
|
||||
export CFLAGS=""
|
||||
elif [ "${{ matrix.simd }}" == "sse" ]; then
|
||||
@@ -224,15 +226,16 @@ jobs:
|
||||
elif [ "${{ matrix.simd }}" == "neon" ]; then
|
||||
export CFLAGS="-mfpu=neon"
|
||||
fi
|
||||
}
|
||||
' }}
|
||||
|
||||
- name: Configure CMake
|
||||
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
|
||||
run: |
|
||||
if ($Env:RUNNER_OS -eq 'Windows') {
|
||||
${{ runner.os == 'Windows' && '
|
||||
cmake -B build -G "Visual Studio 17 2022" -A x64 -T host=x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="$Env:CFLAGS" -DCGLM_STATIC=ON -DCGLM_USE_TEST=ON
|
||||
} else {
|
||||
' || '
|
||||
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="$CFLAGS" -DCGLM_STATIC=ON -DCGLM_USE_TEST=ON
|
||||
}
|
||||
' }}
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
|
Reference in New Issue
Block a user