-
Notifications
You must be signed in to change notification settings - Fork 33
49 lines (41 loc) · 1.13 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
name: Funnel Build and Cache
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Check out code
uses: actions/checkout@v2
- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mod-
- name: Cache Funnel binary
uses: actions/cache@v3
with:
path: ./funnel # Path to the Funnel executable
key: ${{ runner.os }}-funnel-bin-${{ hashFiles('**/go.sum') }}
- name: Build Funnel (only if cache doesn't exist)
run: |
if [ ! -f ./funnel ]; then
make build
fi
- name: Cache Funnel binary (after build)
uses: actions/cache@v3
with:
path: funnel/
key: ${{ runner.os }}-funnel-bin-${{ hashFiles('**/go.sum') }}
- name: Upload Funnel binary as artifact (optional)
uses: actions/upload-artifact@v4
with:
name: funnelBin
path: funnel/