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
with:
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: cachix/cachix-action@v12
with:
name: hyprland
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]
jobs:
wlroots:
if: github.event_name != 'pull_request'
uses: ./.github/workflows/nix-update-wlroots.yml
update-inputs:
uses: ./.github/workflows/nix-update-inputs.yml
secrets: inherit
build:
if: always() && !cancelled() && !contains(needs.*.result, 'failure')
needs: wlroots
needs: update-inputs
uses: ./.github/workflows/nix-build.yml
secrets: inherit

View File

@ -1,8 +1,10 @@
name: Nix
on:
schedule:
- cron: '0 0 * * *' # check daily
workflow_call:
secrets:
PAT:
required: true
jobs:
update:
@ -22,8 +24,3 @@ jobs:
uses: stefanzweifel/git-auto-commit-action@v4
with:
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"