Skip to content

chore: bump version to 9.11.2 (#4909) #188

chore: bump version to 9.11.2 (#4909)

chore: bump version to 9.11.2 (#4909) #188

Workflow file for this run

name: Java
on:
push:
branches:
- master
- 'releases/**'
pull_request:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
build-and-test:
name: java.${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14, windows-latest]
steps:
- uses: actions/checkout@v6
with:
submodules: false
- name: Init submodules with retry
shell: bash
run: |
git config --global --add safe.directory "$(pwd)"
for attempt in 1 2 3 4 5; do
if git submodule update --init --recursive; then
echo "Submodule init succeeded on attempt $attempt"
exit 0
fi
echo "Attempt $attempt failed, retrying in 15s..."
sleep 15
done
echo "Submodule init failed after 5 attempts"
exit 1
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Install dependencies (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y ninja-build libboost-test-dev
- name: Install dependencies (macOS)
if: startsWith(matrix.os, 'macos')
run: |
brew install ninja boost
- name: Set up MSVC (Windows)
if: startsWith(matrix.os, 'windows')
uses: ilammy/msvc-dev-cmd@v1
- name: Configure CMake
shell: bash
run: |
CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release -DBUILD_JAVA=On -DBUILD_TESTING=Off -DVW_FEAT_FLATBUFFERS=Off -DVW_FEAT_CSV=On"
if [[ "${{ matrix.os }}" == windows-* ]]; then
CMAKE_ARGS="$CMAKE_ARGS -DRAPIDJSON_SYS_DEP=Off -DFMT_SYS_DEP=Off -DSPDLOG_SYS_DEP=Off -DVW_ZLIB_SYS_DEP=Off -DVW_BOOST_MATH_SYS_DEP=Off"
fi
cmake -S . -B build -G Ninja $CMAKE_ARGS
- name: Build VW core and CLI
run: cmake --build build -t vw_cli_bin
- name: Build Java JNI library
run: cmake --build build -t vw_jni
- name: Run Java tests
shell: bash
working-directory: java
run: |
# The CMake build copies the library and configures pom.xml
# 'verify' runs both unit tests (surefire) and integration tests (failsafe)
mvn -B verify -DVW_TEST_ROOT=${{ github.workspace }}/test
env:
JAVA_HOME: ${{ env.JAVA_HOME }}
VW_TEST_ROOT: ${{ github.workspace }}/test
- name: Upload JNI library
uses: actions/upload-artifact@v4
with:
name: vw-jni-${{ matrix.os }}
path: java/target/bin/natives/
retention-days: 7