-
Notifications
You must be signed in to change notification settings - Fork 8
78 lines (63 loc) · 1.62 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Build and Upload scow-slurm-adapter Binary
on:
pull_request:
branches: [master]
push:
tags:
- v**
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1.18.0
with:
github_token: ${{ github.token }}
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: stable
- name: PB Codegen
run: make protos
- name: Test
# When unit test is ready, change this to true
if: false
run: make test
- name: Build binaries
run: |
make ARCH=amd64 build
make ARCH=arm64 build
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: scow-slurm-adapter
path: |
./scow-slurm-adapter-amd64
./scow-slurm-adapter-arm64
release:
runs-on: ubuntu-latest
needs:
- build
if: github.ref_type == 'tag'
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Download scow-slurm-adapter
uses: actions/download-artifact@v3
with:
name: scow-slurm-adapter
path: release
- name: Display structure of downloaded files
run: ls -R
working-directory: release
- name: Create release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
release/scow-slurm-adapter-amd64
release/scow-slurm-adapter-arm64