-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add workflow to build linux arm64 binaries
- Loading branch information
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: GraalVM Native Image builds on Linux arm64 platforms | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
releaseversion: | ||
description: 'Release version' | ||
required: true | ||
default: 'X.X.X' | ||
|
||
jobs: | ||
release: | ||
name: Creating Release for CATS ${{ github.event.inputs.releaseversion }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: cats-${{ github.event.inputs.releaseversion }} | ||
|
||
- name: Setup GraalVM | ||
uses: graalvm/setup-graalvm@v1 | ||
with: | ||
java-version: '21' | ||
distribution: 'graalvm' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: arm64 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build and run CATS | ||
run: | | ||
./mvnw -B clean --file pom.xml | ||
./mvnw clean package -Pnative -Dquarkus.native.remote-container-build=true -DskipTests=true -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:23.1.3.1-Final-java21-arm64 | ||
- name: Tar files for Linux and MacOS | ||
run: | | ||
cp target/cats-runner cats | ||
tar -czf cats_linux_arm64_${{ github.event.inputs.releaseversion }}.tar.gz cats | ||
- name: Upload Tar files for Linux and MacOS | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: https://github.com/Endava/cats/releases/download/cats-${{ github.event.inputs.releaseversion }} | ||
asset_path: cats_linux_arm64_${{ github.event.inputs.releaseversion }}.tar.gz | ||
asset_name: cats_linux_arm64_${{ github.event.inputs.releaseversion }}.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
|