|
89 | 89 | ENABLE_SNAPSHOT: ${{ secrets.ENABLE_SNAPSHOT }} |
90 | 90 | run: make publish |
91 | 91 |
|
| 92 | + # Coverage is measured on both native architectures (x86_64 and aarch64) so |
| 93 | + # the coverage recorded for a merge to main matches what the PR build recorded |
| 94 | + # (the union of both archs). Uploading a single x86_64 report here previously |
| 95 | + # made every merge commit look ~0.4% lower than its own PR base, failing the |
| 96 | + # codecov/project status on identical code. |
| 97 | + coverage: |
| 98 | + strategy: |
| 99 | + fail-fast: false |
| 100 | + matrix: |
| 101 | + include: |
| 102 | + - arch: x86_64 |
| 103 | + runner: ubuntu-latest |
| 104 | + - arch: aarch64 |
| 105 | + runner: ubuntu-24.04-arm |
| 106 | + runs-on: ${{ matrix.runner }} |
| 107 | + name: "coverage (${{ matrix.arch }})" |
| 108 | + steps: |
| 109 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
| 110 | + |
| 111 | + - name: Set up JDK 1.8 |
| 112 | + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 |
| 113 | + with: |
| 114 | + java-version: 8 |
| 115 | + distribution: corretto |
| 116 | + cache: maven |
| 117 | + |
| 118 | + - name: Set up Docker Buildx |
| 119 | + uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 |
| 120 | + with: |
| 121 | + install: true |
| 122 | + |
| 123 | + - name: Build and install core dependency locally |
| 124 | + working-directory: ./aws-lambda-java-core |
| 125 | + run: mvn clean install |
| 126 | + |
| 127 | + - name: Build and install serialization dependency locally |
| 128 | + working-directory: ./aws-lambda-java-serialization |
| 129 | + run: mvn clean install |
| 130 | + |
| 131 | + - name: Build Runtime Interface Client - Run 'build-${{ matrix.arch }}' target |
| 132 | + working-directory: ./aws-lambda-java-runtime-interface-client |
| 133 | + run: make build-${{ matrix.arch }} |
| 134 | + env: |
| 135 | + IS_JAVA_8: true |
| 136 | + |
92 | 137 | - name: Upload coverage to Codecov |
93 | 138 | if: env.CODECOV_TOKEN != null |
94 | 139 | uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5 |
| 140 | + with: |
| 141 | + files: ./aws-lambda-java-runtime-interface-client/target/site/jacoco/jacoco.xml |
| 142 | + flags: ${{ matrix.arch }} |
| 143 | + disable_search: true |
95 | 144 | env: |
96 | 145 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
0 commit comments