Update ci.yml

This commit is contained in:
Recep Aslantas
2025-01-23 13:04:37 +03:00
parent 5672370e31
commit f4993318d2

View File

@@ -276,27 +276,33 @@ jobs:
- name: Install meson - name: Install meson
run: python3 -m pip install meson ninja run: python3 -m pip install meson ninja
- name: Set SIMD flags - name: Set SIMD flags (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: | run: |
if ($Env:RUNNER_OS -eq 'Windows') { $simd = "${{ matrix.simd }}"
if ($Env:SIMD -eq 'none') { if ($simd -eq "none") {
$Env:CFLAGS="" $env:CFLAGS = ""
} elseif ($Env:SIMD -eq 'sse') { } elseif ($simd -eq "sse") {
$Env:CFLAGS="-arch:SSE" $env:CFLAGS = "-arch:SSE"
} elseif ($Env:SIMD -eq 'sse2') { } elseif ($simd -eq "sse2") {
$Env:CFLAGS="-arch:SSE2" $env:CFLAGS = "-arch:SSE2"
} elseif ($Env:SIMD -eq 'sse3') { } elseif ($simd -eq "sse3") {
$Env:CFLAGS="-arch:SSE3" $env:CFLAGS = "-arch:SSE3"
} elseif ($Env:SIMD -eq 'sse4') { } elseif ($simd -eq "sse4") {
$Env:CFLAGS="-arch:SSE4" $env:CFLAGS = "-arch:SSE4"
} elseif ($Env:SIMD -eq 'avx') { } elseif ($simd -eq "avx") {
$Env:CFLAGS="-arch:AVX" $env:CFLAGS = "-arch:AVX"
} elseif ($Env:SIMD -eq 'avx2') { } elseif ($simd -eq "avx2") {
$Env:CFLAGS="-arch:AVX2" $env:CFLAGS = "-arch:AVX2"
} elseif ($Env:SIMD -eq 'neon') { } elseif ($simd -eq "neon") {
$Env:CFLAGS="-arch:NEON" $env:CFLAGS = "-arch:NEON"
} }
} else {
- 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
@@ -314,9 +320,17 @@ jobs:
elif [ "${{ matrix.simd }}" == "neon" ]; then elif [ "${{ matrix.simd }}" == "neon" ]; then
export CFLAGS="-mfpu=neon" export CFLAGS="-mfpu=neon"
fi fi
}
- name: Build with meson - name: Build with meson (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
meson setup build -Dbuildtype=release --default-library=static -Dbuild_tests=true -Dc_args="$env:CFLAGS"
meson test -C build
- name: Build with meson (Unix)
if: runner.os != 'Windows'
shell: bash
run: | run: |
meson setup build -Dbuildtype=release --default-library=static -Dbuild_tests=true -Dc_args="$CFLAGS" meson setup build -Dbuildtype=release --default-library=static -Dbuild_tests=true -Dc_args="$CFLAGS"
meson test -C build meson test -C build