From acb263368a28caf307cdfad1abe93f03bc37280f Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 1 Apr 2026 20:51:22 +0500 Subject: [PATCH] ci: try to use github arm64 runner --- .github/workflows/c-cpp.yml | 3 +-- scripts/gha/build_linux.sh | 4 +++- scripts/gha/deps_linux.sh | 10 ++++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index e83b8498..7a6906b4 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -21,10 +21,9 @@ jobs: - os: ubuntu-22.04 targetos: linux targetarch: i386 - - os: ubuntu-22.04 + - os: ubuntu-22.04-arm targetos: linux targetarch: arm64 - cross: true - os: ubuntu-22.04 targetos: linux targetarch: armhf diff --git a/scripts/gha/build_linux.sh b/scripts/gha/build_linux.sh index 1b0ce9ad..48c126d1 100755 --- a/scripts/gha/build_linux.sh +++ b/scripts/gha/build_linux.sh @@ -17,10 +17,12 @@ ARCH_TRIPLET[armhf]=arm-linux-gnueabihf ARCH_TRIPLET[riscv64]=riscv64-linux-gnu ARCH_TRIPLET[ppc64el]=powerpc64le-linux-gnu CROSS_COMPILE_CC[amd64]=cc +CROSS_COMPILE_CC[arm64]=cc CROSS_COMPILE_CC[i386]="cc -m32" CROSS_COMPILE_CXX[amd64]=c++ +CROSS_COMPILE_CXX[arm64]=c++ CROSS_COMPILE_CXX[i386]="c++ -m32" -for i in arm64 armhf riscv64 ppc64el; do +for i in armhf riscv64 ppc64el; do CROSS_COMPILE_CC[$i]=${ARCH_TRIPLET[$i]}-gcc CROSS_COMPILE_CXX[$i]=${ARCH_TRIPLET[$i]}-g++ done diff --git a/scripts/gha/deps_linux.sh b/scripts/gha/deps_linux.sh index bcdb46fe..72c143c2 100755 --- a/scripts/gha/deps_linux.sh +++ b/scripts/gha/deps_linux.sh @@ -17,7 +17,8 @@ declare -A BASE_BUILD_PACKAGES SDL_BUILD_PACKAGES APPIMAGETOOL RUST_TARGET BASE_BUILD_PACKAGES[common]="desktop-file-utils" BASE_BUILD_PACKAGES[amd64]="build-essential" BASE_BUILD_PACKAGES[i386]="gcc-multilib g++-multilib" -BASE_BUILD_PACKAGES[arm64]="crossbuild-essential-arm64" +#BASE_BUILD_PACKAGES[arm64]="crossbuild-essential-arm64" +BASE_BUILD_PACKAGES[arm64]="build-essential" BASE_BUILD_PACKAGES[armhf]="crossbuild-essential-armhf" BASE_BUILD_PACKAGES[riscv64]="crossbuild-essential-riscv64" BASE_BUILD_PACKAGES[ppc64el]="crossbuild-essential-ppc64el" @@ -33,17 +34,18 @@ SDL_BUILD_PACKAGES[amd64]="libasound2-dev libpulse-dev \ libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \ libegl1-mesa-dev libdbus-1-dev libudev-dev" SDL_BUILD_PACKAGES[i386]="${SDL_BUILD_PACKAGES[amd64]//-dev/-dev:i386} libjack0:i386" # test -SDL_BUILD_PACKAGES[arm64]=${SDL_BUILD_PACKAGES[amd64]//-dev/-dev:arm64} +#SDL_BUILD_PACKAGES[arm64]=${SDL_BUILD_PACKAGES[amd64]//-dev/-dev:arm64} +SDL_BUILD_PACKAGES[arm64]=${SDL_BUILD_PACKAGES[amd64]} SDL_BUILD_PACKAGES[armhf]=${SDL_BUILD_PACKAGES[amd64]//-dev/-dev:armhf} SDL_BUILD_PACKAGES[riscv64]=${SDL_BUILD_PACKAGES[amd64]//-dev/-dev:riscv64} SDL_BUILD_PACKAGES[ppc64el]=${SDL_BUILD_PACKAGES[amd64]//-dev/-dev:ppc64el} APPIMAGETOOL[amd64]=https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage APPIMAGETOOL[i386]=https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-i686.AppImage +APPIMAGETOOL[arm64]=https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-aarch64.AppImage # can't run AppImageTool yet because it's compiled for these platforms natively and don't support cross compilation yet # uncomment when we will enable qemu-user for tests -# APPIMAGETOOL[arm64]=https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-aarch64.AppImage # APPIMAGETOOL[armhf]=https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-armhf.AppImage RUST_TARGET[amd64]=x86_64-unknown-linux-gnu @@ -67,7 +69,7 @@ regenerate_sources_list() done } -if [ "$GH_CPU_ARCH" != "amd64" ] && [ -n "$GH_CPU_ARCH" ]; then +if [ "$GH_CPU_ARCH" != "amd64" ] && [ "$GH_CPU_ARCH" != "arm64" ] && [ -n "$GH_CPU_ARCH" ]; then if [ "$GH_CPU_ARCH" != "i386" ]; then regenerate_sources_list fi