From d1cd4900b45765623ca71a7d972eeb3e0937f108 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Tue, 18 Jun 2024 11:14:15 -0500 Subject: [PATCH] try system-path builder --- .github/workflows/build.yml | 6 ++++-- .github/workflows/checks.yml | 19 +++++++++++++------ .github/workflows/push.yml | 4 ++++ 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f9b834e..4b8c09f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,6 @@ on: default: 'othalan aligz' type: string - concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }} cancel-in-progress: true @@ -34,7 +33,10 @@ jobs: - uses: ./.github/actions/clean-disk - - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/nix-installer-action@v12 + with: + extra-conf: | + accept-flake-config = true - uses: DeterminateSystems/magic-nix-cache-action@v7 - uses: cachix/cachix-action@v15 diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 3174526..dc68234 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -8,12 +8,8 @@ on: description: 'flake.lock file' type: string -concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }} - cancel-in-progress: true - jobs: - build: + checks: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -23,6 +19,9 @@ jobs: purge-packages: false - uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + accept-flake-config = true - uses: DeterminateSystems/magic-nix-cache-action@v7 - uses: cachix/cachix-action@v15 @@ -38,4 +37,12 @@ jobs: - name: Build run: | - cachix watch-exec daylin -- nix build --accept-flake-config '.#checks.x86_64-linux.makePackages' + set -euo pipefail + # cachix watch-exec daylin -- nix build '.#checks.x86_64-linux.makePackages' + host=othalan + system_attr=$(nix run . -- output --host "$host" --flake .) + system_path=$(nix derivation show $system_attr | jq -r '.[].inputDrvs | with_entries(select(.key|match("system-path";"i"))) | keys | .[]') + + echo "path to system-path drv ==> $system_path" + cachix watch-exec daylin -- nix build --print-build-logs "$system_path^*" + diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1b381e2..cc83036 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -8,6 +8,10 @@ on: branches: - main +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }} + cancel-in-progress: true + jobs: checks: uses: ./.github/workflows/checks.yml