From de01cc37264711fa9914ce02db1d583d10c1970f Mon Sep 17 00:00:00 2001 From: Jan Baudisch Date: Thu, 15 Aug 2024 12:28:00 +0200 Subject: [PATCH] feat(ci): use binfmt for aarch64 --- .github/workflows/CI.yaml | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index d6ff9d13..6daffecc 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -9,38 +9,37 @@ jobs: fail-fast: false matrix: target: - - double: x86_64-linux # target we are building for - system: x86_64-linux # host system the build is running on - runner: ubuntu-24.04 # GitHub runner the build is running on - flake: bundled # flake part to build - - double: aarch64-linux - system: aarch64-linux + - double: aarch64-linux # target we are building for + emulated: true # whether this build host is being emulated + runner: ubuntu-24.04 # GitHub runner the build is running on + flake: packages.aarch64-linux.bundled # flake part to build + - double: x86_64-linux runner: ubuntu-24.04 flake: bundled - - double: x86_64-darwin - system: x86_64-darwin - runner: macos-13 - flake: bundled - double: aarch64-darwin - system: aarch64-darwin runner: macos-latest flake: bundled + - double: x86_64-darwin + runner: macos-13 + flake: bundled - double: x86_64-windows - system: x86_64-linux runner: ubuntu-24.04 flake: bundled-windows runs-on: ${{ matrix.target.runner }} steps: - name: Checkout uses: actions/checkout@v4 - # aarch64-linux builds are emulated on x86_64-linux. - name: QEMU - if: ${{ matrix.target.double == 'aarch64-linux' }} - run: sudo apt-get install -y qemu-user-static + if: ${{ matrix.target.emulated }} + run: sudo apt-get install -y qemu-user-static binfmt-support - name: Nix + if: ${{ !matrix.target.emulated }} + uses: DeterminateSystems/nix-installer-action@v10 + - name: Nix (emulated) + if: ${{ matrix.target.emulated }} uses: DeterminateSystems/nix-installer-action@v10 with: - extra-conf: system = ${{ matrix.target.system }} + extra-conf: extra-platforms = ${{ matrix.target.double }} - name: Cache uses: DeterminateSystems/magic-nix-cache-action@v4 - name: Build