mirror of
https://github.com/recp/cglm.git
synced 2025-10-03 16:51:35 +00:00
Update ci.yml
This commit is contained in:
46
.github/workflows/ci.yml
vendored
46
.github/workflows/ci.yml
vendored
@@ -186,29 +186,33 @@ jobs:
|
|||||||
if: runner.os == 'macOS'
|
if: runner.os == 'macOS'
|
||||||
run: brew upgrade && brew install ninja
|
run: brew upgrade && brew install ninja
|
||||||
|
|
||||||
- name: Set SIMD flags
|
- name: Set SIMD flags (Windows)
|
||||||
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
|
if: runner.os == 'Windows'
|
||||||
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
${{ runner.os == 'Windows' && '
|
|
||||||
$simd = "${{ matrix.simd }}"
|
$simd = "${{ matrix.simd }}"
|
||||||
if ($simd -eq "none") {
|
if ($simd -eq "none") {
|
||||||
$Env:CFLAGS = ""
|
$env:CFLAGS = ""
|
||||||
} elseif ($simd -eq "sse") {
|
} elseif ($simd -eq "sse") {
|
||||||
$Env:CFLAGS = "-arch:SSE"
|
$env:CFLAGS = "-arch:SSE"
|
||||||
} elseif ($simd -eq "sse2") {
|
} elseif ($simd -eq "sse2") {
|
||||||
$Env:CFLAGS = "-arch:SSE2"
|
$env:CFLAGS = "-arch:SSE2"
|
||||||
} elseif ($simd -eq "sse3") {
|
} elseif ($simd -eq "sse3") {
|
||||||
$Env:CFLAGS = "-arch:SSE3"
|
$env:CFLAGS = "-arch:SSE3"
|
||||||
} elseif ($simd -eq "sse4") {
|
} elseif ($simd -eq "sse4") {
|
||||||
$Env:CFLAGS = "-arch:SSE4"
|
$env:CFLAGS = "-arch:SSE4"
|
||||||
} elseif ($simd -eq "avx") {
|
} elseif ($simd -eq "avx") {
|
||||||
$Env:CFLAGS = "-arch:AVX"
|
$env:CFLAGS = "-arch:AVX"
|
||||||
} elseif ($simd -eq "avx2") {
|
} elseif ($simd -eq "avx2") {
|
||||||
$Env:CFLAGS = "-arch:AVX2"
|
$env:CFLAGS = "-arch:AVX2"
|
||||||
} elseif ($simd -eq "neon") {
|
} elseif ($simd -eq "neon") {
|
||||||
$Env:CFLAGS = "-arch:NEON"
|
$env:CFLAGS = "-arch:NEON"
|
||||||
}
|
}
|
||||||
' || '
|
|
||||||
|
- name: Set SIMD flags (Unix)
|
||||||
|
if: runner.os != 'Windows'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
if [ "${{ matrix.simd }}" == "none" ]; then
|
if [ "${{ matrix.simd }}" == "none" ]; then
|
||||||
export CFLAGS=""
|
export CFLAGS=""
|
||||||
elif [ "${{ matrix.simd }}" == "sse" ]; then
|
elif [ "${{ matrix.simd }}" == "sse" ]; then
|
||||||
@@ -226,16 +230,16 @@ jobs:
|
|||||||
elif [ "${{ matrix.simd }}" == "neon" ]; then
|
elif [ "${{ matrix.simd }}" == "neon" ]; then
|
||||||
export CFLAGS="-mfpu=neon"
|
export CFLAGS="-mfpu=neon"
|
||||||
fi
|
fi
|
||||||
' }}
|
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake (Windows)
|
||||||
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
|
if: runner.os == 'Windows'
|
||||||
run: |
|
shell: pwsh
|
||||||
${{ runner.os == 'Windows' && '
|
run: 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
|
||||||
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
|
|
||||||
' || '
|
- name: Configure CMake (Unix)
|
||||||
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="$CFLAGS" -DCGLM_STATIC=ON -DCGLM_USE_TEST=ON
|
if: runner.os != 'Windows'
|
||||||
' }}
|
shell: bash
|
||||||
|
run: cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="$CFLAGS" -DCGLM_STATIC=ON -DCGLM_USE_TEST=ON
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build
|
run: cmake --build build
|
||||||
|
Reference in New Issue
Block a user