From d1b964772921045bebd24cdc73913f4bfd636015 Mon Sep 17 00:00:00 2001 From: Zixuan Liu Date: Thu, 23 May 2024 18:03:08 +0800 Subject: [PATCH 1/2] [improve][ci] Add arm64 image build Signed-off-by: Zixuan Liu --- .github/workflows/pulsar-ci.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pulsar-ci.yaml b/.github/workflows/pulsar-ci.yaml index c15d51f9cfcf6..9406351ff5ee4 100644 --- a/.github/workflows/pulsar-ci.yaml +++ b/.github/workflows/pulsar-ci.yaml @@ -465,6 +465,12 @@ jobs: timeout-minutes: 60 needs: ['preconditions', 'build-and-license-check'] if: ${{ needs.preconditions.outputs.docs_only != 'true'}} + strategy: + fail-fast: false + matrix: + platform: + - linux/amd64 + - linux/arm64 env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} CI_JDK_MAJOR_VERSION: ${{ needs.preconditions.outputs.jdk_major_version }} @@ -509,14 +515,16 @@ jobs: cd $HOME $GITHUB_WORKSPACE/build/pulsar_ci_tool.sh restore_tar_from_github_actions_artifacts pulsar-maven-repository-binaries - - name: Build java-test-image docker image + - name: Build java-test-image docker image - ${{ matrix.platform }} run: | # build docker image DOCKER_CLI_EXPERIMENTAL=enabled mvn -B -am -pl docker/pulsar,tests/docker-images/java-test-image install -Pcore-modules,-main,integrationTests,docker \ + -Ddocker.platforms=${{ matrix.platform }} \ -Dmaven.test.skip=true -DskipSourceReleaseAssembly=true \ -Dspotbugs.skip=true -Dlicense.skip=true -Dcheckstyle.skip=true -Drat.skip=true - name: save docker image apachepulsar/java-test-image:latest to Github artifact cache + if: ${{ matrix.platform == 'linux/amd64' }} run: | $GITHUB_WORKSPACE/build/pulsar_ci_tool.sh docker_save_image_to_github_actions_artifacts apachepulsar/java-test-image:latest pulsar-java-test-image From 2d777a592489a7e9c5d979c3fd08c3c5aec8eceb Mon Sep 17 00:00:00 2001 From: Zixuan Liu Date: Thu, 23 May 2024 18:42:39 +0800 Subject: [PATCH 2/2] setup-qemu-action Signed-off-by: Zixuan Liu --- .github/workflows/pulsar-ci.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/pulsar-ci.yaml b/.github/workflows/pulsar-ci.yaml index 9406351ff5ee4..1160a0d1ec363 100644 --- a/.github/workflows/pulsar-ci.yaml +++ b/.github/workflows/pulsar-ci.yaml @@ -515,6 +515,11 @@ jobs: cd $HOME $GITHUB_WORKSPACE/build/pulsar_ci_tool.sh restore_tar_from_github_actions_artifacts pulsar-maven-repository-binaries + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64 + - name: Build java-test-image docker image - ${{ matrix.platform }} run: | # build docker image