-
Notifications
You must be signed in to change notification settings - Fork 29
119 lines (107 loc) · 3.38 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
name: Tests
strategy:
fail-fast: false
matrix:
# NOTE(olafurpg) Windows is not enabled because it times out due to reasons I don't understand.
# os: [windows-latest, ubuntu-latest]
os: [ubuntu-latest]
java: [8, 11, 17]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
distribution: "temurin"
cache: "sbt"
java-version: ${{ matrix.java }}
- name: Main project tests
run: sbt test
benchmarks-test:
runs-on: ubuntu-latest
name: Benchmark tests
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
distribution: "temurin"
cache: "sbt"
java-version: 17
- name: Run sample benchmarks
run: sbt 'bench/Jmh/run -i 1 -f1 -t1 -foe true'
docker_test:
runs-on: ${{ matrix.os }}
name: Docker CLI tests
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
distribution: "temurin"
cache: "sbt"
java-version: 17
- name: Build Dockerised CLI
run: sbt cli/docker
- run: |
set -eu
check_repo() {
REPO=$1
mkdir -p .repos/$REPO
git clone https://github.com/$REPO.git .repos/$REPO
docker run -v $PWD/.repos/$REPO:/sources -w /sources sourcegraph/scip-java:latest scip-java index
file .repos/$REPO/index.scip || (echo "$REPO SCIP index doesn't exist!"; exit 1)
}
sudo apt install parallel
export -f check_repo
parallel -j4 check_repo ::: circe/circe indeedeng/iwf-java-sdk
bazel:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn global add @bazel/bazelisk
- run: bazel build //... --//semanticdb-javac:enabled=true
- run: bazel run scip-semanticdb:bazel -- --sourceroot "$PWD"
- run: du -h index.scip
- run: bazel build //... --@scip_java//semanticdb-javac:enabled=true
working-directory: examples/bazel-example
- run: bazel run @scip_java//scip-semanticdb:bazel -- --sourceroot "$PWD"
working-directory: examples/bazel-example
- run: du -h index.scip
working-directory: examples/bazel-example
bazel_aspect:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn global add @bazel/bazelisk
- run: sbt cli/pack
- run: echo "$PWD/scip-java/target/pack/bin" >> $GITHUB_PATH
- name: Auto-index scip-java codebase
run: |
scip-java index --build-tool=bazel --bazel-scip-java-binary=$(which scip-java)
- run: du -h index.scip
- name: Auto-index example/bazel-workspace
run: |
scip-java index --build-tool=bazel --bazel-scip-java-binary=$(which scip-java)
working-directory: examples/bazel-example
- run: du -h index.scip
working-directory: examples/bazel-example
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 17
cache: "sbt"
- run: sbt checkAll