From 09048bf4f4604b38231321feec042cd3bbb10596 Mon Sep 17 00:00:00 2001 From: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com> Date: Mon, 16 Oct 2023 14:27:43 +0200 Subject: [PATCH] build github releases with new docker files --- .ci/ci_build.sh | 4 ++-- .github/workflows/pull-request.yml | 36 +++++++++++++++--------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.ci/ci_build.sh b/.ci/ci_build.sh index df276f00..b06b32c3 100755 --- a/.ci/ci_build.sh +++ b/.ci/ci_build.sh @@ -45,14 +45,14 @@ elif [[ $CI_NAME == *"mingw64_nt"* || "$CI_NAME" == 'windows_nt' ]]; then exit 0; exit 1 || { echo "---> Hyperion compilation failed! Abort"; exit 5; } elif [[ "$CI_NAME" == 'linux' ]]; then - echo "Compile Hyperion with DOCKER_IMAGE = ${DOCKER_IMAGE}, DOCKER_TAG = ${DOCKER_TAG} and friendly name DOCKER_NAME = ${DOCKER_NAME}" + echo "Compile Hyperion with DOCKER_IMAGE = ${DOCKER_IMAGE}, DOCKER_TAG = ${DOCKER_TAG}, ARCHITECTURE = ${ARCHITECTURE} and friendly name DOCKER_NAME = ${DOCKER_NAME}" # set GitHub Container Registry url REGISTRY_URL="ghcr.io/hyperion-project/${DOCKER_IMAGE}" # take ownership of deploy dir mkdir ${CI_BUILD_DIR}/deploy # run docker - docker run --rm \ + docker run --rm --platform=${ARCHITECTURE} \ -v "${CI_BUILD_DIR}/deploy:/deploy" \ -v "${CI_BUILD_DIR}:/source:ro" \ $REGISTRY_URL:$DOCKER_TAG \ diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index a0a6635b..73e2279c 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -16,24 +16,20 @@ jobs: ###################### Linux: - name: 🐧 ${{ matrix.dockerName }} + name: 🐧 ${{ matrix.os.description }} runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - dockerImage: [ x86_64, armv6l, armv7l, aarch64 ] + os: [ + { description: Debian Buster (x86_64), platform: x11, architecture: linux/amd64 }, + { description: Debian Buster (Raspberry Pi v1 & ZERO), platform: rpi, architecture: linux/arm/v7 }, + { description: Debian Buster (Raspberry Pi 2 & 3), platform: rpi, architecture: linux/arm/v7 }, + { description: Debian Buster (Generic AARCH64), platform: amlogic, architecture: linux/arm64 } + ] include: - - dockerImage: x86_64 - dockerName: Debian Buster (x86_64) - platform: x11 - - dockerImage: armv6l - dockerName: Debian Buster (Raspberry Pi v1 & ZERO) - platform: rpi - - dockerImage: armv7l - dockerName: Debian Buster (Raspberry Pi 2 & 3) - platform: rpi - - dockerImage: aarch64 - dockerName: Debian Buster (Generic AARCH64) - platform: amlogic + - distribution: debian + - codename: buster steps: - name: ⬇ Checkout @@ -49,12 +45,16 @@ jobs: echo -n "+PR${{ github.event.pull_request.number }}" >> .version echo '::endgroup::' + - name: 🛠️ Setup QEMU + uses: docker/setup-qemu-action@v3 + - name: 👷 Build env: - DOCKER_IMAGE: ${{ matrix.dockerImage }} - DOCKER_TAG: buster - DOCKER_NAME: ${{ matrix.dockerName }} - PLATFORM: ${{ matrix.platform }} + DOCKER_IMAGE: ${{ matrix.distribution }} + DOCKER_TAG: ${{ matrix.codename }} + DOCKER_NAME: ${{ matrix.os.description }} + PLATFORM: ${{ matrix.os.platform }} + ARCHITECTURE: ${{ matrix.os.architecture }} shell: bash run: | echo '::group::Build packages'