@@ -2,7 +2,7 @@ name: linux
22
33on :
44 push :
5- branches : [main]
5+ branches : [ main ]
66 pull_request :
77
88concurrency :
@@ -56,15 +56,28 @@ jobs:
5656 fail-fast : false
5757 matrix :
5858 image :
59- - build
60- - build.cross
61- - build.cross-riscv64
62- - gcc
63- - xcb
64- - xcb.cross
65- - xcb.cross-riscv64
66- name : ${{ matrix.image }}
67- runs-on : depot-ubuntu-22.04
59+ - name : build
60+ platform : linux64
61+ - name : build.cross
62+ platform : linux64
63+ - name : build.cross-riscv64
64+ platform : linux64
65+ - name : build.debian9
66+ platform : linux_aarch64
67+ - name : gcc
68+ platform : linux64
69+ - name : gcc.debian9
70+ platform : linux_aarch64
71+ - name : xcb
72+ platform : linux64
73+ - name : xcb.cross
74+ platform : linux64
75+ - name : xcb.cross-riscv64
76+ platform : linux64
77+ - name : xcb.debian9
78+ platform : linux_aarch64
79+ name : ${{ matrix.image.name }}
80+ runs-on : ${{ matrix.image.platform == 'linux_aarch64' && 'depot-ubuntu-22.04-arm' || 'depot-ubuntu-22.04' }}
6881 permissions :
6982 packages : write
7083 steps :
@@ -98,30 +111,30 @@ jobs:
98111 uses : docker/build-push-action@v5
99112 with :
100113 context : .
101- file : build/${{ matrix.image }}.Dockerfile
114+ file : build/${{ matrix.image.name }}.Dockerfile
102115 labels : org.opencontainers.image.source=https://github.com/${{ env.REPO_NAME }}
103116 # Cache from/to the current branch of the current repo as the primary cache key.
104117 # Cache from the default branch of the current repo so branches can have cache hits.
105118 # Cache from the default branch of the canonical repo so forks can have cache hits.
106119 # Ignore errors on cache writes so CI of forks works without a valid GHCR config.
107120 cache-from : |
108- type=registry,ref=ghcr.io/${{ env.REPO_NAME }}:${{ matrix.image }}-${{ env.GIT_REF_NAME }}
109- type=registry,ref=ghcr.io/${{ env.REPO_NAME }}:${{ matrix.image }}-main
110- type=registry,ref=ghcr.io/astral-sh/python-build-standalone:${{ matrix.image }}-main
121+ type=registry,ref=ghcr.io/${{ env.REPO_NAME }}:${{ matrix.image.name }}-${{ matrix.image.platform }}-${{ env.GIT_REF_NAME }}
122+ type=registry,ref=ghcr.io/${{ env.REPO_NAME }}:${{ matrix.image.name }}-${{ matrix.image.platform }}-main
123+ type=registry,ref=ghcr.io/astral-sh/python-build-standalone:${{ matrix.image.name }}-${{ matrix.image.platform }}-main
111124 cache-to : |
112- type=registry,ref=ghcr.io/${{ env.REPO_NAME }}:${{ matrix.image }}-${{ env.GIT_REF_NAME }},ignore-error=true
125+ type=registry,ref=ghcr.io/${{ env.REPO_NAME }}:${{ matrix.image.name }}-${{ matrix.image.platform }}-${{ env.GIT_REF_NAME }},ignore-error=true
113126 outputs : |
114- type=docker,dest=build/image-${{ matrix.image }}.tar
127+ type=docker,dest=build/image-${{ matrix.image.name }}.${{ matrix.image.platform }}.tar
115128
116129 - name : Compress Image
117130 run : |
118- echo ${{ steps.build-image.outputs.imageid }} > build/image-${{ matrix.image }}
131+ echo ${{ steps.build-image.outputs.imageid }} > build/image-${{ matrix.image.name }}.${{ matrix.image.platform }}
119132 zstd -v -T0 -6 --rm build/image-*.tar
120133
121134 - name : Upload Docker Image
122135 uses : actions/upload-artifact@v4
123136 with :
124- name : image-${{ matrix.image }}
137+ name : image-${{ matrix.image.name }}-${{ matrix.image.platform }}
125138 path : build/image-*
126139
127140 generate-matrix :
0 commit comments