-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (36 loc) · 1.22 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
44
45
46
47
48
name: Build binary
on: [push, pull_request]
env:
GOLANG_VERSION: '1.23'
jobs:
make_build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
arch: ['amd64', 'arm64']
fail-fast: true
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOLANG_VERSION }}
cache: false
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Build and test with Make
run: |
make ci-build platform="${{ runner.os }}" arch="${{ matrix.arch }}"
make test
- name: Tar the artifacts
run: tar -cvf ${{ format('bin/federator-{0}-{1}.tar', runner.os, matrix.arch) }} ${{ format('bin/federator-{0}-{1}', runner.os, matrix.arch) }}
- name: Upload artifacts for the functional tests workflow
uses: actions/upload-artifact@v4
with:
name: ${{ format('federator-{0}-{1}', runner.os, matrix.arch) }}
path: ${{ format('bin/federator-{0}-{1}.tar', runner.os, matrix.arch) }}