|
| 1 | +name: GraalVM Native Image builds on Linux arm64 platforms |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + inputs: |
| 5 | + releaseversion: |
| 6 | + description: 'Release version' |
| 7 | + required: true |
| 8 | + default: 'X.X.X' |
| 9 | + |
| 10 | +jobs: |
| 11 | + release: |
| 12 | + name: Creating Release for CATS ${{ github.event.inputs.releaseversion }} |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - name: Checkout Code |
| 16 | + uses: actions/checkout@v4 |
| 17 | + with: |
| 18 | + fetch-depth: 0 |
| 19 | + ref: cats-${{ github.event.inputs.releaseversion }} |
| 20 | + |
| 21 | + - name: Setup GraalVM |
| 22 | + uses: graalvm/setup-graalvm@v1 |
| 23 | + with: |
| 24 | + java-version: '21' |
| 25 | + distribution: 'graalvm' |
| 26 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 27 | + - name: Set up QEMU |
| 28 | + uses: docker/setup-qemu-action@v2 |
| 29 | + with: |
| 30 | + platforms: arm64 |
| 31 | + |
| 32 | + - name: Set up Docker Buildx |
| 33 | + uses: docker/setup-buildx-action@v2 |
| 34 | + |
| 35 | + - name: Build and run CATS |
| 36 | + run: | |
| 37 | + ./mvnw -B clean --file pom.xml |
| 38 | + ./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 |
| 39 | +
|
| 40 | + - name: Tar files for Linux and MacOS |
| 41 | + run: | |
| 42 | + cp target/cats-runner cats |
| 43 | + tar -czf cats_linux_arm64_${{ github.event.inputs.releaseversion }}.tar.gz cats |
| 44 | +
|
| 45 | + - name: Upload Tar files for Linux and MacOS |
| 46 | + id: upload-release-asset |
| 47 | + uses: actions/upload-release-asset@v1 |
| 48 | + env: |
| 49 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 50 | + with: |
| 51 | + upload_url: https://github.com/Endava/cats/releases/download/cats-${{ github.event.inputs.releaseversion }} |
| 52 | + asset_path: cats_linux_arm64_${{ github.event.inputs.releaseversion }}.tar.gz |
| 53 | + asset_name: cats_linux_arm64_${{ github.event.inputs.releaseversion }}.tar.gz |
| 54 | + asset_content_type: application/gzip |
| 55 | + |
| 56 | + |
0 commit comments