Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
90acf9c
Enable full SDK builds without C++ exceptions
bmehta001 Oct 1, 2026
d71a437
Keep public no-exceptions CI independent of private modules
bmehta001 Oct 1, 2026
da4b090
Reject unsafe profile JSON conversions without exceptions
bmehta001 Oct 1, 2026
00a3194
Merge remote-tracking branch 'msft/main' into fix/full-no-exceptions-sdk
bmehta001 Oct 2, 2026
90dcde5
Support exception-free native builds across platforms
bmehta001 Oct 2, 2026
2feba2e
Make loopback AI tests wait without starving the HTTP server
bmehta001 Oct 5, 2026
86cdf51
Respect C++ exception mode and physical cache limits across CI platforms
bmehta001 Oct 5, 2026
376ee1c
Preserve Windows API signatures without incompatible procedure casts
bmehta001 Oct 5, 2026
a546a9b
Track merged module fixes from master
bmehta001 Oct 5, 2026
271e9c4
Merge branch 'main' into fix/full-no-exceptions-sdk
bmehta001 Oct 5, 2026
19a503e
Merge branch 'main' into fix/full-no-exceptions-sdk
bmehta001 Oct 6, 2026
ef64a5d
Merge main to preserve decoder coverage and restore leak-analysis CI
bmehta001 Oct 6, 2026
bff54fb
Address review blockers so no-exceptions builds exercise runtime fail…
bmehta001 Oct 6, 2026
1503a10
Test real expansion allocation failures instead of size-guard rejection
bmehta001 Oct 6, 2026
4c2f006
Expose native build policies so vcpkg consumers can select SDK behavior
bmehta001 Oct 6, 2026
9c93080
Consolidate port option handling to avoid redundant compatibility flags
bmehta001 Oct 6, 2026
e563304
Remove recent dependency shims in favor of provider selection
bmehta001 Oct 6, 2026
f2783f3
Centralize build policy and make test failures visible
bmehta001 Oct 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions .github/scripts/run-drmemory.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,25 @@ $ErrorActionPreference = "Stop"
function Get-LeakCount {
param(
[Parameter(Mandatory = $true)]
[string]$Results,
[string[]]$Results,

[Parameter(Mandatory = $true)]
[string]$Category
)

$escapedCategory = [regex]::Escape($Category)
$pattern = "(?m)^\s*(?:~~Dr\.M~~\s+)?([\d,]+) unique,\s+([\d,]+) total,\s+([\d,]+) byte\(s\) of $escapedCategory\r?$"
$match = [regex]::Match($Results, $pattern)
if (-not $match.Success) {
throw "Dr. Memory results do not contain the '$Category' summary."
}

return @{
Unique = [int64]($match.Groups[1].Value -replace ",", "")
Total = [int64]($match.Groups[2].Value -replace ",", "")
Bytes = [int64]($match.Groups[3].Value -replace ",", "")
$counts = @{ Unique = [int64]0; Total = [int64]0; Bytes = [int64]0 }
foreach ($result in $Results) {
$match = [regex]::Match($result, $pattern)
if (-not $match.Success) {
throw "Dr. Memory results do not contain the '$Category' summary."
}
$counts.Unique += [int64]($match.Groups[1].Value -replace ",", "")
$counts.Total += [int64]($match.Groups[2].Value -replace ",", "")
$counts.Bytes += [int64]($match.Groups[3].Value -replace ",", "")
}
return $counts
}

$resolvedDrMemoryPath = (Resolve-Path -LiteralPath $DrMemoryPath).Path
Expand All @@ -70,11 +71,12 @@ $resultFiles = @(Get-ChildItem -LiteralPath $scenarioDirectory -Filter results.t
$resultFiles = @($resultFiles | Where-Object {
Select-String -LiteralPath $_.FullName -Pattern '^(?:NO )?ERRORS FOUND:\r?$' -Quiet
})
if ($resultFiles.Count -ne 1) {
throw "Expected one completed Dr. Memory results.txt for $Scenario, found $($resultFiles.Count)."
if ($resultFiles.Count -eq 0) {
throw "Expected at least one completed Dr. Memory results.txt for $Scenario, found none."
}

$results = Get-Content -LiteralPath $resultFiles[0].FullName -Raw
# Forked tests produce separate reports; include every completed process.
$results = @($resultFiles | ForEach-Object { Get-Content -LiteralPath $_.FullName -Raw })
$leaks = Get-LeakCount -Results $results -Category "leak(s)"
$possibleLeaks = Get-LeakCount -Results $results -Category "possible leak(s)"
$reachable = Get-LeakCount -Results $results -Category "still-reachable allocation(s)"
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- dev/*
- release/*
- buildme/*
- fix/*
- maharrim/*

pull_request:
Expand All @@ -30,6 +31,35 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
no-exceptions:
name: Android without C++ exceptions (${{ matrix.abi }}, Room=${{ matrix.room }})
runs-on: ubuntu-latest
strategy:
Comment thread
bmehta001 marked this conversation as resolved.
fail-fast: false
matrix:
abi: [armeabi-v7a, arm64-v8a, x86, x86_64]
room: [OFF, ON]
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Configure full JNI SDK
run: >-
cmake -S . -B out-no-exceptions -G Ninja
-DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake"
-DANDROID_ABI=${{ matrix.abi }}
-DANDROID_PLATFORM=android-24
-DCMAKE_BUILD_TYPE=Debug
-DMATSDK_DISABLE_EXCEPTIONS=ON
-DMATSDK_BUILD_JNI_WRAPPER=ON
-DMATSDK_ANDROID_USE_ROOM=${{ matrix.room }}
-DMATSDK_DISABLE_LOGGING=${{ matrix.room }}
-DMATSDK_BUILD_UNIT_TESTS=OFF
-DMATSDK_BUILD_FUNC_TESTS=OFF
-DMATSDK_BUILD_TEST_TOOL=OFF
-DMATSDK_BUILD_PACKAGE=OFF
- name: Compile full SDK
run: cmake --build out-no-exceptions --target mat --parallel 2

build:
runs-on: windows-latest
name: Build for Android
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/build-ios-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- dev/*
- release/*
- buildme/*
- fix/*

pull_request:
branches:
Expand All @@ -31,6 +32,34 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
no-exceptions:
name: iOS without C++ exceptions (${{ matrix.sdk }})
runs-on: macos-latest
strategy:
matrix:
sdk: [iphoneos, iphonesimulator]
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Configure SDK and Objective-C wrappers
run: >-
cmake -S . -B out-no-exceptions -G Xcode
-DCMAKE_SYSTEM_NAME=iOS
-DCMAKE_OSX_SYSROOT=${{ matrix.sdk }}
-DCMAKE_OSX_ARCHITECTURES=arm64
-DCMAKE_OSX_DEPLOYMENT_TARGET=13.0
-DMATSDK_DISABLE_EXCEPTIONS=ON
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=NO
-DMATSDK_BUILD_OBJC_WRAPPER=ON
-DMATSDK_BUILD_SWIFT_WRAPPER=OFF
-DMATSDK_BUILD_UNIT_TESTS=OFF
-DMATSDK_BUILD_FUNC_TESTS=OFF
-DMATSDK_BUILD_TEST_TOOL=OFF
-DMATSDK_BUILD_PACKAGE=OFF
- name: Compile full SDK
run: cmake --build out-no-exceptions --config Debug --target mat --parallel 2

build:
strategy:
matrix:
Expand Down
57 changes: 44 additions & 13 deletions .github/workflows/build-posix-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- dev/*
- release/*
- buildme/*
- fix/*

pull_request:
branches:
Expand All @@ -31,6 +32,17 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build-runner:
name: Build runner contracts (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Verify test-runner failure propagation
run: python3 tests/build-runner-tests.py

build:

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -92,23 +104,42 @@ jobs:
run: bash tests/headers/check_public_headers.sh

no-exceptions:
name: Linux Curl without C++ exceptions
runs-on: ubuntu-latest
name: Full SDK without C++ exceptions (${{ matrix.os }}, ${{ matrix.compiler }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
compiler: gcc
cc: gcc
cxx: g++
- os: ubuntu-latest
compiler: clang
cc: clang
cxx: clang++
- os: macos-latest
compiler: appleclang
cc: clang
cxx: clang++
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Install Curl development package
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev
- name: Install build dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y clang libcurl4-openssl-dev libsqlite3-dev zlib1g-dev
- name: Configure
run: >-
cmake -S . -B out-no-exceptions
cmake -S tests/no-exceptions -B out-no-exceptions
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_CXX_FLAGS=-fno-exceptions
-DMATSDK_BUILD_UNIT_TESTS=OFF
-DMATSDK_BUILD_FUNC_TESTS=OFF
-DMATSDK_BUILD_TEST_TOOL=OFF
- name: Compile Curl transport
- name: Compile full SDK
run: >-
make -C out-no-exceptions
-f lib/CMakeFiles/mat.dir/build.make
lib/CMakeFiles/mat.dir/http/HttpClient_Curl.cpp.o
cmake --build out-no-exceptions --target no-exceptions-smoke --parallel 2
- name: Exercise no-exceptions runtime failure paths
run: ctest --test-dir out-no-exceptions --output-on-failure
- name: Public headers and exception macro regression
if: runner.os == 'macOS'
run: bash tests/headers/check_public_headers.sh
34 changes: 34 additions & 0 deletions .github/workflows/build-windows-vs2022.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- master
- main
- dev
- fix/*

pull_request:
branches:
Expand All @@ -20,6 +21,39 @@ permissions:
contents: read

jobs:
no-exceptions:
name: Windows without C++ exceptions (${{ matrix.compiler }}, WinInet=${{ matrix.wininet }})
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
compiler: [msvc, clang-cl]
wininet: [OFF, ON]
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Configure full SDK
shell: pwsh
run: |
$options = @(
'-S', 'tests/no-exceptions', '-B', 'out-no-exceptions',
'-G', 'Visual Studio 17 2022', '-A', 'x64',
'-DMATSDK_USE_WININET=${{ matrix.wininet }}'
)
if ('${{ matrix.compiler }}' -eq 'clang-cl') {
$options += @('-T', 'ClangCL')
}
cmake @options
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
- name: Compile full SDK
run: cmake --build out-no-exceptions --config Debug --target no-exceptions-smoke --parallel 2
- name: Exercise no-exceptions runtime failure paths
run: ctest --test-dir out-no-exceptions -C Debug --output-on-failure
- name: Public headers and exception macro regression
if: matrix.compiler == 'msvc' && matrix.wininet == 'OFF'
shell: cmd
run: tests\headers\check_public_headers.cmd

build:

runs-on: windows-2022
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/memory-leak-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- main
paths:
- .github/scripts/run-drmemory.ps1
- tests/memory-leak-analysis/**
- .github/memory-leak-baseline.csv
- .github/workflows/memory-leak-analysis.yml
- CMakeLists.txt
Expand All @@ -28,6 +29,7 @@ on:
- main
paths:
- .github/scripts/run-drmemory.ps1
- tests/memory-leak-analysis/**
- .github/memory-leak-baseline.csv
- .github/workflows/memory-leak-analysis.yml

Expand All @@ -51,6 +53,10 @@ jobs:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- name: Test Dr. Memory report parsing
shell: pwsh
run: ./tests/memory-leak-analysis/run-drmemory-tests.ps1

- name: Initialize googletest
run: git submodule update --init --depth=1 third_party/googletest

Expand Down Expand Up @@ -170,6 +176,10 @@ jobs:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- name: Test Dr. Memory report parsing
shell: pwsh
run: ./tests/memory-leak-analysis/run-drmemory-tests.ps1

- name: Initialize googletest
run: git submodule update --init --depth=1 third_party/googletest

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-embedding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Build and run
run: |
cmake --build build-embedding --target embedding_test --parallel 4
./build-embedding/embedding_test
ctest --test-dir build-embedding --output-on-failure

windows:
runs-on: windows-2022
Expand All @@ -98,7 +98,7 @@ jobs:
shell: pwsh
run: |
cmake --build build-embedding --config Release --target embedding_test -- /m
& .\build-embedding\Release\embedding_test.exe
ctest --test-dir build-embedding -C Release --output-on-failure

installed-package-linux:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${RUNNER_TEMP}/matsdk"
cmake --build build-consumer --parallel 4
./build-consumer/vcpkg_test
ctest --test-dir build-consumer --output-on-failure

installed-package-macos:
runs-on: macos-latest
Expand All @@ -171,7 +171,7 @@ jobs:
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${RUNNER_TEMP}/matsdk"
cmake --build build-consumer --parallel 4
./build-consumer/vcpkg_test
ctest --test-dir build-consumer --output-on-failure

macos:
runs-on: macos-latest
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/test-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,17 @@ jobs:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Test release port promotion
run: python tests/vcpkg/test-release-port.py
- name: Verify native feature mappings
run: cmake -P tests/vcpkg/native-feature-tests.cmake

windows:
runs-on: windows-latest
name: Windows (x64-windows-static, ${{ matrix.transport }})
name: Windows (x64-windows-static, ${{ matrix.transport }}, ${{ matrix.features }})
strategy:
fail-fast: false
matrix:
transport: [WinHTTP, WinInet]
features: [default, "minimal-sqlite;no-exceptions;no-logging"]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

Expand All @@ -56,6 +59,9 @@ jobs:
if ("${{ matrix.transport }}" -eq "WinInet") {
$arguments.WinInet = $true
}
if ("${{ matrix.features }}" -ne "default") {
$arguments.Features = "${{ matrix.features }}".Split(';')
}
.\tests\vcpkg\test-vcpkg-windows.ps1 @arguments
shell: pwsh

Expand All @@ -65,7 +71,7 @@ jobs:
strategy:
fail-fast: false
matrix:
features: [default, minimal-sqlite]
features: [default, minimal-sqlite, "minimal-sqlite;no-exceptions;no-logging"]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

Expand Down Expand Up @@ -123,7 +129,7 @@ jobs:
strategy:
fail-fast: false
matrix:
features: [default, minimal-sqlite, "minimal-sqlite;android-curl-openssl", "minimal-sqlite;android-curl-mbedtls"]
features: [default, minimal-sqlite, "minimal-sqlite;android-curl-openssl", "minimal-sqlite;android-curl-mbedtls", "minimal-sqlite;no-exceptions;no-logging;android-capi-http-client"]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

Expand Down
Loading
Loading