build(nix): add haqq flake app; add l5, allnodes and p2p seeds; prepare flake for nixos-search; self-hosted runners #721
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
cleanup-runs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: rokroskar/workflow-run-cleanup-action@master | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" | |
build: | |
runs-on: [self-hosted debian] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.20' | |
- uses: technote-space/get-diff-action@v5 | |
id: git_diff | |
with: | |
SUFFIX_FILTER: | | |
.go | |
.mod | |
.sum | |
- name: Pull LFS files | |
run: git lfs pull | |
- run: | | |
make build | |
if: "env.GIT_DIFF != ''" | |
build-nix: | |
strategy: | |
matrix: | |
# os: [nixos, macos-latest] | |
os: [nixos] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
# - uses: haqq-network/nix-action@master | |
# with: | |
# installNix: false | |
# signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' | |
- name: Build nix package | |
env: | |
CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }} | |
run: | | |
cachix watch-exec haqq -- nix build .#haqq --print-build-logs | |
check-nix: | |
runs-on: self-hosted nixos | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check if nix package and Makefile versions match | |
run: | | |
nix develop --impure .#ci --command ci-check-version | |
- name: Check if gomod2nix is up to date | |
run: | | |
nix develop --impure .#ci --command ci-check-gomod2nix | |
- name: Check nixos-search validity | |
run: | | |
nix run nixos-search -- --json flake . |