Skip to content

Commit

Permalink
Add multi build setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jstabenow committed May 12, 2022
1 parent 9f9ede3 commit 53027e8
Show file tree
Hide file tree
Showing 14 changed files with 1,193 additions and 287 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
79 changes: 79 additions & 0 deletions .github/workflows/build_base_alpine-rpi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: 'Build base:alpine-ffmpeg-rpi'

on:
workflow_dispatch:
push:
branches-ignore:
- '**'

jobs:
docker:
runs-on: [self-hosted]
steps:
- name: Checkout
uses: actions/checkout@v2

- uses: cardinalby/export-env-action@v1
with:
envFile: 'Build.alpine.env'
export: 'true'
expandWithJobEnv: 'true'
expand: 'true'

- uses: cardinalby/export-env-action@v1
with:
envFile: 'Build.alpine.rpi.env'
export: 'true'
expandWithJobEnv: 'true'
expand: 'true'

- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: linux/arm/v7

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build Multi-Arch
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile.alpine.rpi
build-args: |
ALPINE_IMAGE=${{ env.OS_NAME }}:${{ env.OS_VERSION }}
FREETYPE_VERSION=${{ env.FREETYPE_VERSION }}
XML2_VERSION=${{ env.XML2_VERSION }}
SRT_VERSION=${{ env.SRT_VERSION }}
X264_VERSION=${{ env.X264_VERSION }}
X265_VERSION=${{ env.X265_VERSION }}
VPX_VERSION=${{ env.VPX_VERSION }}
LAME_VERSION=${{ env.LAME_VERSION }}
OPUS_VERSION=${{ env.OPUS_VERSION }}
VORBIS_VERSION=${{ env.VORBIS_VERSION }}
FFMPEG_VERSION=${{ env.FFMPEG_VERSION }}
RPI_VERSION=${{ env.RPI_VERSION }}
platforms: linux/arm/v7
push: true
tags: |
datarhei/base:${{ env.OS_NAME }}-ffmpeg-rpi-${{ env.OS_VERSION }}-${{ env.FFMPEG_VERSION }}
datarhei/base:${{ env.OS_NAME }}-ffmpeg-rpi-latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
88 changes: 88 additions & 0 deletions .github/workflows/build_base_alpine-vaapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: 'Build base:alpine-ffmpeg-vvapi'

on:
workflow_dispatch:
push:
branches-ignore:
- '**'

jobs:
docker:
runs-on: [self-hosted]
steps:
- name: Checkout
uses: actions/checkout@v2

- uses: cardinalby/export-env-action@v1
with:
envFile: 'Build.alpine.env'
export: 'true'
expandWithJobEnv: 'true'
expand: 'true'

- uses: cardinalby/export-env-action@v1
with:
envFile: 'Build.alpine.vaapi.env'
export: 'true'
expandWithJobEnv: 'true'
expand: 'true'

- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build Multi-Arch
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile.alpine.vaapi
build-args: |
ALPINE_IMAGE=${{ env.OS_NAME }}:${{ env.OS_VERSION }}
FREETYPE_VERSION=${{ env.FREETYPE_VERSION }}
XML2_VERSION=${{ env.XML2_VERSION }}
SRT_VERSION=${{ env.SRT_VERSION }}
X264_VERSION=${{ env.X264_VERSION }}
X265_VERSION=${{ env.X265_VERSION }}
VPX_VERSION=${{ env.VPX_VERSION }}
LAME_VERSION=${{ env.LAME_VERSION }}
OPUS_VERSION=${{ env.OPUS_VERSION }}
VORBIS_VERSION=${{ env.VORBIS_VERSION }}
FFMPEG_VERSION=${{ env.FFMPEG_VERSION }}
LIBAV_VERSION=${{ env.LIBAV_VERSION }}
LIBVDPAU_VERSION=${{ env.LIBVDPAU_VERSION }}
MESA_VA_GALLIUM_VERSION=${{ env.MESA_VA_GALLIUM_VERSION }}
MESA_VDPAU_GALLIUM_VERSION=${{ env.MESA_VDPAU_GALLIUM_VERSION }}
LIBVA_VDPAU_DRIVER_VERSION=${{ env.LIBVA_VDPAU_DRIVER_VERSION }}
INTEL_GMMLIB_VERSION=${{ env.INTEL_GMMLIB_VERSION }}
INTEL_MEDIA_DRIVER_VERSION=${{ env.INTEL_MEDIA_DRIVER_VERSION }}
INTEL_MEDIA_SDK_VERSION=${{ env.INTEL_MEDIA_SDK_VERSION }}
INTEL_VAAPI_DRIVER=${{ env.INTEL_VAAPI_DRIVER }}
platforms: linux/amd64
push: true
tags: |
datarhei/base:${{ env.OS_NAME }}-ffmpeg-vaapi-${{ env.OS_VERSION }}-${{ env.FFMPEG_VERSION }}
datarhei/base:${{ env.OS_NAME }}-ffmpeg-vaapi-latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
71 changes: 71 additions & 0 deletions .github/workflows/build_base_alpine.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: 'Build base:alpine-ffmpeg'

on:
workflow_dispatch:
push:
branches-ignore:
- '**'

jobs:
docker:
runs-on: [self-hosted]
steps:
- name: Checkout
uses: actions/checkout@v2

- uses: cardinalby/export-env-action@v1
with:
envFile: 'Build.alpine.env'
export: 'true'
expandWithJobEnv: 'true'
expand: 'true'

- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build Multi-Arch
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile.alpine
build-args: |
ALPINE_IMAGE=${{ env.OS_NAME }}:${{ env.OS_VERSION }}
FREETYPE_VERSION=${{ env.FREETYPE_VERSION }}
XML2_VERSION=${{ env.XML2_VERSION }}
SRT_VERSION=${{ env.SRT_VERSION }}
X264_VERSION=${{ env.X264_VERSION }}
X265_VERSION=${{ env.X265_VERSION }}
VPX_VERSION=${{ env.VPX_VERSION }}
LAME_VERSION=${{ env.LAME_VERSION }}
OPUS_VERSION=${{ env.OPUS_VERSION }}
VORBIS_VERSION=${{ env.VORBIS_VERSION }}
FFMPEG_VERSION=${{ env.FFMPEG_VERSION }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
datarhei/base:${{ env.OS_NAME }}-ffmpeg-${{ env.OS_VERSION }}-${{ env.FFMPEG_VERSION }}
datarhei/base:${{ env.OS_NAME }}-ffmpeg-latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
13 changes: 13 additions & 0 deletions Build.alpine.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# FFMPEG BASE PACKAGES
OS_NAME=alpine
OS_VERSION=3.15
FREETYPE_VERSION=2.11.1-r1
XML2_VERSION=2.9.13-r0
SRT_VERSION=1.4.2-r1
X264_VERSION=20210613-r0
X265_VERSION=3.5-r0
VPX_VERSION=1.10.0-r0
LAME_VERSION=3.100-r0
OPUS_VERSION=1.3.1-r1
VORBIS_VERSION=1.3.7-r0
FFMPEG_VERSION=4.4.2
2 changes: 2 additions & 0 deletions Build.alpine.rpi.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# FFMPEG RPI PACKAGES
RPI_VERSION=0.20200813-r0
10 changes: 10 additions & 0 deletions Build.alpine.vaapi.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# FFMPEG VAAPI PACKAGES
LIBAV_VERSION=2.14.0-r0
LIBVDPAU_VERSION=1.5-r0
MESA_VA_GALLIUM_VERSION=21.3.8-r1
MESA_VDPAU_GALLIUM_VERSION=21.3.8-r1
LIBVA_VDPAU_DRIVER_VERSION=0.7.4-r2
INTEL_GMMLIB_VERSION=22.1.2-r0
INTEL_MEDIA_DRIVER_VERSION=22.4.1-r0
INTEL_MEDIA_SDK_VERSION=22.4.1-r0
INTEL_VAAPI_DRIVER=2.4.1-r0
Loading

0 comments on commit 53027e8

Please sign in to comment.