Skip to content

Commit f81a2c8

Browse files

File tree

1 file changed

+44
-14
lines changed

1 file changed

+44
-14
lines changed

.github/workflows/scip-examples.yaml

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,32 @@ jobs:
2020
target:
2121
- repository: kubernetes/kubernetes
2222
scip_binary: scip-go
23+
scip_args: "--verbose"
2324
- repository: google/guava
2425
scip_binary: scip-java
26+
scip_args: "index --verbose"
2527
# scip-java has problems with indexing Kotlin codebase
2628
# - repository: arrow-kt/arrow
2729
# scip_binary: scip-java
30+
# scip_args: "index --verbose"
2831
- repository: apache/pekko
2932
scip_binary: scip-java
33+
scip_args: "index --verbose"
34+
- repository: Textualize/rich
35+
scip_binary: scip-python
36+
scip_args: "index ."
37+
- repository: vuejs/core
38+
scip_binary: scip-typescript
39+
scip_args: "index"
40+
- repository: Homebrew/brew
41+
scip_binary: scip-ruby
42+
scip_args: ""
43+
- repository: serde-rs/serde
44+
scip_binary: scip-rust
45+
scip_args: ""
46+
- repository: fmtlib/fmt
47+
scip_binary: scip-clang
48+
scip_args: ""
3049

3150
container: sourcegraph/${{ matrix.target.scip_binary }}:latest
3251
concurrency:
@@ -39,6 +58,19 @@ jobs:
3958
repository: ${{ matrix.target.repository }}
4059
fetch-depth: 1
4160

61+
- name: Generate compile_commands.json
62+
if: ${{ matrix.target.scip_binary == 'scip-clang' }}
63+
run: |
64+
apt-get update
65+
apt-get install -y bear cmake make g++
66+
cmake -S . -B build
67+
bear -- make -C build
68+
69+
- name: Install Go
70+
if: ${{ matrix.target.scip_binary == 'scip-go' }}
71+
uses: actions/setup-go@v5
72+
with: { go-version-file: 'go.mod' }
73+
4274
- name: Cache Maven dependencies
4375
if: ${{ matrix.target.scip_binary == 'scip-java' }}
4476
uses: actions/cache@v4
@@ -49,27 +81,25 @@ jobs:
4981
${{ runner.os }}-maven-${{ matrix.target.repository }}-
5082
${{ runner.os }}-maven-
5183
52-
- name: Install Go
53-
if: ${{ matrix.target.scip_binary == 'scip-go' }}
54-
uses: actions/setup-go@v5
55-
with: { go-version-file: 'go.mod' }
84+
- name: Setup Rust toolchain
85+
if: ${{ matrix.target.scip_binary == 'scip-rust' }}
86+
uses: actions-rust-lang/setup-rust-toolchain@v1
87+
with:
88+
components: rust-analyzer
5689

5790
- name: Run SCIP
5891
run: |
5992
${{ matrix.target.scip_binary }} --version
60-
case "${{ matrix.target.scip_binary }}" in
61-
scip-go)
62-
${{ matrix.target.scip_binary }} --verbose
63-
;;
64-
scip-java)
65-
${{ matrix.target.scip_binary }} index --verbose
66-
;;
67-
esac
93+
${{ matrix.target.scip_binary }} ${{ matrix.target.scip_args }}
6894
6995
- name: Validate SCIP index size
7096
run: |
71-
if [ $(stat -c%s index.scip) -lt 10000000 ]; then
72-
echo "ERROR: SCIP dump suspiciously small (< 10MB)"
97+
size=$(stat -c%s index.scip) || {
98+
echo "ERROR: Failed to get SCIP index size"
99+
exit 1
100+
}
101+
if [ "$size" -lt 1000000 ]; then
102+
echo "ERROR: SCIP dump suspiciously small (< 1MB)"
73103
exit 1
74104
fi
75105
echo "SCIP dump size: $(du -h index.scip)"

0 commit comments

Comments
 (0)