-
Notifications
You must be signed in to change notification settings - Fork 84
47 lines (45 loc) · 1.62 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
name: Go
on: [push, pull_request]
jobs:
build-linux:
strategy:
matrix:
go-version: [ '1.20.x', '1.21.x' ]
goos: [linux]
goarch: [amd64]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '${{matrix.go-version}}'
- name: Install dependencies
run: go get ./...
- name: Build Client
run: env CGO_ENABLED=1 GOOS=${{matrix.goos}} GOARCH=${{matrix.goarch}} go build -v client/main.go
- name: Build Server
run: env CGO_ENABLED=1 GOOS=${{matrix.goos}} GOARCH=${{matrix.goarch}} go build -v server/main.go
- name: Test with the Go CLI
run: env CGO_ENABLED=1 GOOS=${{matrix.goos}} GOARCH=${{matrix.goarch}} go run github.com/onsi/ginkgo/v2/ginkgo -r
build-macos:
strategy:
matrix:
go-version: [ '1.20.x', '1.21.x' ]
goos: [darwin]
goarch: [amd64]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '${{matrix.go-version}}'
- name: Install dependencies
run: go get ./...
- name: Build Client
run: env CGO_ENABLED=1 GOOS=${{matrix.goos}} GOARCH=${{matrix.goarch}} go build -v client/main.go
- name: Build Server
run: env CGO_ENABLED=1 GOOS=${{matrix.goos}} GOARCH=${{matrix.goarch}} go build -v server/main.go
- name: Test with the Go CLI
run: env CGO_ENABLED=1 GOOS=${{matrix.goos}} GOARCH=${{matrix.goarch}} go run github.com/onsi/ginkgo/v2/ginkgo -r