1
1
mirror of https://github.com/github/semantic.git synced 2024-11-26 09:07:39 +03:00
semantic/.github/workflows/bazel.yml

43 lines
1.1 KiB
YAML
Raw Normal View History

2020-07-09 00:56:46 +03:00
name: Bazel CI
2020-07-09 00:52:06 +03:00
on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
jobs:
build:
2020-07-09 00:54:56 +03:00
name: Bazel
2020-07-09 00:52:06 +03:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
- name: Download/cache bazel bersion
run: |
curl -LO "https://github.com/bazelbuild/bazel/releases/download/3.1.0/bazel-3.1.0-linux-x86_64"
2020-07-10 20:11:41 +03:00
mkdir "bin/" || true
mv bazel-3.0.0-linux-x86_64 "bin/bazel"
chmod +x "bin/bazel"
- uses: actions/cache@v2
2020-07-10 17:49:06 +03:00
id: caching-stage
2020-07-09 00:54:56 +03:00
name: Cache Bazel artifacts
2020-07-09 00:52:06 +03:00
with:
path: |
.bazel-cache
bin
2020-07-10 19:59:56 +03:00
key: ${{ runner.os }}-bazel-${{ github.run_id }}
2020-07-09 00:52:06 +03:00
restore-keys: |
2020-07-09 00:54:56 +03:00
${{ runner.os }}-bazel-
2020-07-09 00:52:06 +03:00
- name: Build & test
run: |
bin/bazel build --config=ci //semantic:all
bin/bazel test --config=ci --test_tag_filters=language-test //...
bin/bazel test --config=ci //semantic-source //semantic:spec