feat: Bump java version for 25 compatibility #445
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: Build OpenML Java | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - 'hf-*' # hotfix branches | |
| tags: | |
| - '*.*.*' # release tag xx.yy.zz | |
| pull_request: | |
| branches: | |
| - master | |
| - 'hf-*' | |
| jobs: | |
| # Build and test job | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - run: | | |
| git fetch -f --tags | |
| echo exit code $? | |
| git tag --list | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Cache Maven packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| - uses: docker/setup-qemu-action@v2 | |
| with: | |
| platforms: "arm64" | |
| - name: Build and test | |
| run: mvn test -B | |
| # The skipped tests is because h2o-xgboost isn't ready to use with musl | |
| - name: Test with musl | |
| run: | | |
| docker run --rm -t -v ~/.m2:/root/.m2 -v $(pwd):/feedzai-openml-java -e FDZ_OPENML_JAVA_LIBC="musl" alpine:3.18.4 \ | |
| /bin/sh -c 'apk add clang openjdk17 maven bash git && \ | |
| git config --global --add safe.directory /feedzai-openml-java && \ | |
| git config --global --add safe.directory /feedzai-openml-java/openml-lightgbm/lightgbm-builder/make-lightgbm && \ | |
| cd /feedzai-openml-java && \ | |
| cp openml-lightgbm/lightgbm-builder/make-lightgbm/build/amd64/musl/lib_lightgbm.so /lib/lib_lightgbm.so && \ | |
| mvn test -B -Dsurefire.failIfNoSpecifiedTests=false -Dtest=!ClassifyUnknownCategoryTest#test,!H2OModelProviderTrainTest#trainModelsForAllAlgorithms' | |
| # The skipped tests is because h2o-xgboost isn't ready to use on arm64 | |
| - name: Test on arm64 | |
| run: | | |
| docker run --rm --platform=arm64 -t -v ~/.m2:/root/.m2 -v $(pwd):/feedzai-openml-java maven:3.9-eclipse-temurin-17 \ | |
| /bin/bash -c 'apt update && apt install -y --no-install-recommends git && \ | |
| git config --global --add safe.directory /feedzai-openml-java && \ | |
| git config --global --add safe.directory /feedzai-openml-java/openml-lightgbm/lightgbm-builder/make-lightgbm && \ | |
| cd /feedzai-openml-java && \ | |
| mvn test -B -Dsurefire.failIfNoSpecifiedTests=false -Dtest=!ClassifyUnknownCategoryTest#test,!H2OModelProviderTrainTest#trainModelsForAllAlgorithms' | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| use_oidc: true | |
| fail_ci_if_error: false |