-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (33 loc) · 1.11 KB
/
build_binary.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
name: Build binary
on: [push, pull_request]
jobs:
make_build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
golang: [1.17, 1.18, 1.19]
fail-fast: true
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.golang }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Build and test with Make
run: |
make ci-build platform="${{ runner.os }}"
make test
- name: Tar the artifacts
run: tar -cvf ${{ format('bin/federator-{0}-{1}.tar', runner.os, matrix.golang) }} ${{ format('bin/federator-{0}', runner.os) }}
- name: Upload artifacts for the functional tests workflow
uses: actions/upload-artifact@v3
with:
name: ${{ format('federator-{0}-{1}', runner.os, matrix.golang) }}
path: ${{ format('bin/federator-{0}-{1}.tar', runner.os, matrix.golang) }}