-
Notifications
You must be signed in to change notification settings - Fork 494
58 lines (52 loc) · 1.32 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
name: "Build"
on:
push:
paths-ignore:
- 'acceptancetests/**'
- 'doc/**'
- 'snap/**'
- 'testcharms/**'
- 'testing/**'
- 'tests/**'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- 'acceptancetests/**'
- 'doc/**'
- 'snap/**'
- 'testcharms/**'
- 'testing/**'
- 'tests/**'
workflow_dispatch:
permissions:
contents: read
jobs:
Build:
name: Build
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
strategy:
matrix:
platform:
- { os: linux, arch: amd64 }
- { os: linux, arch: arm64 }
- { os: linux, arch: s390x }
- { os: linux, arch: ppc64le }
- { os: windows, arch: amd64 }
- { os: darwin, arch: amd64 }
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Find required go version
id: go-version
run: |
set -euxo pipefail
echo "::set-output name=version::$(grep '^go ' go.mod | awk '{print $2}')"
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ steps.go-version.outputs.version }}
id: go
- name: Build
run: |
GOOS=${{ matrix.platform.os }} GOARCH=${{ matrix.platform.arch }} make go-install