Restore the dormbr P-right smoke test shape that actually changes C(0… #164
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| MS_CI_LINUX_FLAGS: >- | |
| -DMS_BUILD_TESTS=ON | |
| -DMS_ENABLE_CUDA=OFF | |
| -DMS_ENABLE_AVX512=OFF | |
| jobs: | |
| build-test-windows: | |
| name: Build & test (Windows MSVC) | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup MSVC | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| - name: Ensure NSIS | |
| run: | | |
| if (Get-Command makensis -ErrorAction SilentlyContinue) { | |
| Write-Host "makensis already available" | |
| } else { | |
| Write-Host "makensis not found; installing NSIS via Chocolatey" | |
| choco install nsis -y --no-progress | |
| $env:Path = [System.Environment]::GetEnvironmentVariable('Path', 'Machine') + ';' + [System.Environment]::GetEnvironmentVariable('Path', 'User') | |
| } | |
| - name: Configure | |
| run: > | |
| cmake -S . -B build-msvc -G Ninja | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DMS_BUILD_TESTS=ON | |
| -DMS_ENABLE_CUDA=OFF | |
| -DMS_ENABLE_AVX512=OFF | |
| - name: Build | |
| run: cmake --build build-msvc --config Release | |
| - name: Test | |
| run: ctest --test-dir build-msvc --output-on-failure | |
| - name: Install smoke | |
| run: pwsh -NoProfile -File scripts/package_smoke.ps1 build-msvc install-smoke | |
| - name: Upload package artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mathscript-windows-zip | |
| path: build-msvc/mathscript-*.zip | |
| if-no-files-found: error | |
| - name: NSIS package smoke | |
| run: | | |
| if (-not (Get-Command makensis -ErrorAction SilentlyContinue)) { | |
| Write-Host "makensis not found; skipping NSIS package" | |
| exit 0 | |
| } | |
| Push-Location build-msvc | |
| cpack -G NSIS | |
| Get-ChildItem mathscript-*.exe | |
| Pop-Location | |
| - name: WiX package smoke | |
| run: | | |
| $hasCandle = Get-Command candle -ErrorAction SilentlyContinue | |
| $hasLight = Get-Command light -ErrorAction SilentlyContinue | |
| if (-not $hasCandle -or -not $hasLight) { | |
| Write-Host "WiX tools (candle/light) not found; skipping WIX package" | |
| exit 0 | |
| } | |
| Push-Location build-msvc | |
| cpack -G WIX | |
| Get-ChildItem mathscript-*.msi | |
| Pop-Location | |
| build-test-linux: | |
| name: Build & test (Linux GCC 13) | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install toolchain | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y g++-13 ninja-build lld ripgrep rpm | |
| - name: Configure | |
| run: cmake -S . -B build-linux -G Ninja -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13 -DCMAKE_BUILD_TYPE=Release ${{ env.MS_CI_LINUX_FLAGS }} | |
| - name: No-exceptions tree gate | |
| run: | | |
| set -euo pipefail | |
| CXX=g++-13 | |
| FLAGS=(-std=c++23 -fno-exceptions -fsyntax-only -Iinclude -Ibuild-linux/include) | |
| files=( | |
| src/core/tensor.cpp | |
| src/poly/poly.cpp | |
| src/bignum/bignum.cpp | |
| src/control/control.cpp | |
| src/fem/fem.cpp | |
| src/cpu/blas.cpp | |
| src/runtime/cpu/blas_dgemm.cpp | |
| ) | |
| for f in "${files[@]}"; do | |
| echo "checking $f" | |
| "$CXX" "${FLAGS[@]}" -c "$f" -o /dev/null | |
| done | |
| - name: Build | |
| run: cmake --build build-linux | |
| - name: Test | |
| run: ctest --test-dir build-linux --output-on-failure | |
| - name: Install smoke | |
| run: bash scripts/package_smoke.sh build-linux install-smoke | |
| - name: Upload package artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mathscript-linux-tgz | |
| path: build-linux/mathscript-*.tar.gz | |
| if-no-files-found: error | |
| - name: Package smoke | |
| run: | | |
| cd build-linux | |
| cpack -G TGZ | |
| cpack -G ZIP | |
| ls -la mathscript-*.tar.gz mathscript-*.zip | |
| if command -v dpkg-deb >/dev/null 2>&1; then | |
| cpack -G DEB | |
| ls -la mathscript*.deb | |
| else | |
| echo "dpkg-deb not found; skipping DEB package" | |
| fi | |
| if command -v rpmbuild >/dev/null 2>&1; then | |
| cpack -G RPM | |
| ls -la mathscript*.rpm | |
| else | |
| echo "rpmbuild not found; skipping RPM package" | |
| fi | |
| - name: Unsafe surface audit | |
| run: bash scripts/unsafe_report.sh build-linux/unsafe_report.txt | |
| - name: Unsafe surface delta | |
| run: bash scripts/unsafe_delta.sh build-linux/unsafe_report.txt | |
| - name: Vendor checksum verify | |
| run: bash scripts/verify_vendor.sh | |
| coverage-linux: | |
| name: Coverage (Linux GCC 13) | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Free disk space | |
| run: bash scripts/ci_free_disk.sh | |
| - name: Install toolchain | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y g++-13 ninja-build lld lcov | |
| - name: Configure | |
| run: > | |
| cmake -S . -B build-cov -G Ninja | |
| -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13 | |
| -DCMAKE_BUILD_TYPE=Debug | |
| -DCMAKE_CXX_FLAGS_DEBUG="-O0 -g1 -fno-omit-frame-pointer" | |
| -DMS_ENABLE_COVERAGE=ON | |
| -DMS_BUILD_INTEGRATION=ON | |
| -DMS_LINK_TESTS_SHARED=ON | |
| ${{ env.MS_CI_LINUX_FLAGS }} | |
| - name: Build | |
| run: cmake --build build-cov | |
| - name: Test | |
| run: ctest --test-dir build-cov --output-on-failure | |
| - name: Coverage report | |
| env: | |
| MS_COVERAGE_MIN: "80" | |
| run: bash scripts/coverage_report.sh build-cov | |
| - name: Upload coverage summary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-summary | |
| path: build-cov/coverage-summary.txt | |
| if-no-files-found: error | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: build-cov/coverage.info | |
| if-no-files-found: error | |
| fuzz-linux: | |
| name: libFuzzer smoke (Linux Clang) | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install toolchain | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang lld ninja-build g++-13 | |
| - name: Configure | |
| run: cmake -S . -B build-fuzz -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DMS_BUILD_FUZZ=ON ${{ env.MS_CI_LINUX_FLAGS }} | |
| - name: Build fuzz targets | |
| run: > | |
| cmake --build build-fuzz --target | |
| fuzz_special_fns fuzz_matrix_ops fuzz_repl_input | |
| fuzz_sym_parser fuzz_poly_ops fuzz_bignum fuzz_mpi_message | |
| - name: Run fuzz smoke | |
| run: | | |
| for target in fuzz_special_fns fuzz_matrix_ops fuzz_repl_input \ | |
| fuzz_sym_parser fuzz_poly_ops fuzz_bignum fuzz_mpi_message; do | |
| CORPUS="tests/fuzz/corpus/${target}" | |
| ARGS=(-runs=4096 -max_total_time=30) | |
| if [ -d "${CORPUS}" ]; then | |
| ARGS+=(-corpus_dir="${CORPUS}") | |
| fi | |
| ./build-fuzz/tests/fuzz/${target} "${ARGS[@]}" | |
| done | |
| valgrind-linux: | |
| name: Valgrind memcheck (Linux GCC 13) | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 180 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Free disk space | |
| run: bash scripts/ci_free_disk.sh | |
| - name: Install toolchain | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y g++-13 ninja-build lld valgrind | |
| - name: Configure | |
| run: > | |
| cmake -S . -B build-valgrind -G Ninja | |
| -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13 | |
| -DCMAKE_BUILD_TYPE=Debug | |
| -DCMAKE_CXX_FLAGS_DEBUG="-O0 -g1 -fno-omit-frame-pointer" | |
| -DMS_BUILD_INTEGRATION=OFF | |
| ${{ env.MS_CI_LINUX_FLAGS }} | |
| - name: Build | |
| run: cmake --build build-valgrind | |
| - name: Memcheck | |
| run: bash scripts/valgrind_tests.sh build-valgrind | |
| sanitizer-linux: | |
| name: AddressSanitizer + UBSan (Linux GCC 13) | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Free disk space | |
| run: bash scripts/ci_free_disk.sh | |
| - name: Install toolchain | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y g++-13 ninja-build lld | |
| - name: Configure | |
| run: > | |
| cmake -S . -B build-sanitizer -G Ninja | |
| -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13 | |
| -DCMAKE_BUILD_TYPE=Debug | |
| -DCMAKE_CXX_FLAGS_DEBUG="-O0 -g1 -fno-omit-frame-pointer" | |
| -DMS_ENABLE_ASAN=ON | |
| -DMS_BUILD_INTEGRATION=ON | |
| -DMS_LINK_TESTS_SHARED=ON | |
| -DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer" | |
| -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,undefined" | |
| ${{ env.MS_CI_LINUX_FLAGS }} | |
| - name: Build | |
| run: cmake --build build-sanitizer | |
| - name: Test | |
| env: | |
| ASAN_OPTIONS: detect_leaks=0:halt_on_error=1 | |
| run: > | |
| ctest --test-dir build-sanitizer --output-on-failure | |
| -E "test_fuzz_stress|test_cuda_matmul|test_cuda_stub" | |
| plugin-linux: | |
| name: Clang plugin smoke (Linux Clang + LLVM) | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install toolchain | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang lld ninja-build llvm-18-dev libclang-18-dev | |
| - name: Configure | |
| run: > | |
| cmake -S . -B build-plugin -G Ninja | |
| -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DMS_BUILD_TESTS=ON | |
| -DMS_BUILD_PLUGIN=ON | |
| -DMS_ENABLE_CUDA=OFF | |
| -DMS_ENABLE_AVX512=OFF | |
| -DLLVM_DIR=/usr/lib/llvm-18/lib/cmake/llvm | |
| -DClang_DIR=/usr/lib/llvm-18/lib/cmake/clang | |
| - name: Build plugin and smoke test | |
| run: cmake --build build-plugin --target ms_plugin test_plugin_smoke | |
| - name: Test plugin and compliance | |
| run: ctest --test-dir build-plugin -R 'test_plugin_smoke|compliance_' --output-on-failure | |
| jit-linux: | |
| name: LLVM ORC JIT smoke (Linux Clang + LLVM) | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install toolchain | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang lld ninja-build llvm-18-dev | |
| - name: Configure | |
| run: > | |
| cmake -S . -B build-jit -G Ninja | |
| -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DMS_BUILD_TESTS=ON | |
| -DMS_BUILD_JIT=ON | |
| -DMS_ENABLE_CUDA=OFF | |
| -DMS_ENABLE_AVX512=OFF | |
| -DLLVM_DIR=/usr/lib/llvm-18/lib/cmake/llvm | |
| - name: Build and test JIT backend | |
| run: | | |
| cmake --build build-jit --target test_jit_backend test_plot_console | |
| ctest --test-dir build-jit -R 'test_jit_backend|test_plot_console' --output-on-failure | |
| benchmark-linux: | |
| name: Benchmark regression (Linux GCC 13) | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install toolchain | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y g++-13 ninja-build lld | |
| - name: Configure | |
| run: > | |
| cmake -S . -B build-bench -G Ninja | |
| -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13 | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DMS_BUILD_TESTS=OFF | |
| -DMS_BUILD_BENCHMARKS=ON | |
| -DMS_ENABLE_CUDA=OFF | |
| -DMS_ENABLE_AVX512=OFF | |
| - name: Build benchmarks | |
| run: cmake --build build-bench | |
| - name: Benchmark regression | |
| env: | |
| MS_BENCH_REGRESSION: on | |
| MS_BENCH_TOLERANCE: "10" | |
| run: bash scripts/bench_regression.sh build-bench |