feat: Add support for native ice binary using graalvm #555
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: verify | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| test: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'graalvm' | |
| cache: maven | |
| - run: ./mvnw clean verify | |
| - name: Install | |
| run: ./mvnw install | |
| - name: Run Scenario-Based Integration Tests | |
| run: ../mvnw test -Dtest=ScenarioBasedIT | |
| working-directory: ice-rest-catalog | |
| docker-integration: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| # https://github.com/docker/setup-buildx-action | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Install regctl | |
| uses: regclient/actions/regctl-installer@ce5fd131e371ffcdd7508b478cb223b3511a9183 | |
| - name: regctl login | |
| uses: regclient/actions/regctl-login@ce5fd131e371ffcdd7508b478cb223b3511a9183 | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'graalvm' | |
| cache: maven | |
| - name: Build Docker images | |
| run: | | |
| export VERSION=0.0.0-latest-master+$(git rev-parse --short HEAD) | |
| export IMAGE_TAG="latest-master" | |
| export SKIP_VERIFY=1 | |
| export PATH="$(pwd)/.bin:$PATH" | |
| docker-build-ice | |
| docker-build-ice-rest-catalog | |
| - name: Run Docker integration tests | |
| run: > | |
| ./mvnw -pl ice-rest-catalog -am install -DskipTests=true -Pno-check && | |
| ./mvnw -pl ice-rest-catalog failsafe:integration-test failsafe:verify | |
| -Dit.test=DockerScenarioBasedIT,DockerLocalFileIOClickHouseIT | |
| -Ddocker.image=altinity/ice-rest-catalog:debug-with-ice-latest-master-amd64 | |
| -Dclickhouse.image=altinity/clickhouse-server:25.8.16.20002.altinityantalya | |
| native-build: | |
| name: Build and test native image (${{ matrix.arch }}) | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| matrix: | |
| include: | |
| - arch: amd64 | |
| runner: ubuntu-24.04 | |
| artifact: ice-native-amd64-dynamic | |
| - arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| artifact: ice-native-arm64-dynamic | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'graalvm' | |
| cache: maven | |
| - name: Build native image (dynamic linking - no musl required) | |
| run: ./mvnw -Pnative clean install -Dmaven.test.skip=true | |
| - name: Run Scenario-Based Integration Tests | |
| run: ../mvnw test -Dtest=ScenarioBasedIT -Dice.native=true | |
| working-directory: ice-rest-catalog | |
| - name: Upload native binary as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: ice/target/ice | |
| if-no-files-found: error |