This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 999f18aa3afd0557cc73d0f4ceb70af0c143ee60
Author: Zixuan Liu <node...@gmail.com>
AuthorDate: Thu Jun 6 16:11:00 2024 +0800

    [improve][ci] Add arm64 image build (#22755)
    
    Signed-off-by: Zixuan Liu <node...@gmail.com>
    (cherry picked from commit fb03d159129d10fdf1c277ba7b040025bed2ca61)
---
 .github/workflows/pulsar-ci.yaml | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/pulsar-ci.yaml b/.github/workflows/pulsar-ci.yaml
index c15d51f9cfc..1160a0d1ec3 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,21 @@ 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: 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
           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
 

Reply via email to