1- name : " Build NixOS manual v2 "
1+ name : Build
22
33on :
44 pull_request :
55 paths :
6- - .github/workflows/manual-nixos-v2 .yml
6+ - .github/workflows/build .yml
77 pull_request_target :
8- branches :
9- - master
10- - release-*
11- paths :
12- - " nixos/**"
13- # Also build when the nixpkgs doc changed, since we take things like
14- # the release notes and some css and js files from there.
15- # See nixos/doc/manual/default.nix
16- - " doc/**"
17- # Build when something in lib changes
18- # Since the lib functions are used to 'massage' the options before producing the manual
19- - " lib/**"
208
219concurrency :
2210 group : ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
@@ -29,16 +17,24 @@ defaults:
2917 shell : bash
3018
3119jobs :
32- nixos :
33- name : nixos-manual-build
20+ build :
3421 strategy :
3522 fail-fast : false
3623 matrix :
3724 include :
3825 - runner : ubuntu-24.04
3926 system : x86_64-linux
27+ builds : [shell,manual-nixos,lib-tests]
4028 - runner : ubuntu-24.04-arm
4129 system : aarch64-linux
30+ builds : [shell,manual-nixos,manual-nixpkgs,manual-nixpkgs-tests]
31+ - runner : macos-13
32+ system : x86_64-darwin
33+ builds : [shell]
34+ - runner : macos-14
35+ system : aarch64-darwin
36+ builds : [shell]
37+ name : ${{ matrix.system }}
4238 runs-on : ${{ matrix.runner }}
4339 steps :
4440 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -59,13 +55,34 @@ jobs:
5955 name : nixpkgs-ci
6056 authToken : " ${{ secrets.CACHIX_AUTH_TOKEN }}"
6157
58+ - name : Build shell
59+ if : contains(matrix.builds, 'shell')
60+ run : nix-build untrusted/ci -A shell
61+
6262 - name : Build NixOS manual
63- id : build-manual
64- run : nix-build untrusted/ci -A manual-nixos --argstr system ${{ matrix.system }}
63+ if : |
64+ contains(matrix.builds, 'manual-nixos') && !cancelled() &&
65+ (github.base_ref == 'master' || startsWith(github.base_ref, 'release-'))
66+ run : nix-build untrusted/ci -A manual-nixos --argstr system ${{ matrix.system }} --out-link nixos-manual
67+
68+ - name : Build Nixpkgs manual
69+ if : contains(matrix.builds, 'manual-nixpkgs') && !cancelled()
70+ run : nix-build untrusted/ci -A manual-nixpkgs -A manual-nixpkgs-tests
71+
72+ - name : Build Nixpkgs manual tests
73+ if : contains(matrix.builds, 'manual-nixpkgs-tests') && !cancelled()
74+ run : nix-build untrusted/ci -A manual-nixpkgs-tests
75+
76+ - name : Build lib tests
77+ if : contains(matrix.builds, 'lib-tests') && !cancelled()
78+ run : nix-build untrusted/ci -A lib-tests
6579
6680 - name : Upload NixOS manual
81+ if : |
82+ contains(matrix.builds, 'manual-nixos') && !cancelled() &&
83+ (github.base_ref == 'master' || startsWith(github.base_ref, 'release-'))
6784 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6885 with :
6986 name : nixos-manual-${{ matrix.system }}
70- path : result/
87+ path : nixos-manual
7188 if-no-files-found : error
0 commit comments