Build RPi jobs using arm-based runners

This commit is contained in:
Paulchen-Panther 2025-02-08 21:51:27 +01:00
parent 307fda4dc9
commit c92fbfff5d
2 changed files with 4 additions and 2 deletions

View File

@ -3,6 +3,7 @@
# set environment variables if not exists # set environment variables if not exists
[ -z "${BUILD_TYPE}" ] && BUILD_TYPE="Debug" [ -z "${BUILD_TYPE}" ] && BUILD_TYPE="Debug"
[ -z "${TARGET_ARCH}" ] && TARGET_ARCH="linux/amd64" [ -z "${TARGET_ARCH}" ] && TARGET_ARCH="linux/amd64"
[ -z "${ENTRYPOINT}" ] && ENTRYPOINT=""
[ -z "${PLATFORM}" ] && PLATFORM="x11" [ -z "${PLATFORM}" ] && PLATFORM="x11"
# Determine cmake build type; tag builds are Release, else Debug (-dev appends to platform) # Determine cmake build type; tag builds are Release, else Debug (-dev appends to platform)
@ -39,7 +40,7 @@ elif [[ "$RUNNER_OS" == 'Linux' ]]; then
mkdir ${GITHUB_WORKSPACE}/deploy mkdir ${GITHUB_WORKSPACE}/deploy
# run docker # run docker
docker run --rm --platform=${TARGET_ARCH} \ docker run --rm --platform=${TARGET_ARCH} ${ENTRYPOINT} \
-v "${GITHUB_WORKSPACE}/deploy:/deploy" \ -v "${GITHUB_WORKSPACE}/deploy:/deploy" \
-v "${GITHUB_WORKSPACE}:/source:rw" \ -v "${GITHUB_WORKSPACE}:/source:rw" \
$REGISTRY_URL:$DOCKER_TAG \ $REGISTRY_URL:$DOCKER_TAG \

View File

@ -36,7 +36,7 @@ jobs:
Linux: Linux:
name: 🐧 ${{ matrix.os.description }} name: 🐧 ${{ matrix.os.description }}
runs-on: ubuntu-22.04 runs-on: ${{ matrix.os.architecture[0] == 'amd64' && 'ubuntu-22.04' || 'ubuntu-22.04-arm' }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -80,6 +80,7 @@ jobs:
DOCKER_IMAGE: ${{ matrix.os.distribution }} DOCKER_IMAGE: ${{ matrix.os.distribution }}
DOCKER_TAG: ${{ matrix.os.codename }}${{ inputs.qt_version == '6' && '-qt6' || '' }} DOCKER_TAG: ${{ matrix.os.codename }}${{ inputs.qt_version == '6' && '-qt6' || '' }}
PLATFORM: ${{ matrix.os.platform }} PLATFORM: ${{ matrix.os.platform }}
ENTRYPOINT: ${{ matrix.os.architecture[0] == 'amd64' && '--entrypoint /usr/bin/env' || '' }}
TARGET_ARCH: ${{ matrix.os.architecture[1] }} TARGET_ARCH: ${{ matrix.os.architecture[1] }}
- name: 📦 Upload - name: 📦 Upload