Repository navigation
Expand file tree
/
Copy pathruntime-interface-client_merge_to_main.yml
More file actions
79 lines (68 loc) · 2.61 KB
/
Copy pathruntime-interface-client_merge_to_main.yml
File metadata and controls
79 lines (68 loc) · 2.61 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
# This workflow will be triggered on merge to the main branch if
# aws-lambda-java-runtime-interface-client package was changed
#
# It measures unit-test coverage on both native architectures and uploads it to
# Codecov.
name: Coverage for aws-lambda-java-runtime-interface-client
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'aws-lambda-java-runtime-interface-client/**'
- '.github/workflows/runtime-interface-client_*.yml'
jobs:
# Coverage is measured on both native architectures (x86_64 and aarch64) so
# the coverage recorded for a merge to main matches what the PR build recorded
# (the union of both archs). Uploading a single x86_64 report here previously
# made every merge commit look ~0.4% lower than its own PR base, failing the
# codecov/project status on identical code.
coverage:
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
runner: ubuntu-latest
- arch: aarch64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
name: "coverage (${{ 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
# Uses the local image store, so the JNI build reuses the cached base images.
driver: docker
- name: Load the JNI build base images
uses: ./.github/actions/cache-jni-base-images
- 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: Build Runtime Interface Client - Run 'build-${{ matrix.arch }}' target
working-directory: ./aws-lambda-java-runtime-interface-client
run: make build-${{ matrix.arch }}
env:
IS_JAVA_8: true
- name: Upload coverage to Codecov
if: env.CODECOV_TOKEN != null
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5
with:
files: ./aws-lambda-java-runtime-interface-client/target/site/jacoco/jacoco.xml
flags: ${{ matrix.arch }}
disable_search: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}