workflows: use ARM runners

ARM runners are supposed to be more energy efficient than x86. Also,
from limited testing, they appear to be faster for the eval jobs as
well. Average run time for the "Outpaths (x86_64-linux)" job was 4m 27s,
so far. In the first run, this job came in at 3m 9s. This effect did not
show for other jobs, yet.

The following two exceptions are made right now:
- nixpkgs-lib-tests currently fails on the ARM runner building Nix 2.3
- nixpkgs-vet is currently pinned to a x86_64-linux only binary release
This commit is contained in:
Wolfgang Walther 2025-05-10 13:17:43 +02:00
parent 797c149b3e
commit d3e4865b10
No known key found for this signature in database
GPG key ID: B39893FA5F65CAE1
12 changed files with 20 additions and 20 deletions

View file

@ -15,7 +15,7 @@ jobs:
backport: backport:
name: Backport Pull Request name: Backport Pull Request
if: github.repository_owner == 'NixOS' && github.event.pull_request.merged == true && (github.event.action != 'labeled' || startsWith(github.event.label.name, 'backport')) if: github.repository_owner == 'NixOS' && github.event.pull_request.merged == true && (github.event.action != 'labeled' || startsWith(github.event.label.name, 'backport'))
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04-arm
steps: steps:
# Use a GitHub App to create the PR so that CI gets triggered # Use a GitHub App to create the PR so that CI gets triggered
# The App is scoped to Repository > Contents and Pull Requests: write for Nixpkgs # The App is scoped to Repository > Contents and Pull Requests: write for Nixpkgs

View file

@ -12,7 +12,7 @@ permissions: {}
jobs: jobs:
check: check:
name: cherry-pick-check name: cherry-pick-check
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04-arm
if: github.repository_owner == 'NixOS' if: github.repository_owner == 'NixOS'
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

View file

@ -12,7 +12,7 @@ jobs:
nixos: nixos:
name: fmt-check name: fmt-check
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04-arm
needs: get-merge-commit needs: get-merge-commit
if: needs.get-merge-commit.outputs.mergedSha if: needs.get-merge-commit.outputs.mergedSha
steps: steps:

View file

@ -41,7 +41,7 @@ jobs:
# Check that code owners is valid # Check that code owners is valid
check: check:
name: Check name: Check
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04-arm
needs: get-merge-commit needs: get-merge-commit
if: github.repository_owner == 'NixOS' && needs.get-merge-commit.outputs.mergedSha if: github.repository_owner == 'NixOS' && needs.get-merge-commit.outputs.mergedSha
steps: steps:
@ -89,7 +89,7 @@ jobs:
# Request reviews from code owners # Request reviews from code owners
request: request:
name: Request name: Request
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04-arm
if: github.repository_owner == 'NixOS' if: github.repository_owner == 'NixOS'
steps: steps:
- uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31 - uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31

View file

@ -11,7 +11,7 @@ jobs:
eval-aliases: eval-aliases:
name: Eval nixpkgs with aliases enabled name: Eval nixpkgs with aliases enabled
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04-arm
needs: [ get-merge-commit ] needs: [ get-merge-commit ]
steps: steps:
- name: Check out the PR at the test merge commit - name: Check out the PR at the test merge commit

View file

@ -21,7 +21,7 @@ jobs:
attrs: attrs:
name: Attributes name: Attributes
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04-arm
needs: get-merge-commit needs: get-merge-commit
if: needs.get-merge-commit.outputs.mergedSha if: needs.get-merge-commit.outputs.mergedSha
outputs: outputs:
@ -61,7 +61,7 @@ jobs:
outpaths: outpaths:
name: Outpaths name: Outpaths
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04-arm
needs: [ attrs, get-merge-commit ] needs: [ attrs, get-merge-commit ]
strategy: strategy:
fail-fast: false fail-fast: false
@ -70,10 +70,10 @@ jobs:
steps: steps:
- name: Enable swap - name: Enable swap
run: | run: |
sudo fallocate -l 10G /swapfile sudo fallocate -l 10G /swap
sudo chmod 600 /swapfile sudo chmod 600 /swap
sudo mkswap /swapfile sudo mkswap /swap
sudo swapon /swapfile sudo swapon /swap
- name: Download the list of all attributes - name: Download the list of all attributes
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
@ -110,7 +110,7 @@ jobs:
process: process:
name: Process name: Process
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04-arm
needs: [ outpaths, attrs, get-merge-commit ] needs: [ outpaths, attrs, get-merge-commit ]
outputs: outputs:
targetRunId: ${{ steps.targetRunId.outputs.targetRunId }} targetRunId: ${{ steps.targetRunId.outputs.targetRunId }}
@ -212,7 +212,7 @@ jobs:
# Separate job to have a very tightly scoped PR write token # Separate job to have a very tightly scoped PR write token
tag: tag:
name: Tag name: Tag
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04-arm
needs: [ attrs, process ] needs: [ attrs, process ]
if: needs.process.outputs.targetRunId if: needs.process.outputs.targetRunId
permissions: permissions:

View file

@ -11,7 +11,7 @@ permissions: {}
jobs: jobs:
resolve-merge-commit: resolve-merge-commit:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04-arm
outputs: outputs:
mergedSha: ${{ steps.merged.outputs.mergedSha }} mergedSha: ${{ steps.merged.outputs.mergedSha }}
steps: steps:

View file

@ -16,7 +16,7 @@ permissions:
jobs: jobs:
labels: labels:
name: label-pr name: label-pr
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04-arm
if: "github.repository_owner == 'NixOS' && !contains(github.event.pull_request.title, '[skip treewide]')" if: "github.repository_owner == 'NixOS' && !contains(github.event.pull_request.title, '[skip treewide]')"
steps: steps:
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0 - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0

View file

@ -14,7 +14,7 @@ permissions: {}
jobs: jobs:
nixpkgs: nixpkgs:
name: nixpkgs-manual-build name: nixpkgs-manual-build
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04-arm
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:

View file

@ -11,7 +11,7 @@ jobs:
tests: tests:
name: nix-files-parseable-check name: nix-files-parseable-check
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04-arm
needs: get-merge-commit needs: get-merge-commit
if: "needs.get-merge-commit.outputs.mergedSha && !contains(github.event.pull_request.title, '[skip treewide]')" if: "needs.get-merge-commit.outputs.mergedSha && !contains(github.event.pull_request.title, '[skip treewide]')"
steps: steps:

View file

@ -13,7 +13,7 @@ jobs:
startsWith(github.event.pull_request.base.ref, 'nixos-') || startsWith(github.event.pull_request.base.ref, 'nixos-') ||
startsWith(github.event.pull_request.base.ref, 'nixpkgs-') startsWith(github.event.pull_request.base.ref, 'nixpkgs-')
name: "This PR is targeting a channel branch" name: "This PR is targeting a channel branch"
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04-arm
steps: steps:
- run: | - run: |
cat <<EOF cat <<EOF

View file

@ -14,7 +14,7 @@ on:
jobs: jobs:
merge: merge:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04-arm
name: ${{ inputs.from }} → ${{ inputs.into }} name: ${{ inputs.from }} → ${{ inputs.into }}
steps: steps:
# Use a GitHub App to create the PR so that CI gets triggered # Use a GitHub App to create the PR so that CI gets triggered