Skip to content

Commit

Permalink
CI/Nix: build with submodules
Browse files Browse the repository at this point in the history
- Clone repo recursively
- Update Nix install action
- Remove wlroots update
  • Loading branch information
fufexan committed May 4, 2024
1 parent 9c34fc3 commit ccd8511
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 39 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/nix-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
7 changes: 3 additions & 4 deletions .github/workflows/nix-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 4 additions & 7 deletions .github/workflows/nix-update-inputs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Nix

on:
schedule:
- cron: '0 0 * * *' # check daily
workflow_call:
secrets:
PAT:
required: true

jobs:
update:
Expand All @@ -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
26 changes: 0 additions & 26 deletions .github/workflows/nix-update-wlroots.yml

This file was deleted.

0 comments on commit ccd8511

Please sign in to comment.