diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5662ec3f..0f2a0580 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -40,9 +40,9 @@ 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: @@ -50,6 +50,35 @@ jobs: - name: Check MiMa # disable for major releases run: sbt -v core3/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/setup-action@v1.1.2 + with: + jvm: adopt:11 + apps: lsif-java + - name: Cache sbt + uses: coursier/cache-action@v6 + with: + extraKey: sbt-cache-${{ runner.os }} + - name: Generate LSIF + run: lsif-java index + - name: Upload LSIF data + uses: sourcegraph/lsif-upload-action@master + with: + endpoint: https://sourcegraph.com + github_token: ${{ secrets.GITHUB_TOKEN }} + file: dump.lsif + publish: name: Publish release needs: [ci] @@ -62,9 +91,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: diff --git a/build.sbt b/build.sbt index 969865a7..ac5de6fb 100644 --- a/build.sbt +++ b/build.sbt @@ -80,3 +80,10 @@ lazy val test = (projectMatrix in file(".test")) ) .jvmPlatform(scalaVersions = List(scala3)) .jsPlatform(scalaVersions = List(scala3)) + +inThisBuild( + List( + semanticdbEnabled := true, + semanticdbVersion := "4.4.33" + ) +) \ No newline at end of file