-
Notifications
You must be signed in to change notification settings - Fork 13
49 lines (39 loc) · 1.25 KB
/
main.yaml
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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: deps-go
uses: actions/setup-go@v3
- name: deps
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.7.5/bazelisk-linux-amd64"
mkdir -p "${GITHUB_WORKSPACE}/bin/"
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
- name: gen
run: |
set -eux
# Enforce documentation is up-to-date.
${GITHUB_WORKSPACE}/bin/bazel build //docs && cat ${GITHUB_WORKSPACE}/bazel-bin/docs/defs.md > ${GITHUB_WORKSPACE}/docs/defs.md
git diff-index --name-status HEAD
git diff
git diff-index --quiet HEAD
# Enforce license headers are up-to-date.
GOBIN=/usr/local/bin/ go install github.com/google/addlicense@latest
addlicense -check -c "BenchSci Analytics Inc." -l apache *.* tools
- name: examples
working-directory: examples
run: ${GITHUB_WORKSPACE}/bin/bazel test ...
- name: tests
working-directory: tests
run: ${GITHUB_WORKSPACE}/bin/bazel test ...