Skip to content

Commit 6b01aa4

Browse files
committed
docker: Enhance Docker manifest and Containerfile for platform-specific builds
- Added conditional creation of Docker manifest for ARM64 based on platform input. - Updated Docker manifest job names for clarity. - Modified Containerfile to include Zephyr-specific build steps and improved conditional logic for fetching port submodules. Signed-off-by: Chiho Sin <[email protected]>
1 parent 56e4bb0 commit 6b01aa4

File tree

3 files changed

+39
-15
lines changed

3 files changed

+39
-15
lines changed

.github/workflows/docker_manifest.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
secrets: inherit
2929

3030
docker-arm64:
31+
if: ${{ inputs.cpy_platform != 'litex' }}
3132
uses: ./.github/workflows/docker_build.yml
3233
with:
3334
cpy_platform: ${{ inputs.cpy_platform }}
@@ -60,13 +61,23 @@ jobs:
6061
main-${{ inputs.cpy_platform }}
6162
flavor: latest=false
6263

63-
- name: Create Docker manifest
64-
id: manifest_docker
64+
- name: Create Docker manifest AMD64
65+
id: manifest_docker_amd64
6566
uses: int128/docker-manifest-create-action@v2
6667
with:
6768
tags: |
6869
${{ steps.meta_docker.outputs.tags }}
6970
push: true
7071
sources: |
7172
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ needs.docker-amd64.outputs.digest }}
72-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ needs.docker-arm64.outputs.digest }}
73+
74+
- name: Create Docker manifest ARM64
75+
if: ${{ inputs.cpy_platform != 'litex' }}
76+
id: manifest_docker_arm64
77+
uses: int128/docker-manifest-create-action@v2
78+
with:
79+
tags: |
80+
${{ steps.meta_docker.outputs.tags }}
81+
push: true
82+
sources: |
83+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ needs.docker-arm64.outputs.digest }}

.github/workflows/on_push.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
cpy_platform:
24-
- analog
25-
- atmel-samd
26-
- broadcom
27-
- cxd56
28-
- espressif
24+
# - analog
25+
# - atmel-samd
26+
# - broadcom
27+
# - cxd56
28+
# - espressif
2929
- litex
30-
- mimxrt10xx
31-
- nordic
32-
- raspberrypi
33-
- renode
34-
- silabs
35-
- stm
30+
# - mimxrt10xx
31+
# - nordic
32+
# - raspberrypi
33+
# - renode
34+
# - silabs
35+
# - stm
3636
- zephyr-cp
3737
uses: ./.github/workflows/docker_manifest.yml
3838
with:

Containerfile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ ARG ARM_TOOLCHAIN_EABI_VERSION="14.2.rel1"
4242
ARG ARM_TOOLCHAIN_ELF_VERSION="13.3.rel1"
4343
ARG BUILD_PLATFORM
4444

45-
RUN make -C ports/"${BUILD_PLATFORM}" fetch-port-submodules
45+
RUN if [ "${BUILD_PLATFORM}" != "zephyr-cp" ]; then \
46+
make -C ports/"${BUILD_PLATFORM}" fetch-port-submodules; \
47+
fi
4648

4749
RUN if [ "${BUILD_PLATFORM}" != "espressif" ] && [ "${BUILD_PLATFORM}" != "zephyr-cp" ] && [ "${BUILD_PLATFORM}" != "litex" ] && [ "${BUILD_PLATFORM}" != "none" ]; then \
4850
ARCH=$(dpkg --print-architecture) && \
@@ -120,5 +122,16 @@ RUN if [ "${BUILD_PLATFORM}" = "litex" ]; then \
120122
rm -rf riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz; \
121123
fi
122124

125+
# Zephyr
126+
RUN if [ "${BUILD_PLATFORM}" = "zephyr-cp" ]; then \
127+
cd ports/zephyr-cp \
128+
&& pip install west \
129+
&& west init -l zephyr-config \
130+
&& west update \
131+
&& west zephyr-export \
132+
&& west packages pip --install \
133+
&& west sdk install; \
134+
fi
135+
123136
COPY --chmod=0755 entrypoint.sh /entrypoint.sh
124137
ENTRYPOINT [ "/entrypoint.sh" ]

0 commit comments

Comments
 (0)