mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-08 01:04:06 +01:00
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6.0.0 to 7.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](b7c566a772...bbbca2ddaa)
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-version: 7.0.0
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
110 lines
3.9 KiB
YAML
110 lines
3.9 KiB
YAML
name: Build
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
artifact-prefix:
|
|
required: true
|
|
type: string
|
|
baseBranch:
|
|
required: true
|
|
type: string
|
|
mergedSha:
|
|
required: true
|
|
type: string
|
|
targetSha:
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
# Should only be provided in the merge queue, not in pull requests,
|
|
# where we're evaluating untrusted code.
|
|
CACHIX_AUTH_TOKEN_GHA:
|
|
required: false
|
|
|
|
permissions: {}
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- runner: ubuntu-24.04
|
|
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
|
|
name: aarch64-linux
|
|
systems: aarch64-linux
|
|
builds: [shell, manual-nixos, manual-nixpkgs]
|
|
desc: shell, docs
|
|
- runner: macos-14
|
|
name: darwin
|
|
systems: aarch64-darwin x86_64-darwin
|
|
builds: [shell]
|
|
desc: shell
|
|
name: '${{ matrix.name }}: ${{ matrix.desc }}'
|
|
runs-on: ${{ matrix.runner }}
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
sparse-checkout: .github/actions
|
|
- name: Checkout the merge commit
|
|
uses: ./.github/actions/checkout
|
|
with:
|
|
merged-as-untrusted-at: ${{ inputs.mergedSha }}
|
|
target-as-trusted-at: ${{ inputs.targetSha }}
|
|
|
|
- uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1
|
|
with:
|
|
# Sandbox is disabled on MacOS by default.
|
|
extra_nix_config: sandbox = true
|
|
|
|
- uses: cachix/cachix-action@3ba601ff5bbb07c7220846facfa2cd81eeee15a1 # v16
|
|
continue-on-error: true
|
|
with:
|
|
# The nixpkgs-gha cache should not be trusted or used outside of Nixpkgs and its forks' CI.
|
|
name: ${{ vars.CACHIX_NAME || 'nixpkgs-gha' }}
|
|
extraPullNames: nixpkgs-gha
|
|
authToken: ${{ secrets.CACHIX_AUTH_TOKEN_GHA }}
|
|
pushFilter: '(-source$|-nixpkgs-tarball-)'
|
|
|
|
- run: nix-env --install -f nixpkgs/trusted-pinned -A nix-build-uncached
|
|
|
|
- name: Build shell
|
|
if: contains(matrix.builds, 'shell')
|
|
run: echo "${{ matrix.systems }}" | xargs -n1 nix-build-uncached nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-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 nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A manual-nixos --out-link nixos-manual
|
|
|
|
- name: Build Nixpkgs manual
|
|
if: contains(matrix.builds, 'manual-nixpkgs') && !cancelled()
|
|
run: nix-build-uncached nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A manual-nixpkgs
|
|
|
|
- name: Build lib tests
|
|
if: contains(matrix.builds, 'lib-tests') && !cancelled()
|
|
run: nix-build-uncached nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A lib-tests
|
|
|
|
- name: Build tarball
|
|
if: contains(matrix.builds, 'tarball') && !cancelled()
|
|
run: nix-build-uncached nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A tarball
|
|
|
|
- name: Upload NixOS manual
|
|
if: |
|
|
contains(matrix.builds, 'manual-nixos') && !cancelled() &&
|
|
contains(fromJSON(inputs.baseBranch).type, 'primary')
|
|
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
|
with:
|
|
name: ${{ inputs.artifact-prefix }}nixos-manual-${{ matrix.name }}
|
|
path: nixos-manual
|