File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : SG CI - Java
2+ on :
3+ push :
4+ pull_request :
5+ jobs :
6+ build :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v4
10+ - uses : actions/setup-java@v4
11+ with :
12+ distribution : temurin
13+ java-version : ' 17'
14+ - name : Build
15+ run : |
16+ if [ -f pom.xml ]; then mvn -B -e -DskipTests compile;
17+ elif [ -f build.gradle ] || [ -f build.gradle.kts ]; then chmod +x ./gradlew 2>/dev/null || true; ./gradlew compileJava -x test || gradle compileJava -x test;
18+ else find . -name '*.java' > /tmp/srcs.txt; mkdir -p /tmp/out; javac -d /tmp/out @/tmp/srcs.txt; fi
19+ code-intel :
20+ runs-on : ubuntu-latest
21+ steps :
22+ - uses : actions/checkout@v4
23+ - uses : actions/setup-java@v4
24+ with :
25+ distribution : temurin
26+ java-version : ' 17'
27+ - name : Install scip-java and src-cli
28+ run : |
29+ curl -sfLo /usr/local/bin/cs https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux
30+ chmod +x /usr/local/bin/cs
31+ cs install --quiet scip-java || true
32+ curl -sfL https://demo.sourcegraph.com/.api/src-cli/src_linux_amd64 -o /usr/local/bin/src
33+ chmod +x /usr/local/bin/src
34+ - name : Index and upload
35+ env :
36+ SRC_ENDPOINT : https://demo.sourcegraph.com
37+ SRC_ACCESS_TOKEN : ${{secrets.SRC_ACCESS_TOKEN}}
38+ run : |
39+ export PATH="$HOME/.local/share/coursier/bin:$PATH"
40+ if [ -f pom.xml ] || [ -f build.gradle ] || [ -f build.gradle.kts ]; then scip-java index || true; fi
41+ if [ -f index.scip ]; then src code-intel upload -no-progress; else echo "no index (needs a build tool)"; fi
You can’t perform that action at this time.
0 commit comments