fix(ci): disable SIMD to prevent SIGILL, add Windows and macOS tests #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| # ============================================================================= | |
| # Linux Tests | |
| # ============================================================================= | |
| test-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| meson \ | |
| ninja-build \ | |
| pkg-config \ | |
| libsqlite3-dev \ | |
| libbenchmark-dev \ | |
| python3-pip \ | |
| gcovr | |
| - name: Configure (coverage, no SIMD) | |
| run: | | |
| meson setup build_coverage \ | |
| -Dbuildtype=debugoptimized \ | |
| -Db_coverage=true \ | |
| -Denable_simd_avx=false \ | |
| -Denable_simd_neon=false | |
| - name: Build | |
| run: meson compile -C build_coverage | |
| - name: Test | |
| run: meson test -C build_coverage | |
| - name: Coverage (summary + artifacts) | |
| run: | | |
| mkdir -p coverage | |
| gcovr -r . \ | |
| --object-directory build_coverage \ | |
| --exclude '.*build.*' \ | |
| --exclude '.*third_party.*' \ | |
| --exclude '.*benchmarks.*' \ | |
| --print-summary \ | |
| --html-details coverage/index.html \ | |
| --cobertura coverage/coverage.xml | |
| - name: Upload coverage artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-linux | |
| path: coverage/ | |
| # ============================================================================= | |
| # Linux TSAN | |
| # ============================================================================= | |
| tsan-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| clang \ | |
| meson \ | |
| ninja-build \ | |
| pkg-config \ | |
| libsqlite3-dev | |
| - name: Configure (TSAN, no SIMD) | |
| run: | | |
| CC=clang CXX=clang++ meson setup build_tsan \ | |
| -Dbuildtype=debugoptimized \ | |
| -Db_sanitize=thread \ | |
| -Denable_simd_avx=false \ | |
| -Denable_simd_neon=false | |
| - name: Build | |
| run: meson compile -C build_tsan | |
| - name: Test | |
| run: meson test -C build_tsan | |
| # ============================================================================= | |
| # Linux Benchmarks | |
| # ============================================================================= | |
| benchmarks-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| meson \ | |
| ninja-build \ | |
| pkg-config \ | |
| libsqlite3-dev \ | |
| libbenchmark-dev | |
| - name: Configure (release + benchmarks, no SIMD) | |
| run: | | |
| meson setup build_bench \ | |
| -Dbuildtype=release \ | |
| -Denable_benchmarks=true \ | |
| -Denable_simd_avx=false \ | |
| -Denable_simd_neon=false | |
| - name: Build | |
| run: meson compile -C build_bench | |
| - name: Run benchmarks | |
| run: | | |
| mkdir -p bench_results | |
| ./build_bench/benchmarks/rag_pipeline_benchmark --benchmark_min_time=0.2s --benchmark_out=bench_results/rag.json --benchmark_out_format=json | |
| ./build_bench/benchmarks/batch_distance_benchmark --benchmark_min_time=0.2s --benchmark_out=bench_results/batch.json --benchmark_out_format=json | |
| - name: Upload benchmark artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bench_results-linux | |
| path: bench_results/*.json | |
| # ============================================================================= | |
| # macOS Tests (ARM64 - NEON) | |
| # ============================================================================= | |
| test-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install build dependencies | |
| run: | | |
| brew install meson ninja pkg-config sqlite | |
| - name: Configure | |
| run: | | |
| meson setup build \ | |
| -Dbuildtype=debugoptimized \ | |
| -Denable_simd_avx=false \ | |
| -Denable_simd_neon=true | |
| - name: Build | |
| run: meson compile -C build | |
| - name: Test | |
| run: meson test -C build | |
| # ============================================================================= | |
| # Windows Tests (MSVC) | |
| # ============================================================================= | |
| test-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install build dependencies | |
| run: | | |
| pip install meson ninja | |
| - name: Setup MSVC | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Install SQLite via vcpkg | |
| run: | | |
| git clone https://github.com/microsoft/vcpkg.git C:\vcpkg | |
| C:\vcpkg\bootstrap-vcpkg.bat | |
| C:\vcpkg\vcpkg install sqlite3:x64-windows | |
| - name: Configure | |
| run: | | |
| meson setup build ` | |
| -Dbuildtype=debugoptimized ` | |
| -Denable_simd_avx=false ` | |
| -Denable_simd_neon=false ` | |
| --pkg-config-path=C:\vcpkg\installed\x64-windows\lib\pkgconfig | |
| - name: Build | |
| run: meson compile -C build | |
| - name: Test | |
| run: meson test -C build | |
| # ============================================================================= | |
| # Windows Tests (MinGW) | |
| # ============================================================================= | |
| test-windows-mingw: | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MINGW64 | |
| update: true | |
| install: >- | |
| mingw-w64-x86_64-gcc | |
| mingw-w64-x86_64-meson | |
| mingw-w64-x86_64-ninja | |
| mingw-w64-x86_64-pkg-config | |
| mingw-w64-x86_64-sqlite3 | |
| - name: Configure | |
| run: | | |
| meson setup build \ | |
| -Dbuildtype=debugoptimized \ | |
| -Denable_simd_avx=false \ | |
| -Denable_simd_neon=false | |
| - name: Build | |
| run: meson compile -C build | |
| - name: Test | |
| run: meson test -C build |