From 4ac4588e18a29bff5e856bbb09681fe7b9f8bdd9 Mon Sep 17 00:00:00 2001 From: hwsmm Date: Sun, 26 Jan 2025 02:09:44 +0900 Subject: [PATCH 1/3] Use Ubuntu 20.04 ARM and make apt noninteractive --- .github/workflows/build.yml | 4 ++-- External/build.sh | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8050585..e916a67 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,8 +19,8 @@ jobs: - { name: win-arm64, os: windows-latest, flags: -A ARM64 } - { name: linux-x64, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":amd64" } - { name: linux-x86, os: ubuntu-20.04, flags: -GNinja -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32", target_apt_arch: ":i386" } - - { name: linux-arm64, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":arm64", container: arm64v8/ubuntu, docker_platform: linux/arm64/v8 } - - { name: linux-arm, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":armhf", container: arm32v7/ubuntu, docker_platform: linux/arm/v7 } + - { name: linux-arm64, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":arm64", container: "arm64v8/ubuntu:20.04", docker_platform: linux/arm64/v8 } + - { name: linux-arm, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":armhf", container: "arm32v7/ubuntu:20.04", docker_platform: linux/arm/v7 } - { name: osx-x64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 } # NOTE: macOS 11.0 is the first released supported by Apple Silicon. - { name: osx-arm64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 } diff --git a/External/build.sh b/External/build.sh index babfb95..637476d 100755 --- a/External/build.sh +++ b/External/build.sh @@ -12,6 +12,8 @@ fi SUDO=$(which sudo || exit 0) +export DEBIAN_FRONTEND=noninteractive + if [[ $RUNNER_OS == 'Linux' ]]; then # Setup Linux dependencies if [[ $TARGET_APT_ARCH == :i386 ]]; then From 10972ff2222a70eec5e87ec07bf125d319b036a9 Mon Sep 17 00:00:00 2001 From: hwsmm Date: Sun, 26 Jan 2025 02:33:08 +0900 Subject: [PATCH 2/3] Try ARM runners --- .github/workflows/build.yml | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e916a67..8565188 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,27 +14,23 @@ jobs: fail-fast: false matrix: platform: - - { name: win-x64, os: windows-latest, flags: -A x64 } - - { name: win-x86, os: windows-latest, flags: -A Win32 } - - { name: win-arm64, os: windows-latest, flags: -A ARM64 } - - { name: linux-x64, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":amd64" } - - { name: linux-x86, os: ubuntu-20.04, flags: -GNinja -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32", target_apt_arch: ":i386" } - - { name: linux-arm64, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":arm64", container: "arm64v8/ubuntu:20.04", docker_platform: linux/arm64/v8 } - - { name: linux-arm, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":armhf", container: "arm32v7/ubuntu:20.04", docker_platform: linux/arm/v7 } - - { name: osx-x64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 } + - { name: win-x64, os: windows-latest, flags: -A x64 } + - { name: win-x86, os: windows-latest, flags: -A Win32 } + - { name: win-arm64, os: windows-latest, flags: -A ARM64 } + - { name: linux-x64, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":amd64" } + - { name: linux-x86, os: ubuntu-20.04, flags: -GNinja -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32", target_apt_arch: ":i386" } + - { name: linux-arm64, os: ubuntu-22.04-arm, flags: -GNinja, target_apt_arch: ":arm64", container: "arm64v8/ubuntu:20.04" } + - { name: linux-arm, os: ubuntu-22.04-arm, flags: -GNinja, target_apt_arch: ":armhf", container: "arm32v7/ubuntu:20.04" } + - { name: osx-x64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 } # NOTE: macOS 11.0 is the first released supported by Apple Silicon. - - { name: osx-arm64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 } + - { name: osx-arm64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 } steps: - uses: actions/checkout@v4 with: submodules: true - - name: Set up QEMU - if: contains(matrix.platform.container, 'arm') - uses: docker/setup-qemu-action@v3 - - name: Build (Linux ARM) - if: contains(matrix.platform.container, 'arm') + if: contains(matrix.platform.target_apt_arch, 'arm') uses: addnab/docker-run-action@v3 with: image: ${{ matrix.platform.container }} @@ -45,7 +41,6 @@ jobs: -e RUNNER_OS=${{ runner.os }} -e FLAGS=${{ matrix.platform.flags }} -e BUILD_TYPE=${{ env.BUILD_TYPE }} - --platform ${{ matrix.platform.docker_platform }} run: | cd /workspace ./External/build.sh From 5f4ba18c0d78b2889a09e664ce9a26ab54f1e4a5 Mon Sep 17 00:00:00 2001 From: hwsmm <9151706+hwsmm@users.noreply.github.com> Date: Sun, 26 Jan 2025 02:50:00 +0900 Subject: [PATCH 3/3] Apply suggestion Co-authored-by: Susko3 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8565188..0f91fbd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,7 @@ jobs: submodules: true - name: Build (Linux ARM) - if: contains(matrix.platform.target_apt_arch, 'arm') + if: contains(matrix.platform.container, 'arm') uses: addnab/docker-run-action@v3 with: image: ${{ matrix.platform.container }}