-
Notifications
You must be signed in to change notification settings - Fork 37
53 lines (53 loc) · 1.43 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
name: Build and test operator images on push to every branch except main and pull requests
on:
pull_request:
branches: [main]
push:
branches-ignore: [main]
workflow_dispatch: {}
jobs:
build-test-operator:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/go/bin/
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/setup-go@v2
with:
go-version: '1.17.1'
- name: Build & Test
run: |
echo "/usr/local/kubebuilder/bin" >> $GITHUB_PATH
make toolchain build test
working-directory: operator
build-cli:
strategy:
matrix:
os: ["darwin", "linux"]
arch: ["amd64"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/go/bin/
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/setup-go@v2
with:
go-version: '1.17.1'
- name: Build the KIT CLI
run: |
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o ./bin/kitctl ./cmd/kitctl/
working-directory: substrate