@@ -20,13 +20,34 @@ jobs:
20
20
target :
21
21
- repository : kubernetes/kubernetes
22
22
scip_binary : scip-go
23
+ scip_args : " --verbose"
23
24
- repository : google/guava
24
25
scip_binary : scip-java
26
+ scip_args : " index --verbose"
25
27
# scip-java has problems with indexing Kotlin codebase
26
28
# - repository: arrow-kt/arrow
27
29
# scip_binary: scip-java
30
+ # scip_args: "index --verbose"
28
31
- repository : apache/pekko
29
32
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
+ # scip-ruby does not have a Docker container image that we can use
41
+ # out of the box. The existing one is for autoindexing purposes only.
42
+ # - repository: Homebrew/brew
43
+ # scip_binary: scip-ruby
44
+ # scip_args: ""
45
+ - repository : serde-rs/serde
46
+ scip_binary : scip-rust
47
+ scip_args : " "
48
+ - repository : fmtlib/fmt
49
+ scip_binary : scip-clang
50
+ scip_args : " "
30
51
31
52
container : sourcegraph/${{ matrix.target.scip_binary }}:latest
32
53
concurrency :
39
60
repository : ${{ matrix.target.repository }}
40
61
fetch-depth : 1
41
62
63
+ - name : Generate compile_commands.json
64
+ if : ${{ matrix.target.scip_binary == 'scip-clang' }}
65
+ run : |
66
+ apt-get update
67
+ apt-get install -y bear cmake make g++
68
+ cmake -S . -B build
69
+ bear -- make -C build
70
+
71
+ - name : Install Go
72
+ if : ${{ matrix.target.scip_binary == 'scip-go' }}
73
+ uses : actions/setup-go@v5
74
+ with : { go-version-file: 'go.mod' }
75
+
42
76
- name : Cache Maven dependencies
43
77
if : ${{ matrix.target.scip_binary == 'scip-java' }}
44
78
uses : actions/cache@v4
@@ -49,27 +83,25 @@ jobs:
49
83
${{ runner.os }}-maven-${{ matrix.target.repository }}-
50
84
${{ runner.os }}-maven-
51
85
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' }
86
+ - name : Setup Rust toolchain
87
+ if : ${{ matrix.target.scip_binary == 'scip-rust' }}
88
+ uses : actions-rust-lang/setup-rust-toolchain@v1
89
+ with :
90
+ components : rust-analyzer
56
91
57
92
- name : Run SCIP
58
93
run : |
59
94
${{ 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
95
+ ${{ matrix.target.scip_binary }} ${{ matrix.target.scip_args }}
68
96
69
97
- name : Validate SCIP index size
70
98
run : |
71
- if [ $(stat -c%s index.scip) -lt 10000000 ]; then
72
- echo "ERROR: SCIP dump suspiciously small (< 10MB)"
99
+ size=$(stat -c%s index.scip) || {
100
+ echo "ERROR: Failed to get SCIP index size"
101
+ exit 1
102
+ }
103
+ if [ "$size" -lt 1000000 ]; then
104
+ echo "ERROR: SCIP dump suspiciously small (< 1MB)"
73
105
exit 1
74
106
fi
75
107
echo "SCIP dump size: $(du -h index.scip)"
0 commit comments