-
Notifications
You must be signed in to change notification settings - Fork 125
60 lines (58 loc) · 1.63 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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: ubuntu-cpu16-ram64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- 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:
runs-on: ubuntu-cpu16-ram64
steps:
- uses: actions/checkout@v4
- uses: haqq-network/nix-action@master
with:
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
cacheKeyPostfix: ${{ hashFiles('**/go.sum') }}
- name: Build nix package
run: |
nix build .#haqq --print-build-logs
check-nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: haqq-network/nix-action@master
with:
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
cacheKeyPostfix: ${{ hashFiles('**/go.sum') }}
- 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