summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/build.yml
blob: b572dc94f90b047684b3a71bba9cea25e46778f9 (plain)
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
# This workflow builds the source code, extracts nogo annotations and
# posts them to GitHub, if applicable. This leverages the fact that the
# workflow token has appropriate permissions to do so, and attempts to
# leverage the GitHub workflow caches.
name: "Build"
"on":
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
      - "feature/**"

jobs:
  default:
    runs-on: ubuntu-latest
    steps:
    - name: Cancel previous
      uses: styfle/cancel-workflow-action@0.7.0
      with:
        access_token: ${{ github.token }}
    - uses: actions/checkout@v2
    - run: make
    - run: make build OPTIONS="--build_tag_filters nogo" TARGETS="//..."
    - run: make run TARGETS="//tools/github" ARGS="-path=bazel-bin/ -path=bazel-out/ nogo"
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        GITHUB_REPOSITORY: ${{ github.repository }}