Skip to content

feat(sirix-core): add an exact-decimal column and answer predicate trees as selection bitmaps #4544

feat(sirix-core): add an exact-decimal column and answer predicate trees as selection bitmaps

feat(sirix-core): add an exact-decimal column and answer predicate trees as selection bitmaps #4544

Workflow file for this run

# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
push:
branches:
- main
- '[0-9]+.[0-9]+'
pull_request:
branches:
- main
- '[0-9]+.[0-9]+'
schedule:
- cron: '0 4 * * *'
jobs:
Build:
name: Compile and package
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '25'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Compile and package
run: ./gradlew classes testClasses :sirix-rest-api:shadowJar --parallel --refresh-dependencies
- name: Cache build output
uses: actions/cache/save@v4
with:
path: |
**/build
key: build-${{ github.run_id }}
TestCore:
name: Test sirix-core
needs: Build
runs-on: ubuntu-latest
# sirix-core is the heaviest test module; the test step was brushing the 20-min cap and getting
# cancelled (not failing) on busy runners. 35 min gives the suite comfortable headroom after the
# ~5 min of runner setup, without masking a genuine hang.
timeout-minutes: 35
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '25'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Restore build output
uses: actions/cache/restore@v4
with:
path: |
**/build
key: build-${{ github.run_id }}
- name: Test sirix-core
run: ./gradlew :sirix-core:test --info --stacktrace
TestQuery:
name: Test sirix-query, sirix-kotlin-api, sirix-kotlin-cli
needs: Build
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '25'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Restore build output
uses: actions/cache/restore@v4
with:
path: |
**/build
key: build-${{ github.run_id }}
- name: Test sirix-query, sirix-kotlin-api, and sirix-kotlin-cli
run: ./gradlew :sirix-query:test :sirix-kotlin-api:test :sirix-kotlin-cli:test --parallel --info --stacktrace
TestPlatforms:
name: Cross-platform tests (${{ matrix.os }} / ${{ matrix.lane.name }})
needs: Build
runs-on: ${{ matrix.os }}
# GATING lanes since two consecutive fully-green matrices on main (runs 29148084844 and
# 29148832520, 2026-07-11) — the earlier flakiness was pre-existing engine races, fixed in
# #1101/#1103/#1104/#1105. These runs back the README's macOS/Windows claims. The REST API
# module is excluded (needs Docker/Keycloak, unavailable on these runners), as are
# native-image builds. If a lane turns flaky again, diagnose the race — don't quietly
# restore continue-on-error.
#
# Split by module group: run as one job the Windows lane took 29 min (run 30146942073) with
# sirix-core and sirix-query serialized behind each other, making it the critical path of the
# whole workflow. The two groups are the natural cut — they were the two ~equal halves of that
# 29 min — and they now run concurrently instead.
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
lane:
- name: core
tasks: ':sirix-core:test'
- name: query
tasks: ':sirix-query:test :sirix-kotlin-api:test :sirix-kotlin-cli:test'
# Heap budgets differ per runner: macOS arm64 has 7 GB total, windows-latest 16 GB.
include:
- os: macos-latest
daemonHeap: 3g
testHeap: 3g
- os: windows-latest
daemonHeap: 4g
testHeap: 6g
timeout-minutes: 60
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx${{ matrix.daemonHeap }}
steps:
- name: Checkout
uses: actions/checkout@v4
# Defender's real-time scanner sits in front of every one of the many small files a Gradle
# build and a storage engine's tests write. Excluding the work volume and the JVM processes
# is the single cheapest Windows win available. Best-effort: never fail the lane over it.
- name: Exclude the build from Defender (Windows)
if: runner.os == 'Windows'
continue-on-error: true
shell: pwsh
run: |
# The work root (D:\a) holds both the checkout and the Gradle user home the
# setup-gradle action provisions next to it, so exclude the whole thing.
$workRoot = Split-Path -Parent (Split-Path -Parent $env:GITHUB_WORKSPACE)
foreach ($path in @($workRoot, $env:GITHUB_WORKSPACE, $env:RUNNER_TEMP, $env:RUNNER_TOOL_CACHE)) {
if ($path) { Add-MpPreference -ExclusionPath $path -ErrorAction SilentlyContinue }
}
foreach ($proc in @('java.exe', 'javac.exe')) {
Add-MpPreference -ExclusionProcess $proc -ErrorAction SilentlyContinue
}
# The tests write their databases under java.io.tmpdir, which on Windows defaults to
# C:\Users\...\AppData\Local\Temp — the network-backed OS disk, not the local SSD the
# workspace lives on. build.gradle honours TMPDIR, so point it at the fast volume.
- name: Route test scratch files onto the workspace volume (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$dir = Join-Path $env:RUNNER_TEMP 'sirix-tests'
New-Item -ItemType Directory -Force -Path $dir | Out-Null
"TMPDIR=$dir" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '25'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
# No build-output cache restore: the Linux-compiled outputs' cache paths are not portable,
# and a cold compile also exercises the toolchain on the target OS. --build-cache is a
# different thing and is safe here — it reuses this platform's own task outputs across runs.
# -PexcludeHeavyTests skips @Tag("heavy") soak-style suites (20+ min per test on these
# 3-core runners — the round-2 macOS lane spent its whole hour inside two of them).
# Full heavy coverage stays on the Linux jobs above.
# -PtestHeap*: the default 5 GB initial fork heap does not fit a 7 GB macOS runner next to
# the daemon. Sizing it to the runner keeps the machine out of swap.
# --continue: without it a sirix-query failure aborts the invocation and the kotlin modules
# never run on that platform — which is how the sirix-query XMark CRLF failure stayed
# invisible for five rounds. One module's failure must not mask another's result.
- name: Test ${{ matrix.lane.name }} modules
run: ./gradlew ${{ matrix.lane.tasks }} -PexcludeHeavyTests=true -PtestHeapMin=512m -PtestHeapMax=${{ matrix.testHeap }} --continue --build-cache --stacktrace
- name: Upload test reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-reports-${{ matrix.os }}-${{ matrix.lane.name }}
path: '**/build/reports/tests/test'
retention-days: 14
TestRestApi:
name: Test sirix-rest-api + Python client
needs: Build
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '25'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Restore build output
uses: actions/cache/restore@v4
with:
path: |
**/build
key: build-${{ github.run_id }}
- name: Checkout Python client
uses: actions/checkout@v4
with:
repository: sirixdb/sirix-python-client
path: ./sirix-python-client
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
architecture: x64
- name: Install Python client dependencies and run tests
run: |
docker compose up -d keycloak
python -m pip install --upgrade pip
pip install -r sirix-python-client/requirements-all.txt
sleep 40
java -Xms1g -Xmx4g --enable-preview --enable-native-access=ALL-UNNAMED --add-modules=jdk.incubator.vector --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED -jar ./bundles/sirix-rest-api/build/libs/sirix-rest-api-*-fat.jar -conf ./bundles/sirix-rest-api/src/main/resources/sirix-conf.json &
echo "Waiting for REST API on port 9443..."
for i in $(seq 1 120); do
if curl -s -o /dev/null http://localhost:9443/ 2>/dev/null; then
echo "REST API is up after ${i}s"
break
fi
if [ "$i" -eq 120 ]; then
echo "REST API failed to start within 120s"
exit 1
fi
sleep 1
done
python -m pytest sirix-python-client -v
NativeImageTest:
name: Native Image (${{ matrix.module }})
runs-on: ubuntu-latest
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
module: [sirix-query, sirix-kotlin-cli, sirix-rest-api]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install GraalVM
uses: graalvm/setup-graalvm@v1
with:
java-version: '25'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: JVM smoke test
run: ./gradlew :${{ matrix.module }}:nativeImageSmokeTest --info
- name: Stop Gradle daemon (free memory for native compilation)
run: ./gradlew --stop
- name: Native image smoke test
run: ./gradlew :${{ matrix.module }}:nativeSmokeTest --no-daemon --info
Deploy:
name: Deploy to OSSRH and Docker Hub
if: ${{ github.repository_owner == 'sirixdb' && (github.event_name == 'push' || github.event_name == 'schedule') }}
needs: [TestCore, TestQuery, TestRestApi]
runs-on: ubuntu-latest
timeout-minutes: 20
env:
SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_USERNAME_TOKEN }}
SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_PASSWORD_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '25'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Gradle deploy
run: ./gradlew travisReleaseSnapshot --info
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker Hub deploy
run: bash docker_push.sh