-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (61 loc) · 1.88 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
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Go
on:
push:
branches: [ maestro ]
pull_request:
branches: [ maestro ]
jobs:
build:
if: github.actor != 'github-actions[bot]'
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: ['1.18']
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
steps:
- name: Check Out Code
uses: actions/checkout@v2
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Download Go modules
run: go get -v -t -d ./...
- name: Run Tests
run: go test
- name: Build
if: startsWith(matrix.os, 'ubuntu')
run: go build -v -o ./bin/hsa
- name: Build
if: startsWith(matrix.os, 'macos')
run: go build -v -o ./bin/hsamac
- name: Build
if: startsWith(matrix.os, 'windows')
run: go build -v -o ./bin/hsa.exe
- name: Commit and Push Binaries (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git pull origin maestro
git add ./bin/hsa
git commit -m "Add Ubuntu built binary [skip ci]"
git push
- name: Commit and Push Binaries (MacOS)
if: startsWith(matrix.os, 'macos')
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git pull origin maestro
git add ./bin/hsamac
git commit -m "Add MacOS built binary [skip ci]"
git push
- name: Commit and Push Binaries (Windows)
if: startsWith(matrix.os, 'windows')
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git pull origin maestro
git add ./bin/hsa.exe
git commit -m "Add Windows built binary [skip ci]"
git push