mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-02 09:46:00 +01:00
CI/Nix: build with submodules
- Clone repo recursively - Update Nix install action - Remove wlroots update
This commit is contained in:
parent
f15513309b
commit
589f758d94
4 changed files with 10 additions and 39 deletions
5
.github/workflows/nix-build.yml
vendored
5
.github/workflows/nix-build.yml
vendored
|
@ -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"
|
||||||
|
|
7
.github/workflows/nix-ci.yml
vendored
7
.github/workflows/nix-ci.yml
vendored
|
@ -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
|
||||||
|
|
11
.github/workflows/nix-update-inputs.yml
vendored
11
.github/workflows/nix-update-inputs.yml
vendored
|
@ -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
|
|
||||||
|
|
26
.github/workflows/nix-update-wlroots.yml
vendored
26
.github/workflows/nix-update-wlroots.yml
vendored
|
@ -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"
|
|
Loading…
Reference in a new issue