Add support for Alpine on LGBM #376
Workflow file for this run
This file contains 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 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- run: | | |
git fetch -f --tags | |
echo exit code $? | |
git tag --list | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '8' | |
distribution: 'zulu' | |
- name: Cache Maven packages | |
uses: actions/[email protected] | |
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 on arm64 | |
- name: Test on arm64 | |
run: docker run --rm --platform=arm64 -t -v ~/.m2:/root/.m2 -v $(pwd):/feedzai-openml-java maven:3.8-openjdk-8-slim /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 -DfailIfNoTests=false -Dtest=!ClassifyUnknownCategoryTest#test,!H2OModelProviderTrainTest#trainModelsForAllAlgorithms' | |
- uses: codecov/codecov-action@v1 | |
with: | |
fail_ci_if_error: true | |
build_alpine: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- run: | | |
git fetch -f --tags | |
echo exit code $? | |
git tag --list | |
- name: Run tests on Alpine docker | |
run: | | |
docker run --rm -t -v $(pwd):/feedzai-openml-java -e FDZ_OPENML_JAVA_LIBC="musl" alpine:3.18.4 \ | |
/bin/sh -c 'apk add clang openjdk8 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 && \ | |
mvn clean install -B -DskipTests && \ | |
cp openml-lightgbm/lightgbm-builder/make-lightgbm/build/amd64/alpine/lib_lightgbm.so /lib/lib_lightgbm.so && \ | |
mvn test -B' |