CI/Nix: build with submodules

- Clone repo recursively
- Update Nix install action
- Remove wlroots update
This commit is contained in:
Mihai Fufezan 2024-04-21 20:13:59 +03:00
parent f15513309b
commit 589f758d94
4 changed files with 10 additions and 39 deletions

View File

@ -18,12 +18,13 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
ref: ${{ github.ref }} ref: ${{ github.ref }}
submodules: recursive
- uses: cachix/install-nix-action@v25 - uses: cachix/install-nix-action@v26
- uses: DeterminateSystems/magic-nix-cache-action@main - uses: DeterminateSystems/magic-nix-cache-action@main
- uses: cachix/cachix-action@v12 - uses: cachix/cachix-action@v12
with: with:
name: hyprland name: hyprland
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build .#${{ matrix.package }} --extra-substituters "https://hyprland.cachix.org" -L - run: nix build '.?submodules=1#${{ matrix.package }}' -L --extra-substituters "https://hyprland.cachix.org"

View File

@ -3,13 +3,12 @@ name: Nix
on: [push, pull_request, workflow_dispatch] on: [push, pull_request, workflow_dispatch]
jobs: jobs:
wlroots: update-inputs:
if: github.event_name != 'pull_request' uses: ./.github/workflows/nix-update-inputs.yml
uses: ./.github/workflows/nix-update-wlroots.yml
secrets: inherit secrets: inherit
build: build:
if: always() && !cancelled() && !contains(needs.*.result, 'failure') if: always() && !cancelled() && !contains(needs.*.result, 'failure')
needs: wlroots needs: update-inputs
uses: ./.github/workflows/nix-build.yml uses: ./.github/workflows/nix-build.yml
secrets: inherit secrets: inherit

View File

@ -1,8 +1,10 @@
name: Nix name: Nix
on: on:
schedule: workflow_call:
- cron: '0 0 * * *' # check daily secrets:
PAT:
required: true
jobs: jobs:
update: update:
@ -22,8 +24,3 @@ jobs:
uses: stefanzweifel/git-auto-commit-action@v4 uses: stefanzweifel/git-auto-commit-action@v4
with: with:
commit_message: "[gha] Nix: update inputs" commit_message: "[gha] Nix: update inputs"
update-build:
needs: update
uses: ./.github/workflows/nix-build.yml
secrets: inherit

View File

@ -1,26 +0,0 @@
name: Nix
on:
workflow_call:
secrets:
PAT:
required: true
jobs:
update:
name: wlroots
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
- uses: DeterminateSystems/nix-installer-action@main
- name: Update lockfile
run: nix/update-wlroots.sh
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "[gha] Nix: update wlroots"