@@ -19,8 +19,17 @@ permissions:
1919
2020jobs :
2121
22- smoke-test :
23- runs-on : ubuntu-latest
22+ smoke-test-arch :
23+ strategy :
24+ fail-fast : true
25+ matrix :
26+ include :
27+ - arch : x86_64
28+ runner : ubuntu-latest
29+ - arch : aarch64
30+ runner : ubuntu-24.04-arm
31+ runs-on : ${{ matrix.runner }}
32+ name : " smoke-test (${{ matrix.arch }})"
2433 steps :
2534 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2635
@@ -39,14 +48,23 @@ jobs:
3948 working-directory : ./aws-lambda-java-serialization
4049 run : mvn clean install
4150
42- - name : Runtime Interface Client smoke tests - Run 'pr' target
51+ - name : Runtime Interface Client smoke tests - Run 'pr-${{ matrix.arch }} ' target
4352 working-directory : ./aws-lambda-java-runtime-interface-client
44- run : make pr
53+ run : make pr-${{ matrix.arch }}
4554 env :
4655 IS_JAVA_8 : true
4756
48- build :
49- runs-on : ubuntu-latest
57+ build-arch :
58+ strategy :
59+ fail-fast : true
60+ matrix :
61+ include :
62+ - arch : x86_64
63+ runner : ubuntu-latest
64+ - arch : aarch64
65+ runner : ubuntu-24.04-arm
66+ runs-on : ${{ matrix.runner }}
67+ name : " build (${{ matrix.arch }})"
5068 steps :
5169 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
5270
@@ -57,17 +75,11 @@ jobs:
5775 distribution : corretto
5876 cache : maven
5977
60- - name : Set up QEMU
61- uses : docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
62-
6378 - name : Set up Docker Buildx
6479 uses : docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
6580 with :
6681 install : true
6782
68- - name : Available buildx platforms
69- run : echo ${{ steps.buildx.outputs.platforms }}
70-
7183 - name : Build and install core dependency locally
7284 working-directory : ./aws-lambda-java-core
7385 run : mvn clean install
@@ -76,20 +88,99 @@ jobs:
7688 working-directory : ./aws-lambda-java-serialization
7789 run : mvn clean install
7890
79- - name : Test Runtime Interface Client xplatform build - Run 'build' target
91+ - name : Test Runtime Interface Client build - Run 'build-${{ matrix.arch }} ' target
8092 working-directory : ./aws-lambda-java-runtime-interface-client
81- run : make build
93+ run : make build-${{ matrix.arch }}
8294 env :
8395 IS_JAVA_8 : true
8496
8597 - name : Save the built jar
8698 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
8799 with :
88- name : aws-lambda-java-runtime-interface-client
100+ name : aws-lambda-java-runtime-interface-client-${{ matrix.arch }}
89101 path : ./aws-lambda-java-runtime-interface-client/target/aws-lambda-java-runtime-interface-client-*.jar
90102
91103 - name : Upload coverage to Codecov
92104 if : env.CODECOV_TOKEN != null
93105 uses : codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5
94106 env :
95107 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
108+
109+ integration-test-matrix :
110+ runs-on : ${{ matrix.arch.runner }}
111+ strategy :
112+ # Run every OS/arch combination to completion so one failure doesn't mask the others.
113+ fail-fast : false
114+ matrix :
115+ buildspec :
116+ - buildspec.os.alpine.yml
117+ - buildspec.os.amazoncorretto.yml
118+ - buildspec.os.amazonlinux.1.yml
119+ - buildspec.os.amazonlinux.2.yml
120+ - buildspec.os.debian.yml
121+ - buildspec.os.ubuntu.yml
122+ arch :
123+ - label : x64
124+ runner : ubuntu-latest
125+ platform : linux/amd64
126+ - label : arm64
127+ runner : ubuntu-24.04-arm
128+ platform : linux/arm64/v8
129+ exclude :
130+ # Amazon Linux 1 was never published for ARM64 (x86_64 only), so
131+ # public.ecr.aws/amazonlinux/amazonlinux:1 has no arm64 manifest.
132+ - buildspec : buildspec.os.amazonlinux.1.yml
133+ arch :
134+ label : arm64
135+ runner : ubuntu-24.04-arm
136+ platform : linux/arm64/v8
137+ name : " integration-test (${{ matrix.buildspec }} / ${{ matrix.arch.label }})"
138+ steps :
139+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
140+
141+ - name : Set up Docker Buildx
142+ uses : docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
143+ with :
144+ install : true
145+
146+ - name : Run OS integration test - 'test-integ' target
147+ working-directory : ./aws-lambda-java-runtime-interface-client
148+ run : make test-integ BUILDSPEC=test/integration/codebuild/${{ matrix.buildspec }}
149+ env :
150+ PLATFORM_FILTER : ${{ matrix.arch.platform }}
151+
152+ integration-test :
153+ needs : integration-test-matrix
154+ if : always()
155+ runs-on : ubuntu-latest
156+ steps :
157+ - name : Check integration-test results
158+ run : |
159+ if [ "${{ needs.integration-test-matrix.result }}" != "success" ]; then
160+ echo "Integration tests failed on one or more OS/arch combinations"
161+ exit 1
162+ fi
163+
164+ smoke-test :
165+ needs : smoke-test-arch
166+ if : always()
167+ runs-on : ubuntu-latest
168+ steps :
169+ - name : Check smoke-test results
170+ run : |
171+ if [ "${{ needs.smoke-test-arch.result }}" != "success" ]; then
172+ echo "Smoke tests failed on one or more architectures"
173+ exit 1
174+ fi
175+
176+ build :
177+ needs : build-arch
178+ if : always()
179+ runs-on : ubuntu-latest
180+ steps :
181+ - name : Check build results
182+ run : |
183+ if [ "${{ needs.build-arch.result }}" != "success" ]; then
184+ echo "Build failed on one or more architectures"
185+ exit 1
186+ fi
0 commit comments