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:
60
.github/workflows/ci.yml
vendored
60
.github/workflows/ci.yml
vendored
@@ -188,33 +188,24 @@ 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 (Windows)
|
- name: Set SIMD flags
|
||||||
if: runner.os == 'Windows'
|
shell: ${{ (runner.os == 'Windows' && 'pwsh') || 'bash' }}
|
||||||
shell: pwsh
|
|
||||||
run: |
|
run: |
|
||||||
$simd = "${{ matrix.simd }}"
|
${{ (runner.os == 'Windows' && 'function Set-Flags {
|
||||||
if ($simd -eq "none") {
|
$simd = $env:MATRIX_SIMD
|
||||||
$env:CFLAGS = ""
|
switch ($simd) {
|
||||||
} elseif ($simd -eq "sse") {
|
"none" { $env:CFLAGS = "" }
|
||||||
$env:CFLAGS = "-arch:SSE"
|
"sse" { $env:CFLAGS = "-arch:SSE" }
|
||||||
} elseif ($simd -eq "sse2") {
|
"sse2" { $env:CFLAGS = "-arch:SSE2" }
|
||||||
$env:CFLAGS = "-arch:SSE2"
|
"sse3" { $env:CFLAGS = "-arch:SSE3" }
|
||||||
} elseif ($simd -eq "sse3") {
|
"sse4" { $env:CFLAGS = "-arch:SSE4" }
|
||||||
$env:CFLAGS = "-arch:SSE3"
|
"avx" { $env:CFLAGS = "-arch:AVX" }
|
||||||
} elseif ($simd -eq "sse4") {
|
"avx2" { $env:CFLAGS = "-arch:AVX2" }
|
||||||
$env:CFLAGS = "-arch:SSE4"
|
"neon" { $env:CFLAGS = "-arch:NEON" }
|
||||||
} elseif ($simd -eq "avx") {
|
}
|
||||||
$env:CFLAGS = "-arch:AVX"
|
|
||||||
} elseif ($simd -eq "avx2") {
|
|
||||||
$env:CFLAGS = "-arch:AVX2"
|
|
||||||
} elseif ($simd -eq "neon") {
|
|
||||||
$env:CFLAGS = "-arch:NEON"
|
|
||||||
}
|
}
|
||||||
|
$env:MATRIX_SIMD = "' + matrix.simd + '"
|
||||||
- name: Set SIMD flags (Unix)
|
Set-Flags') || '
|
||||||
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
|
||||||
@@ -231,25 +222,20 @@ jobs:
|
|||||||
export CFLAGS="-mavx2"
|
export CFLAGS="-mavx2"
|
||||||
elif [ "${{ matrix.simd }}" == "neon" ]; then
|
elif [ "${{ matrix.simd }}" == "neon" ]; then
|
||||||
export CFLAGS="-mfpu=neon"
|
export CFLAGS="-mfpu=neon"
|
||||||
fi
|
fi' }}
|
||||||
|
|
||||||
- name: Configure CMake (Windows)
|
- name: Configure CMake
|
||||||
if: runner.os == 'Windows'
|
shell: ${{ (runner.os == 'Windows' && 'pwsh') || 'bash' }}
|
||||||
shell: pwsh
|
run: |
|
||||||
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 -DCGLM_USE_C99=OFF -DCGLM_SHARED=OFF
|
${{ (runner.os == 'Windows' && 'cmake -B build -G "Visual Studio 17 2022" -A x64 -T host=x64 -DCMAKE_BUILD_TYPE=Release -DCGLM_STATIC=ON -DCGLM_USE_TEST=ON -DCGLM_USE_C99=OFF -DCGLM_SHARED=OFF -DCMAKE_C_FLAGS="$env:CFLAGS"') || 'cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DCGLM_STATIC=ON -DCGLM_USE_TEST=ON -DCGLM_USE_C99=OFF -DCGLM_SHARED=OFF -DCMAKE_C_FLAGS="$CFLAGS"' }}
|
||||||
|
|
||||||
- name: Configure CMake (Unix)
|
|
||||||
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 -DCGLM_USE_C99=OFF -DCGLM_SHARED=OFF
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --config Release
|
run: cmake --build build --config Release
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
working-directory: build
|
working-directory: build
|
||||||
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
|
shell: ${{ (runner.os == 'Windows' && 'pwsh') || 'bash' }}
|
||||||
run: ${{ runner.os == 'Windows' && '.\Release\tests.exe' || './tests' }}
|
run: ${{ (runner.os == 'Windows' && '.\Release\tests.exe') || './tests' }}
|
||||||
|
|
||||||
build_meson:
|
build_meson:
|
||||||
name: Meson / ${{ matrix.os }} / ${{ matrix.simd }}
|
name: Meson / ${{ matrix.os }} / ${{ matrix.simd }}
|
||||||
|
Reference in New Issue
Block a user