Skip to content

Commit

Permalink
Merge pull request #379 from ghostbuster91/setup-sourcegraph-scala2
Browse files Browse the repository at this point in the history
Setup sourcegraph for scala 2
  • Loading branch information
adamw authored Feb 14, 2022
2 parents 9b3e5db + 9d5aa3d commit 2c8b4be
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 6 deletions.
40 changes: 34 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: coursier/setup-action@v1.1.2
with:
java-version: 11
jvm: adopt:11
- name: Cache sbt
uses: coursier/cache-action@v6
with:
Expand All @@ -40,16 +40,44 @@ jobs:
with:
fetch-depth: 0 # checkout tags so that dynver works properly (we need the version for MiMa)
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: coursier/setup-action@v1.1.2
with:
java-version: 11
jvm: adopt:11
- name: Cache sbt
uses: coursier/cache-action@v6
with:
extraKey: sbt-cache-${{ runner.os }}
- name: Check MiMa # disable for major releases
run: sbt -v core/mimaReportBinaryIssues

sourcegraph:
name: Upload index to sourcegraph
needs: [ci]
# run on external PRs, but not on internal PRs since those will be run by push to branch
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-20.04
env:
JAVA_OPTS: -Xmx4G
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 11
uses: coursier/[email protected]
with:
jvm: adopt:11
- name: Cache sbt
uses: coursier/cache-action@v6
with:
extraKey: sbt-cache-${{ runner.os }}
- name: Generate LSIF
run: sbt 'set every semanticdbEnabled := true; set every semanticdbVersion := "4.4.33"' sourcegraphLsif
- name: Upload LSIF data
uses: sourcegraph/lsif-upload-action@master
with:
endpoint: https://sourcegraph.com
github_token: ${{ secrets.GITHUB_TOKEN }}
file: target/sbt-sourcegraph/dump.lsif

publish:
name: Publish release
needs: [ci]
Expand All @@ -61,9 +89,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: coursier/setup-action@v1.1.2
with:
java-version: 11
jvm: adopt:11
- name: Cache sbt
uses: coursier/cache-action@v6
with:
Expand Down
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-publish" %
addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.1")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.8.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.0.1")

addSbtPlugin("com.sourcegraph" % "sbt-sourcegraph" % "0.3.3")

0 comments on commit 2c8b4be

Please sign in to comment.