Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG DOCKER_ARCH
ARG DEBIAN_VERSION
FROM ${DOCKER_ARCH}debian:${DEBIAN_VERSION} as build_env
ARG DOCKER_REPO
FROM --platform=linux/${DOCKER_ARCH} ${DOCKER_REPO}debian:${DEBIAN_VERSION} as build_env

RUN apt-get -y update && apt-get -y install gnupg2

Expand Down
8 changes: 4 additions & 4 deletions .github/ci/build-env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

if [[ $# -lt 3 ]]; then
echo "usage: $0 <generic|raspi> <buster|bullseye> <amd64|arm32v7|arm64v8>"
echo "usage: $0 <generic|raspi> <bullseye|bookworm> <amd64|arm32v7|arm64v8>"
exit 1
fi

Expand All @@ -10,18 +10,18 @@ docker_image="camera_streamer_build_env"
build_type="raspi"
[[ -n "$1" ]] && build_type="$1"

debian_version="bullseye"
debian_version="bookworm"
[[ -n "$2" ]] && debian_version="$2" && docker_image="${docker_image}_${2}"

docker_arch=""
[[ -n "$3" ]] && docker_arch="$3/" && docker_image="${docker_image}_${3}"
[[ -n "$3" ]] && docker_arch="$3" && docker_image="${docker_image}_${3}"

PWD=$(pwd)
ROOT=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )/../.." &> /dev/null && pwd)

set -xeo pipefail

docker build -t "$docker_image" \
DOCKER_BUILDKIT=1 docker build -t "$docker_image" \
--build-arg "DOCKER_ARCH=$docker_arch" \
--build-arg "DEBIAN_VERSION=$debian_version" \
--build-arg "BUILD_TYPE=$build_type" \
Expand Down
27 changes: 22 additions & 5 deletions .github/workflows/build_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,23 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.arch.runner }}
permissions:
contents: write
strategy:
matrix:
debian_version: [bullseye, bookworm]
docker_arch: [amd64, arm32v7, arm64v8]
arch:
- docker: amd64
runner: ubuntu-24.04
- docker: arm/v7
runner: ubuntu-24.04
- docker: arm64/v8
runner: ubuntu-24.04-arm
build_type: [generic, raspi]
exclude:
- docker_arch: amd64
- arch:
docker: amd64
build_type: raspi
steps:
- name: Checkout
Expand All @@ -38,11 +45,21 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Build Dockerfile
run: docker build --target deb_make --tag deb_make --file .github/ci/Dockerfile --build-arg GIT_VERSION --build-arg DOCKER_ARCH --build-arg DEBIAN_VERSION --build-arg BUILD_TYPE .
run: |
docker build \
--target deb_make \
--tag deb_make \
--file .github/ci/Dockerfile \
--build-arg GIT_VERSION \
--build-arg DOCKER_ARCH \
--build-arg DEBIAN_VERSION \
--build-arg BUILD_TYPE \
.
env:
DEBIAN_VERSION: ${{ matrix.debian_version }}
DOCKER_ARCH: ${{ matrix.docker_arch }}/
DOCKER_ARCH: ${{ matrix.arch.docker }}
BUILD_TYPE: ${{ matrix.build_type }}
DOCKER_BUILDKIT: 1
- name: Create container
run: docker create --name deb_make deb_make
- name: Copy files
Expand Down
34 changes: 28 additions & 6 deletions .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,29 @@ on:
- 'RELEASE.md'
pull_request:
workflow_dispatch:
schedule:
- cron: '0 15 * * 2' # Runs at 15:00 (3pm) UTC every Tuesday

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.arch.runner }}
strategy:
matrix:
debian_version: [bullseye, bookworm]
docker_arch: [amd64, arm32v7, arm64v8]
arch:
- docker: amd64
variant: amd64
runner: ubuntu-24.04
- docker: arm/v7
variant: arm32v7
runner: ubuntu-24.04
- docker: arm64/v8
variant: arm64v8
runner: ubuntu-24.04-arm
build_type: [generic, raspi]
exclude:
- docker_arch: amd64
- arch:
docker: amd64
build_type: raspi
steps:
- name: Checkout
Expand All @@ -28,18 +40,28 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Build Dockerfile
run: docker build --target deb_make --tag deb_make --file .github/ci/Dockerfile --build-arg GIT_VERSION --build-arg DOCKER_ARCH --build-arg DEBIAN_VERSION --build-arg BUILD_TYPE .
run: |
docker build \
--target deb_make \
--tag deb_make \
--file .github/ci/Dockerfile \
--build-arg GIT_VERSION \
--build-arg DOCKER_ARCH \
--build-arg DEBIAN_VERSION \
--build-arg BUILD_TYPE \
.
env:
DEBIAN_VERSION: ${{ matrix.debian_version }}
DOCKER_ARCH: ${{ matrix.docker_arch }}/
DOCKER_ARCH: ${{ matrix.arch.docker }}
BUILD_TYPE: ${{ matrix.build_type }}
DOCKER_BUILDKIT: 1
- name: Create container
run: docker create --name deb_make deb_make
- name: Copy files
run: docker cp deb_make:/deb/. deb/
- name: 'Upload debian files'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.debian_version }}-${{ matrix.docker_arch }}-${{ matrix.build_type }}.zip
name: ${{ matrix.debian_version }}-${{ matrix.arch.variant }}-${{ matrix.build_type }}.zip
path: deb/
retention-days: 14