-
-
Notifications
You must be signed in to change notification settings - Fork 432
138 lines (138 loc) · 4.52 KB
/
runner-github-macos-amd64.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
## DO NOT EDIT - This file is generated
on: [pull_request]
name: Build and Tests on MacOS/amd64
env:
GOPROXY: "https://proxy.golang.org"
jobs:
stable-go:
name: Build and test on latest stable Go release - MacOS/amd64
env:
GOVERSION: '1.16.x'
strategy:
matrix:
experimental: [false]
tags: [none,avx,sse]
runs-on: "macos-latest"
continue-on-error: ${{ matrix.experimental }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GOVERSION }}
# Get values for cache paths to be used in later steps
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- name: Checkout
uses: actions/checkout@v2
# Cache go build cache, used to speedup go test
- name: Go Build Cache
if: steps.go-cache-paths.outputs.go-build != ''
id: build-cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-build-
# Cache go mod cache, used to speedup builds
- name: Go Mod Cache
if: steps.go-cache-paths.outputs.go-mod != ''
id: build-mod-cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mod-
- name: Install Dependencies
if: steps.build-mod-cache.outputs.cache-hit != 'true'
run: |
GOARCH=arm GOOS=linux go get -t .
GOARCH=amd64 GOOS=linux go get -t .
GOARCH=amd64 GOOS=darwin go get -t .
- name: Build without tags (all plateforms)
if: matrix.tags == 'none'
run: |
GOARCH=arm GOOS=linux go build .
GOARCH=amd64 GOOS=linux go build .
GOARCH=amd64 GOOS=darwin go build .
- name: Test without tags
if: matrix.tags == 'none'
run: |
go test -timeout 30m
- name: Build with tag
if: matrix.tags != 'none'
run: |
go build -tags=${{ matrix.tags }}
- name: Test with tag
if: matrix.tags != 'none'
run: |
go test -timeout 30m -tags=${{ matrix.tags }}
previous-go:
name: Build and test on previous stable Go release - MacOS/amd64
env:
GOVERSION: '1.15.x'
strategy:
matrix:
experimental: [false]
tags: [none,avx,sse]
runs-on: "macos-latest"
continue-on-error: ${{ matrix.experimental }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GOVERSION }}
# Get values for cache paths to be used in later steps
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- name: Checkout
uses: actions/checkout@v2
# Cache go build cache, used to speedup go test
- name: Go Build Cache
if: steps.go-cache-paths.outputs.go-build != ''
id: build-cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-build-
# Cache go mod cache, used to speedup builds
- name: Go Mod Cache
if: steps.go-cache-paths.outputs.go-mod != ''
id: build-mod-cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mod-
- name: Install Dependencies
if: steps.build-mod-cache.outputs.cache-hit != 'true'
run: |
GOARCH=arm GOOS=linux go get -t .
GOARCH=amd64 GOOS=linux go get -t .
GOARCH=amd64 GOOS=darwin go get -t .
- name: Build without tags (all plateforms)
if: matrix.tags == 'none'
run: |
GOARCH=arm GOOS=linux go build .
GOARCH=amd64 GOOS=linux go build .
GOARCH=amd64 GOOS=darwin go build .
- name: Test without tags
if: matrix.tags == 'none'
run: |
go test -timeout 30m
- name: Build with tag
if: matrix.tags != 'none'
run: |
go build -tags=${{ matrix.tags }}
- name: Test with tag
if: matrix.tags != 'none'
run: |
go test -timeout 30m -tags=${{ matrix.tags }}