Skip to content

project: use GitHub-hosted ARM64 runners #2144

project: use GitHub-hosted ARM64 runners

project: use GitHub-hosted ARM64 runners #2144

Workflow file for this run

name: build
on:
push:
branches: [ 'master' ]
pull_request:
branches: [ 'master' ]
concurrency:
group: ${{ github.ref }}-build
cancel-in-progress: true
jobs:
check-labels:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check.outputs.skip }}
steps:
- name: Check PR labels
id: check
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
labels=$(jq -r '.pull_request.labels | map(.name) | join(",")' "$GITHUB_EVENT_PATH")
if [[ "$labels" == *"[no ci]"* ]]; then
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "skip=false" >> $GITHUB_OUTPUT
fi
else
echo "skip=false" >> $GITHUB_OUTPUT
echo "skip_tests=false" >> $GITHUB_OUTPUT
fi
build:
needs: check-labels
if: needs.check-labels.outputs.skip == 'false'
strategy:
matrix:
profile: [ 'jdk17', 'jdk17-aarch64' ]
include:
- jdk_version: '17'
- profile: 'jdk17'
runs_on: ubuntu-latest
- profile: 'jdk17-aarch64'
runs_on: ubuntu-latest-arm64
fail-fast: false
runs-on: ${{ matrix.runs_on }}
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver: docker
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.OSS_DOCKERHUB_USERNAME }}
password: ${{ secrets.OSS_DOCKERHUB_PASSWORD }}
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '${{ matrix.jdk_version }}'
distribution: 'temurin'
- name: Checkout
uses: actions/checkout@v3
- name: Build and test with Maven
env:
SKIP_DOCKER_TESTS: "true"
run: ./mvnw -s .github/settings.xml -B clean install -Pgha -Pdocker -Pit -P${{ matrix.profile }}