From d07a72bb7f1c36ceac34af1d37f969a91a9a11bb Mon Sep 17 00:00:00 2001 From: Ozan Gunalp Date: Wed, 28 Feb 2024 21:05:15 +0100 Subject: [PATCH] Multi Arch images test --- .github/workflows/multi-arch-images.yml | 50 +++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/multi-arch-images.yml diff --git a/.github/workflows/multi-arch-images.yml b/.github/workflows/multi-arch-images.yml new file mode 100644 index 0000000..c31d035 --- /dev/null +++ b/.github/workflows/multi-arch-images.yml @@ -0,0 +1,50 @@ +--- +name: Multi-Arch Images Test + +on: + push: + branches: [ "multi-arch-images" ] + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + name: Build Docker Images on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: temurin + cache: maven + - name: Set Image Tag + run: | + echo "BUILD_IMAGE_TAG=${GITHUB_REF_NAME}-${GITHUB_SHA}" >> $GITHUB_ENV + - name: Check Docker + run: docker info + - name: Check arch + run: arch + - name: Build with Maven + run: | + mvn -s .github/ci-maven-settings.xml -B clean package -Dnative \ + ${{ matrix.os == 'macos-latest' && '-Dquarkus.native.additional-build-args=-H:PageSize=65536' || '' }} \ + -Dquarkus.native.container-build=true \ + -Dquarkus.container-image.build=true \ + -Dquarkus.container-image.tag=${{ env.BUILD_IMAGE_TAG }} \ + -Dquarkus.container-image.additional-tags=latest-snapshot + - name: Inspect Image + run: docker inspect quay.io/ogunalp/kafka-native:${{ env.BUILD_IMAGE_TAG }} + - name: Integration Tests with Maven + run: | + mvn -s .github/ci-maven-settings.xml -B \ + clean verify -Dtest-container \ + -Dkafka-native-container-version=${{ env.BUILD_IMAGE_TAG }} \ + -Dzookeeper-native-container-version=${{ env.BUILD_IMAGE_TAG }}