|
23 | 23 | default: debian_12-slim |
24 | 24 |
|
25 | 25 | jobs: |
| 26 | + get_container_platforms: |
| 27 | + name: Get Container Platforms |
| 28 | + uses: sippy/cimagic/.github/workflows/GetContainerPlatforms.yml@v3 |
| 29 | + with: |
| 30 | + image: ${{ inputs.rtpp-repo }}-${{ inputs.rtpp-tag }} |
| 31 | + |
26 | 32 | set_env: |
27 | 33 | name: Set Environment |
| 34 | + needs: get_container_platforms |
28 | 35 | runs-on: ubuntu-latest |
29 | 36 | env: |
30 | | - BASE_IMAGE: ${{ inputs.rtpp-repo }}-${{ inputs.rtpp-tag }} |
| 37 | + RAW_PLATFORMS: ${{ needs.get_container_platforms.outputs.platforms }} |
31 | 38 | outputs: |
32 | 39 | platforms: ${{ steps.set-env.outputs.platforms }} |
33 | 40 | build-matrix: ${{ steps.set-env.outputs.build-matrix }} |
|
42 | 49 | id: set-env |
43 | 50 | run: | |
44 | 51 | BUILD_OS="`echo ${{ inputs.rtpp-tag }} | sed 's|-.*|| ; s|_|:|g'`" |
45 | | - PLATFORMS="`docker manifest inspect ${{ env.BASE_IMAGE }} | \ |
46 | | - jq -r '.manifests[] | "\(.platform.os)/\(.platform.architecture)\(if .platform.variant != null then "/\(.platform.variant)" else "" end)"' | \ |
47 | | - sort -u | grep -v unknown | BUILD_OS="${BUILD_OS}" ./scripts/build/get-arch-buildargs.rtp.io fltplatforms | paste -sd ','`" |
| 52 | + PLATFORMS="`echo "${RAW_PLATFORMS}" | tr ',' '\n' | \ |
| 53 | + BUILD_OS="${BUILD_OS}" ./scripts/build/get-arch-buildargs.rtp.io fltplatforms | paste -sd ','`" |
48 | 54 | BUILD_MATRIX="`echo ${PLATFORMS} | tr ',' '\n' | jq -R . | jq -s . | tr '\n' ' '`" |
49 | 55 | GIT_BRANCH="${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" |
50 | 56 | GIT_BRANCH="${GIT_BRANCH#refs/tags/}" |
@@ -273,10 +279,13 @@ jobs: |
273 | 279 | echo "TEST_SET_MIGHTFAIL=early_cancel_lost100,early_cancel" >> $GITHUB_ENV |
274 | 280 | fi |
275 | 281 |
|
| 282 | + - name: Pull ${{ env.TARGETPLATFORM }} image |
| 283 | + run: docker pull --platform ${TARGETPLATFORM} ${BUILD_IMAGE} |
| 284 | + |
276 | 285 | - name: Test ${{ env.TARGETPLATFORM }} |
277 | 286 | run: | |
278 | | - docker pull ${BUILD_IMAGE} |
279 | | - docker run --platform ${TARGETPLATFORM} --env TEST_SET_MIGHTFAIL --name test --cap-add=SYS_PTRACE \ |
| 287 | + docker run --platform ${TARGETPLATFORM} --env TEST_SET_MIGHTFAIL \ |
| 288 | + --name test --cap-add=SYS_PTRACE \ |
280 | 289 | --privileged --sysctl net.ipv6.conf.all.disable_ipv6=0 ${BUILD_IMAGE} |
281 | 290 | timeout-minutes: 3 |
282 | 291 |
|
|
0 commit comments