-
Notifications
You must be signed in to change notification settings - Fork 242
Expand file tree
/
Copy pathruntime-interface-client_pr.yml
More file actions
186 lines (163 loc) · 5.82 KB
/
Copy pathruntime-interface-client_pr.yml
File metadata and controls
186 lines (163 loc) · 5.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# This workflow will be triggered if there will be changes to
# aws-lambda-java-runtime-interface-client package or its dependencies (core, serialization),
# and it builds the package.
name: PR to runtime-interface-client
on:
workflow_dispatch:
pull_request:
branches: [ '*' ]
paths:
- 'aws-lambda-java-runtime-interface-client/**'
- 'aws-lambda-java-core/**'
- 'aws-lambda-java-serialization/**'
- '.github/workflows/runtime-interface-client_*.yml'
permissions:
contents: read
jobs:
smoke-test-arch:
strategy:
fail-fast: true
matrix:
include:
- arch: x86_64
runner: ubuntu-latest
- arch: aarch64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
name: "smoke-test (${{ matrix.arch }})"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up JDK 1.8
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
java-version: 8
distribution: corretto
cache: maven
- name: Build and install core dependency locally
working-directory: ./aws-lambda-java-core
run: mvn clean install
- name: Build and install serialization dependency locally
working-directory: ./aws-lambda-java-serialization
run: mvn clean install
- name: Runtime Interface Client smoke tests - Run 'pr-${{ matrix.arch }}' target
working-directory: ./aws-lambda-java-runtime-interface-client
run: make pr-${{ matrix.arch }}
env:
IS_JAVA_8: true
build-arch:
strategy:
fail-fast: true
matrix:
include:
- arch: x86_64
runner: ubuntu-latest
- arch: aarch64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
name: "build (${{ matrix.arch }})"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up JDK 1.8
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
java-version: 8
distribution: corretto
cache: maven
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
with:
install: true
- name: Build and install core dependency locally
working-directory: ./aws-lambda-java-core
run: mvn clean install
- name: Build and install serialization dependency locally
working-directory: ./aws-lambda-java-serialization
run: mvn clean install
- name: Test Runtime Interface Client build - Run 'build-${{ matrix.arch }}' target
working-directory: ./aws-lambda-java-runtime-interface-client
run: make build-${{ matrix.arch }}
env:
IS_JAVA_8: true
- name: Save the built jar
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: aws-lambda-java-runtime-interface-client-${{ matrix.arch }}
path: ./aws-lambda-java-runtime-interface-client/target/aws-lambda-java-runtime-interface-client-*.jar
- name: Upload coverage to Codecov
if: env.CODECOV_TOKEN != null
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
integration-test-matrix:
runs-on: ${{ matrix.arch.runner }}
strategy:
# Run every OS/arch combination to completion so one failure doesn't mask the others.
fail-fast: false
matrix:
buildspec:
- buildspec.os.alpine.yml
- buildspec.os.amazoncorretto.yml
- buildspec.os.amazonlinux.1.yml
- buildspec.os.amazonlinux.2.yml
- buildspec.os.debian.yml
- buildspec.os.ubuntu.yml
arch:
- label: x64
runner: ubuntu-latest
platform: linux/amd64
- label: arm64
runner: ubuntu-24.04-arm
platform: linux/arm64/v8
exclude:
# Amazon Linux 1 was never published for ARM64 (x86_64 only), so
# public.ecr.aws/amazonlinux/amazonlinux:1 has no arm64 manifest.
- buildspec: buildspec.os.amazonlinux.1.yml
arch:
label: arm64
runner: ubuntu-24.04-arm
platform: linux/arm64/v8
name: "integration-test (${{ matrix.buildspec }} / ${{ matrix.arch.label }})"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
with:
install: true
- name: Run OS integration test - 'test-integ' target
working-directory: ./aws-lambda-java-runtime-interface-client
run: make test-integ BUILDSPEC=test/integration/codebuild/${{ matrix.buildspec }}
env:
PLATFORM_FILTER: ${{ matrix.arch.platform }}
integration-test:
needs: integration-test-matrix
if: always()
runs-on: ubuntu-latest
steps:
- name: Check integration-test results
run: |
if [ "${{ needs.integration-test-matrix.result }}" != "success" ]; then
echo "Integration tests failed on one or more OS/arch combinations"
exit 1
fi
smoke-test:
needs: smoke-test-arch
if: always()
runs-on: ubuntu-latest
steps:
- name: Check smoke-test results
run: |
if [ "${{ needs.smoke-test-arch.result }}" != "success" ]; then
echo "Smoke tests failed on one or more architectures"
exit 1
fi
build:
needs: build-arch
if: always()
runs-on: ubuntu-latest
steps:
- name: Check build results
run: |
if [ "${{ needs.build-arch.result }}" != "success" ]; then
echo "Build failed on one or more architectures"
exit 1
fi