From 56d29bbae176e0ce3f5e60292c8fc31fa0aee1e5 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 10 Aug 2025 16:46:28 +0200 Subject: [PATCH] workflows/build: build shells on a single darwin runner only Because we have Rosetta, we can use a single darwin runner to build both shells. Most time is spent for downloading Nix and checking out Nixpkgs anyway and this can be saved if only run once. Also, this prepares for the deprecation of the old macos-13 runners, which were based on x86_64 CPUs in September 2025: https://github.blog/changelog/2025-07-11-upcoming-changes-to-macos-hosted-runners-macos-latest-migration-and-xcode-support-policy-updates/ --- .github/workflows/build.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d9d0a4fb09ca..ef3c71ca4fbe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,22 +26,21 @@ jobs: matrix: include: - runner: ubuntu-24.04 - system: x86_64-linux + name: x86_64-linux + systems: x86_64-linux builds: [shell, manual-nixos, lib-tests, tarball] desc: shell, docs, lib, tarball - runner: ubuntu-24.04-arm - system: aarch64-linux + name: aarch64-linux + systems: aarch64-linux builds: [shell, manual-nixos, manual-nixpkgs, manual-nixpkgs-tests] desc: shell, docs - - runner: macos-13 - system: x86_64-darwin - builds: [shell] - desc: shell - runner: macos-14 - system: aarch64-darwin + name: darwin + systems: aarch64-darwin x86_64-darwin builds: [shell] desc: shell - name: '${{ matrix.system }}: ${{ matrix.desc }}' + name: '${{ matrix.name }}: ${{ matrix.desc }}' runs-on: ${{ matrix.runner }} timeout-minutes: 60 steps: @@ -70,13 +69,13 @@ jobs: - name: Build shell if: contains(matrix.builds, 'shell') - run: nix-build-uncached untrusted/ci --arg nixpkgs ./pinned -A shell + run: echo "${{ matrix.systems }}" | xargs -n1 nix-build-uncached untrusted/ci --arg nixpkgs ./pinned -A shell --argstr system - name: Build NixOS manual if: | contains(matrix.builds, 'manual-nixos') && !cancelled() && contains(fromJSON(inputs.baseBranch).type, 'primary') - run: nix-build-uncached untrusted/ci --arg nixpkgs ./pinned -A manual-nixos --argstr system ${{ matrix.system }} --out-link nixos-manual + run: nix-build-uncached untrusted/ci --arg nixpkgs ./pinned -A manual-nixos --out-link nixos-manual - name: Build Nixpkgs manual if: contains(matrix.builds, 'manual-nixpkgs') && !cancelled() @@ -100,5 +99,5 @@ jobs: contains(fromJSON(inputs.baseBranch).type, 'primary') uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: - name: nixos-manual-${{ matrix.system }} + name: nixos-manual-${{ matrix.name }} path: nixos-manual