forked from marcohu/rules_antlr
-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (40 loc) · 1.14 KB
/
ci.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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: "11"
- name: Mount Bazel Cache
uses: actions/cache@v3
with:
path: "~/.cache/bazel"
key: bazel
- name: Verify Bazel installation
run: bazelisk version
- name: Build examples
run: |
cd examples
bazelisk build --config ci //antlr2/Cpp/... //antlr2/Calc/... //antlr2/Python/... //antlr3/Cpp/... //antlr3/Java/... //antlr3/Python2/... //antlr3/Python3/... //antlr4/Cpp/... //antlr4/Go/... //antlr4/Java/... //antlr4/Python2/... //antlr4/Python3/...
- name: Build antlr4-opt
run: |
cd examples/antlr4-opt
bazelisk build --config ci //...
- name: Run tests
run: |
bazelisk test --config ci //...
- name: Shutdown Bazel
run: bazelisk shutdown