cache minimal then build full

This commit is contained in:
Daylin Morgan 2024-07-11 23:33:26 -05:00
parent 0c172affc5
commit c4002388aa
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -8,15 +8,21 @@ on:
# concurrency: # concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }} # group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }}
# cancel-in-progress: true # cancel-in-progress: true
permissions:
contents: write
jobs: jobs:
build: build-minimal:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 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 - uses: DeterminateSystems/nix-installer-action@v12
with: with:
@ -32,7 +38,8 @@ jobs:
- name: Update nix flake - name: Update nix flake
run: run:
nix flake update >> $GITHUB_STEP_SUMMARY git checkout -B flake-lock
nix flake update --commit-lock-file 2>> $GITHUB_STEP_SUMMARY
- name: Build - name: Build
run: | run: |
@ -45,3 +52,42 @@ jobs:
--debug \ --debug \
-- \ -- \
--print-build-logs --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