mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
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/
(cherry picked from commit 56d29bbae1)
This commit is contained in:
committed by
github-actions[bot]
parent
fb86dcb57c
commit
52a04aef17
21
.github/workflows/build.yml
vendored
21
.github/workflows/build.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user