From c4002388aa6b44f8f29099527b6acf3783ff7fe9 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Thu, 11 Jul 2024 23:33:26 -0500 Subject: [PATCH] cache minimal then build full --- .github/workflows/nightly.yml | 52 +++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 90f7018..af733f1 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -8,15 +8,21 @@ on: # concurrency: # group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }} # cancel-in-progress: true +permissions: + contents: write jobs: - build: + build-minimal: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - - uses: ./.github/actions/clean-disk + - name: Setup Git Bot + run: | + git --version + git config user.name 'github-actions[bot]' + git config user.email 'github-actions[bot]@users.noreply.github.com' - uses: DeterminateSystems/nix-installer-action@v12 with: @@ -32,7 +38,8 @@ jobs: - name: Update nix flake run: - nix flake update >> $GITHUB_STEP_SUMMARY + git checkout -B flake-lock + nix flake update --commit-lock-file 2>> $GITHUB_STEP_SUMMARY - name: Build run: | @@ -45,3 +52,42 @@ jobs: --debug \ -- \ --print-build-logs + + - name: Commit Updates + run: git push + + build-full: + needs: build-minimal + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Git Bot + run: | + git --version + git config user.name 'github-actions[bot]' + git config user.email 'github-actions[bot]@users.noreply.github.com' + + - uses: DeterminateSystems/nix-installer-action@v12 + with: + extra-conf: | + accept-flake-config = true + + - uses: DeterminateSystems/magic-nix-cache-action@v7 + + - uses: ./.github/actions/clean-disk + with: + purge-packages: 'true' + + - name: Build + run: | + nix run . \ + -- \ + build \ + --host "othalan" \ + --flake . \ + --verbose \ + --debug \ + -- \ + --print-build-logs