-
Notifications
You must be signed in to change notification settings - Fork 96
52 lines (50 loc) · 2.01 KB
/
pr.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
# Copyright 2021 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Presubmit check for PRs
name: pr
# Trigger only for pull requests.
on: pull_request
jobs:
presubmit:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Checkout source
uses: actions/checkout@v2
# Build all binaries but cross-compile the config generation binary for both Linux & Windows
# to make testing WIP stuff easy.
- name: Build binaries
run: |
GOOS=linux GOARCH=amd64 go build -o rbe_configs_gen_linux_amd64 ./cmd/rbe_configs_gen/rbe_configs_gen.go
GOOS=windows GOARCH=amd64 go build -o rbe_configs_gen_windows_amd64.exe ./cmd/rbe_configs_gen/rbe_configs_gen.go
go build -o rbe_configs_upload_linux_amd64 ./cmd/rbe_configs_upload/rbe_configs_upload.go
go build -o configs_e2e_linux_amd64 ./tests/scripts/configs_e2e/configs_e2e.go
- name: Run Go unit tests
run: |
go test ./cmd/... ./pkg/...
# Upload the config generation binaries for easy sharing.
- name: Upload Artifact Linux AMD64
uses: actions/upload-artifact@v2
with:
name: rbe_configs_gen_linux_amd64
path: rbe_configs_gen_linux_amd64
- name: Upload Artifact Windows AMD64
uses: actions/upload-artifact@v2
with:
name: rbe_configs_gen_windows_amd64.exe
path: rbe_configs_gen_windows_amd64.exe