From 910092da729dafc02ef5bbc544763129c7957701 Mon Sep 17 00:00:00 2001 From: Christian Hoffmann Date: Sun, 20 Mar 2022 19:26:47 +0100 Subject: [PATCH 1/3] Autobuild: Add Linux .deb aarch64 (Raspberry) 64bit builds --- .github/autobuild/linux_deb.sh | 9 ++++++--- .github/workflows/autobuild.yml | 7 +++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/autobuild/linux_deb.sh b/.github/autobuild/linux_deb.sh index 8612963ed8..e2ac9e9829 100755 --- a/.github/autobuild/linux_deb.sh +++ b/.github/autobuild/linux_deb.sh @@ -14,6 +14,9 @@ case "${TARGET_ARCH}" in armhf) ABI_NAME="arm-linux-gnueabihf" ;; + arm64) + ABI_NAME="aarch64-linux-gnu" + ;; *) echo "Unsupported TARGET_ARCH ${TARGET_ARCH}" exit 1 @@ -50,10 +53,10 @@ setup_cross_compiler() { sudo update-alternatives --install "/usr/bin/${ABI_NAME}-g++" g++ "/usr/bin/${ABI_NAME}-g++-${GCC_VERSION}" 10 sudo update-alternatives --install "/usr/bin/${ABI_NAME}-gcc" gcc "/usr/bin/${ABI_NAME}-gcc-${GCC_VERSION}" 10 - if [[ "${TARGET_ARCH}" == armhf ]]; then - # Ubuntu's Qt version only ships a profile for gnueabi, but not for gnueabihf. Therefore, build a custom one: + # Ubuntu's Qt version only ships a profile for gnueabi, but not for gnueabihf or aarch64. Therefore, build a custom one: + if [[ $ABI_NAME ]]; then sudo cp -R "/usr/lib/${ABI_NAME}/qt5/mkspecs/linux-arm-gnueabi-g++/" "/usr/lib/${ABI_NAME}/qt5/mkspecs/${ABI_NAME}-g++/" - sudo sed -re 's/-gnueabi/-gnueabihf/' -i "/usr/lib/${ABI_NAME}/qt5/mkspecs/${ABI_NAME}-g++/qmake.conf" + sudo sed -re "s/arm-linux-gnueabi/${ABI_NAME}/" -i "/usr/lib/${ABI_NAME}/qt5/mkspecs/${ABI_NAME}-g++/qmake.conf" fi } diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index e58d331e78..69f25c2454 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -209,6 +209,13 @@ jobs: base_command: TARGET_ARCH=armhf ./.github/autobuild/linux_deb.sh run_codeql: false + - config_name: Linux .deb arm64 (artifacts) + target_os: linux + building_on_os: ubuntu-22.04 + building_container: ubuntu:18.04 + base_command: TARGET_ARCH=arm64 ./.github/autobuild/linux_deb.sh + run_codeql: false + - config_name: MacOS (artifacts) target_os: macos building_on_os: macos-12 From 481e930bf91a35a28a67828e616e1937008aae5c Mon Sep 17 00:00:00 2001 From: Christian Hoffmann Date: Mon, 3 Oct 2022 20:05:43 +0200 Subject: [PATCH 2/3] Autobuild: Clarify README regarding system modifications --- .github/autobuild/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/autobuild/README.md b/.github/autobuild/README.md index f6f8e4b7c2..94070bf8aa 100644 --- a/.github/autobuild/README.md +++ b/.github/autobuild/README.md @@ -4,4 +4,7 @@ The scripts in this folder are used by the Github autobuild actions in .github/w They are responsible for setting up the Github environment, building the binaries and passing the resulting artifacts back to the workflow. The scripts may work outside of Github, but haven't been designed or tested for that use case. +Some of the scripts modify global system settings, install software or create files in directories which are usually managed by package managers. +In short: They should probably only used in throw-away environments. + See the various platform-specific build scripts in their own folders for standalone builds (e.g. windows/deploy_windows.ps1). From 4b4770b024db7d13b420f64c84e52f127977d895 Mon Sep 17 00:00:00 2001 From: Christian Hoffmann Date: Wed, 5 Oct 2022 00:19:50 +0200 Subject: [PATCH 3/3] Autobuild: Add explanations for apt cross-compilation setup Related: https://github.com/jamulussoftware/jamulus/pull/2895/files#r987309259 --- .github/autobuild/linux_deb.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/autobuild/linux_deb.sh b/.github/autobuild/linux_deb.sh index e2ac9e9829..d14abcfe01 100755 --- a/.github/autobuild/linux_deb.sh +++ b/.github/autobuild/linux_deb.sh @@ -40,7 +40,9 @@ setup_cross_compilation_apt_sources() { return fi sudo dpkg --add-architecture "${TARGET_ARCH}" + # Duplicate the original Ubuntu sources and modify them to refer to the TARGET_ARCH: sed -rne "s|^deb.*/ ([^ -]+(-updates)?) main.*|deb [arch=${TARGET_ARCH}] http://ports.ubuntu.com/ubuntu-ports \1 main universe multiverse restricted|p" /etc/apt/sources.list | sudo dd of=/etc/apt/sources.list.d/"${TARGET_ARCH}".list + # Now take the original Ubuntu sources and limit those to the build host (i.e. non-TARGET_ARCH) architectures: sudo sed -re 's/^deb /deb [arch=amd64,i386] /' -i /etc/apt/sources.list }