-
Notifications
You must be signed in to change notification settings - Fork 37
76 lines (72 loc) · 1.65 KB
/
pull_request.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
name: pull_request
on:
pull_request:
branches:
- master
- release-**
paths-ignore:
- '**.md'
- '.gitignore'
env:
GOPROXY: ${{ vars.GOPROXY }}
jobs:
lint:
name: lint
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- uses: actions/checkout@v4
- name: setup-go 1.18
uses: actions/setup-go@v5
with:
go-version: 1.18
- name: Fmt
run: |
make fmt
files=$(git status -s)
[[ "$files" == "" ]] && exit 0 || exit 1
build:
name: build
needs: lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- linux
- darwin
- windows
arch:
- amd64
- arm64
- arm
exclude:
- os: darwin
arch: arm
- os: windows
arch: arm64
steps:
- uses: actions/checkout@v4
- name: setup-go 1.18
uses: actions/setup-go@v5
with:
go-version: 1.18
- name: set package name
id: name
run: |
output_name=nebula-console-${{ matrix.os }}-${{ matrix.arch }}-nightly
if [ "${{ matrix.os }}" = "windows" ]; then
output_name+='.exe'
fi
echo "package_name=$output_name" >> $GITHUB_OUTPUT
- name: generate box/blob.go for data/basketballplayer.ngql
run: make gen
env:
GOOS: linux
GOARCH: amd64
- name: build
run: make name=${{ steps.name.outputs.package_name }}
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}