Skip to content

Commit 50b684b

Browse files
committed
Build one fully loaded arm based image for CI testing
1 parent bfcf840 commit 50b684b

11 files changed

Lines changed: 63 additions & 31 deletions

File tree

.github/workflows/build.yml

Lines changed: 44 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ jobs:
5252
strategy:
5353
fail-fast: false
5454
matrix:
55-
runner: [ubuntu-latest,ubuntu-24.04-arm]
55+
include:
56+
- runner: ubuntu-latest
57+
tag_suffix: ''
58+
- runner: ubuntu-24.04-arm
59+
tag_suffix: -arm
5660
runs-on: ${{ matrix.runner }}
5761
steps:
5862
- name: Free Disk-Space
@@ -85,9 +89,9 @@ jobs:
8589
pull: true
8690
push: true
8791
provenance: false
88-
tags: ${{ steps.imagename.outputs.name }}:latest${{ (contains(matrix.runner, 'arm') && '-arm') || '' }}
89-
cache-to: type=registry,mode=max,ref=${{ steps.imagename.outputs.name }}:cache${{ (contains(matrix.runner, 'arm') && '-arm') || '' }}
90-
cache-from: type=registry,ref=${{ steps.imagename.outputs.name }}:cache${{ (contains(matrix.runner, 'arm') && '-arm') || '' }}
92+
tags: ${{ steps.imagename.outputs.name }}:latest${{ matrix.tag_suffix || '' }}
93+
cache-to: type=registry,mode=max,ref=${{ steps.imagename.outputs.name }}:cache${{ matrix.tag_suffix || '' }}
94+
cache-from: type=registry,ref=${{ steps.imagename.outputs.name }}:cache${{ matrix.tag_suffix || '' }}
9195
- name: Get download cache key
9296
if: ${{ !cancelled() && !contains(matrix.runner, 'arm') }}
9397
id: dl_cache
@@ -129,11 +133,16 @@ jobs:
129133
name: Build target base image
130134
if: ${{ github.event.inputs.buildOnly != 'true' }}
131135
needs: build_base
132-
runs-on: ubuntu-latest
136+
runs-on: ${{ matrix.runner || 'ubuntu-latest' }}
133137
strategy:
134138
fail-fast: false
135139
matrix:
140+
runner: [ubuntu-latest]
136141
target: [win32,win64,winarm64,linux32,linux64,linuxarm64,linuxppc64,linuxmips64,linuxriscv64]
142+
include:
143+
- runner: ubuntu-24.04-arm
144+
target: linuxarm64
145+
tag_suffix: -arm
137146
steps:
138147
- name: Free Disk-Space
139148
run: df -h && sudo apt-get clean && docker system prune -a -f && sudo rm -rf /opt/ghc /usr/local/.ghcup /usr/local/lib/android && df -h
@@ -166,11 +175,12 @@ jobs:
166175
pull: true
167176
push: true
168177
provenance: false
169-
tags: ${{ steps.imagename.outputs.name }}:latest
170-
cache-to: type=registry,mode=max,ref=${{ steps.imagename.outputs.name }}:cache
171-
cache-from: type=registry,ref=${{ steps.imagename.outputs.name }}:cache
178+
tags: ${{ steps.imagename.outputs.name }}:latest${{ matrix.tag_suffix || '' }}
179+
cache-to: type=registry,mode=max,ref=${{ steps.imagename.outputs.name }}:cache${{ matrix.tag_suffix || '' }}
180+
cache-from: type=registry,ref=${{ steps.imagename.outputs.name }}:cache${{ matrix.tag_suffix || '' }}
172181
build-args: |
173182
GH_REPO=ghcr.io/${{ steps.imagename.outputs.gh_repo }}
183+
BASE_TAG_SUFFIX=${{ matrix.tag_suffix || '' }}
174184
- name: Cleanup
175185
continue-on-error: true
176186
uses: BtbN/delete-untagged-ghcr-action@main
@@ -185,29 +195,42 @@ jobs:
185195
name: Build target-variant image
186196
if: ${{ github.event.inputs.buildOnly != 'true' }}
187197
needs: build_target_bases
188-
runs-on: ubuntu-latest
198+
runs-on: ${{ matrix.runner || 'ubuntu-latest' }}
189199
strategy:
190200
fail-fast: false
191201
matrix:
202+
runner: [ubuntu-latest]
192203
target: [win64,winarm64,linux64,linuxarm64]
193204
variant: [gpl,lgpl,gpl 8.1,gpl 7.1,lgpl 8.1,lgpl 7.1,gpl-shared,lgpl-shared,gpl-shared 8.1,gpl-shared 7.1,lgpl-shared 8.1,lgpl-shared 7.1]
194205
include:
195-
- target: win64
206+
- runner: ubuntu-latest
207+
target: win64
196208
variant: gpl 8.0
197-
- target: win64
209+
- runner: ubuntu-latest
210+
target: win64
198211
variant: gpl 7.0
199-
- target: win64
212+
- runner: ubuntu-latest
213+
target: win64
200214
variant: gpl 6.1
201-
- target: win64
215+
- runner: ubuntu-latest
216+
target: win64
202217
variant: gpl 6.0
203-
- target: win64
218+
- runner: ubuntu-latest
219+
target: win64
204220
variant: gpl 5.1
205-
- target: win64
221+
- runner: ubuntu-latest
222+
target: win64
206223
variant: gpl 5.0
207-
- target: win64
224+
- runner: ubuntu-latest
225+
target: win64
208226
variant: gpl 4.4
209-
- target: win64
227+
- runner: ubuntu-latest
228+
target: win64
210229
variant: gpl 4.3
230+
- runner: ubuntu-24.04-arm
231+
target: linuxarm64
232+
variant: gpl
233+
tag_suffix: -arm
211234
steps:
212235
- name: Free Disk-Space
213236
run: df -h && sudo apt-get clean && docker system prune -a -f && sudo rm -rf /opt/ghc /usr/local/.ghcup /usr/local/lib/android && df -h
@@ -237,7 +260,7 @@ jobs:
237260
- name: Stop Commands
238261
run: T="$(echo -n ${{ github.token }} | sha256sum | head -c 64)" && echo -e "::add-mask::${T}\n::stop-commands::${T}"
239262
- name: Generate Dockerfile
240-
run: ./generate.sh ${{ matrix.target }} ${{ matrix.variant }}
263+
run: DOCKER_TAG_SUFFIX=${{ matrix.tag_suffix || '' }} ./generate.sh ${{ matrix.target }} ${{ matrix.variant }}
241264
- name: Cache
242265
uses: actions/cache/restore@v5
243266
with:
@@ -251,9 +274,9 @@ jobs:
251274
pull: true
252275
push: true
253276
provenance: false
254-
tags: ${{ steps.imagename.outputs.name }}:latest
255-
cache-to: type=registry,mode=max,ref=${{ steps.imagename.outputs.name }}:cache
256-
cache-from: type=registry,ref=${{ steps.imagename.outputs.name }}:cache
277+
tags: ${{ steps.imagename.outputs.name }}:latest${{ matrix.tag_suffix || '' }}
278+
cache-to: type=registry,mode=max,ref=${{ steps.imagename.outputs.name }}:cache${{ matrix.tag_suffix || '' }}
279+
cache-from: type=registry,ref=${{ steps.imagename.outputs.name }}:cache${{ matrix.tag_suffix || '' }}
257280
- name: Cleanup
258281
continue-on-error: true
259282
uses: BtbN/delete-untagged-ghcr-action@main

generate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ get_output() {
134134
export TODF="Dockerfile"
135135

136136
BASELAYER="base-layer"
137-
to_df "FROM ${REGISTRY}/${REPO}/base-${TARGET}:latest AS ${BASELAYER}"
137+
to_df "FROM ${REGISTRY}/${REPO}/base-${TARGET}:latest${DOCKER_TAG_SUFFIX:-} AS ${BASELAYER}"
138138
to_df "ENV TARGET=$TARGET VARIANT=$VARIANT REPO=$REPO ADDINS_STR=$ADDINS_STR FFVER=$(ffbuild_ffver)"
139139
to_df "COPY --link util/run_stage.sh /usr/bin/run_stage"
140140

images/base-linux32/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
ARG GH_REPO=ghcr.io/fwgs/ffmpeg-builds
2-
FROM $GH_REPO/base:latest
2+
ARG BASE_TAG_SUFFIX=
3+
FROM $GH_REPO/base:latest${BASE_TAG_SUFFIX}
34

45
RUN --mount=src=ct-ng-config,dst=/.config \
56
git clone --filter=blob:none https://github.com/crosstool-ng/crosstool-ng.git /ct-ng && cd /ct-ng && \

images/base-linux64/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
ARG GH_REPO=ghcr.io/btbn/ffmpeg-builds
2-
FROM $GH_REPO/base:latest
2+
ARG BASE_TAG_SUFFIX=
3+
FROM $GH_REPO/base:latest${BASE_TAG_SUFFIX}
34

45
RUN --mount=src=ct-ng-config,dst=/.config \
56
git clone --filter=blob:none https://github.com/crosstool-ng/crosstool-ng.git /ct-ng && cd /ct-ng && \

images/base-linuxarm64/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
ARG GH_REPO=ghcr.io/btbn/ffmpeg-builds
2-
FROM $GH_REPO/base:latest
2+
ARG BASE_TAG_SUFFIX=
3+
FROM $GH_REPO/base:latest${BASE_TAG_SUFFIX}
34

45
RUN --mount=src=ct-ng-config,dst=/.config \
56
git clone --filter=blob:none https://github.com/crosstool-ng/crosstool-ng.git /ct-ng && cd /ct-ng && \

images/base-linuxmips64/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
ARG GH_REPO=ghcr.io/btbn/ffmpeg-builds
2-
FROM $GH_REPO/base:latest
2+
ARG BASE_TAG_SUFFIX=
3+
FROM $GH_REPO/base:latest${BASE_TAG_SUFFIX}
34

45
RUN --mount=src=ct-ng-config,dst=/.config \
56
git clone --filter=blob:none https://github.com/crosstool-ng/crosstool-ng.git /ct-ng && cd /ct-ng && \

images/base-linuxppc64/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
ARG GH_REPO=ghcr.io/btbn/ffmpeg-builds
2-
FROM $GH_REPO/base:latest
2+
ARG BASE_TAG_SUFFIX=
3+
FROM $GH_REPO/base:latest${BASE_TAG_SUFFIX}
34

45
RUN --mount=src=ct-ng-config,dst=/.config \
56
git clone --filter=blob:none https://github.com/crosstool-ng/crosstool-ng.git /ct-ng && cd /ct-ng && \

images/base-linuxriscv64/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
ARG GH_REPO=ghcr.io/btbn/ffmpeg-builds
2-
FROM $GH_REPO/base:latest
2+
ARG BASE_TAG_SUFFIX=
3+
FROM $GH_REPO/base:latest${BASE_TAG_SUFFIX}
34

45
RUN --mount=src=ct-ng-config,dst=/.config \
56
git clone --filter=blob:none https://github.com/crosstool-ng/crosstool-ng.git /ct-ng && cd /ct-ng && \

images/base-win32/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
ARG GH_REPO=ghcr.io/btbn/ffmpeg-builds
2-
FROM $GH_REPO/base:latest
2+
ARG BASE_TAG_SUFFIX=
3+
FROM $GH_REPO/base:latest${BASE_TAG_SUFFIX}
34

45
RUN --mount=src=ct-ng-config,dst=/.config \
56
git clone --filter=blob:none https://github.com/crosstool-ng/crosstool-ng.git /ct-ng && cd /ct-ng && \

images/base-win64/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
ARG GH_REPO=ghcr.io/btbn/ffmpeg-builds
2-
FROM $GH_REPO/base:latest
2+
ARG BASE_TAG_SUFFIX=
3+
FROM $GH_REPO/base:latest${BASE_TAG_SUFFIX}
34

45
RUN --mount=src=ct-ng-config,dst=/.config \
56
git clone --filter=blob:none https://github.com/crosstool-ng/crosstool-ng.git /ct-ng && cd /ct-ng && \

0 commit comments

Comments
 (0)