@@ -2,7 +2,7 @@ name: linux
22
33on :
44 push :
5- branches : [main]
5+ branches : [ main ]
66 pull_request :
77
88concurrency :
@@ -56,12 +56,28 @@ jobs:
5656 fail-fast : false
5757 matrix :
5858 image :
59- - build
60- - build.cross
61- - build.cross-riscv64
62- - gcc
63- name : ${{ matrix.image }}
64- 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' }}
6581 permissions :
6682 packages : write
6783 steps :
@@ -95,30 +111,30 @@ jobs:
95111 uses : docker/build-push-action@v5
96112 with :
97113 context : .
98- file : build/${{ matrix.image }}.Dockerfile
114+ file : build/${{ matrix.image.name }}.Dockerfile
99115 labels : org.opencontainers.image.source=https://github.com/${{ env.REPO_NAME }}
100116 # Cache from/to the current branch of the current repo as the primary cache key.
101117 # Cache from the default branch of the current repo so branches can have cache hits.
102118 # Cache from the default branch of the canonical repo so forks can have cache hits.
103119 # Ignore errors on cache writes so CI of forks works without a valid GHCR config.
104120 cache-from : |
105- type=registry,ref=ghcr.io/${{ env.REPO_NAME }}:${{ matrix.image }}-${{ env.GIT_REF_NAME }}
106- type=registry,ref=ghcr.io/${{ env.REPO_NAME }}:${{ matrix.image }}-main
107- 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
108124 cache-to : |
109- 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
110126 outputs : |
111- type=docker,dest=build/image-${{ matrix.image }}.tar
127+ type=docker,dest=build/image-${{ matrix.image.name }}.${{ matrix.image.platform }}.tar
112128
113129 - name : Compress Image
114130 run : |
115- 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 }}
116132 zstd -v -T0 -6 --rm build/image-*.tar
117133
118134 - name : Upload Docker Image
119135 uses : actions/upload-artifact@v4
120136 with :
121- name : image-${{ matrix.image }}
137+ name : image-${{ matrix.image.name }}-${{ matrix.image.platform }}
122138 path : build/image-*
123139
124140 generate-matrix :
0 commit comments