From 861731dcf0ee5b5033d37f96c58a0d775e23cf07 Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Sun, 23 Mar 2025 18:08:53 +0530 Subject: [PATCH] workflows/manual-nixos-v2: use a matrix to build on different systems So apparently we have to build the manual on hostPlatform. Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com> --- .github/workflows/manual-nixos-v2.yml | 31 +++++++++++++-------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/manual-nixos-v2.yml b/.github/workflows/manual-nixos-v2.yml index e7d3057f656f..38c32e280075 100644 --- a/.github/workflows/manual-nixos-v2.yml +++ b/.github/workflows/manual-nixos-v2.yml @@ -19,7 +19,15 @@ permissions: {} jobs: nixos: name: nixos-manual-build - runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + system: + - x86_64-linux + - aarch64-linux + runs-on: >- + ${{ (matrix.system == 'x86_64-linux' && 'ubuntu-24.04') + || (matrix.system == 'aarch64-linux' && 'ubuntu-24.04-arm') }} steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -36,22 +44,13 @@ jobs: name: nixpkgs-ci authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" - - name: Building NixOS manual - run: | - export NIX_PATH=nixpkgs=$(pwd) - nix-build --option restrict-eval true nixos/release.nix -A manual.x86_64-linux -o result-x86_64-linux - nix-build --option restrict-eval true nixos/release.nix -A manual.aarch64-linux -o result-aarch64-linux + - name: Build NixOS manual + id: build-manual + run: NIX_PATH=nixpkgs=$(pwd) nix-build --option restrict-eval true nixos/release.nix -A manual.${{ matrix.system }} - - name: Upload NixOS manual for x86_64 + - name: Upload NixOS manual uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 with: - name: nixos-manual-x86_64-linux - path: result-x86_64-linux - if-no-files-found: error - - - name: Upload NixOS manual for aarch64 - uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 - with: - name: nixos-manual-aarch64-linux - path: result-aarch64-linux + name: nixos-manual-${{ matrix.system }} + path: result/ if-no-files-found: error