-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (53 loc) · 1.4 KB
/
build.yaml
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
name: Compile Application
on:
workflow_call:
inputs:
store_artifacts:
default: false
required: false
type: boolean
jobs:
compile:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [darwin, linux, windows]
arch: [arm64, amd64, "386", arm]
exclude:
- os: windows
arch: arm64
- os: darwin
arch: "386"
- os: darwin
arch: arm
- os: darwin
arch: arm64 # :( <-- this combo won't build right on an amd64 HOSTARCH because of the C compiler
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version-file: "go.mod"
- name: Cache
uses: actions/[email protected]
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-gomodules-${{ hashFiles('go.sum') }}
restore-keys: |
${{ runner.os }}-gomodules
${{ runner.os }}-
- name: Compile Application
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: |
make download
make
- name: Store Build
if: ${{ inputs.store_artifacts }}
uses: actions/upload-artifact@v3
with:
name: bridgr-${{ matrix.os }}-${{ matrix.arch }}
path: bridgr-*
retention-days: 1