From 1420761e61de7d08597eb83fa2f559da1b9cb960 Mon Sep 17 00:00:00 2001 From: ghostbuster91 Date: Mon, 10 Jan 2022 12:14:46 +0100 Subject: [PATCH 1/4] Setup sourcegraph --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5662ec3f..e120a744 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,33 @@ jobs: - name: Check MiMa # disable for major releases run: sbt -v core3/mimaReportBinaryIssues + sourcegraph: + # 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] From fcd9cc12363f8b5e0e82313e29f077f8e36c78b4 Mon Sep 17 00:00:00 2001 From: ghostbuster91 Date: Mon, 10 Jan 2022 12:17:05 +0100 Subject: [PATCH 2/4] Unify setup jdk step across build pipeline --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e120a744..b276e704 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: @@ -89,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: From e752b14a88878b80933d7c37938938e0af3aff24 Mon Sep 17 00:00:00 2001 From: ghostbuster91 Date: Mon, 10 Jan 2022 18:28:36 +0100 Subject: [PATCH 3/4] Run upload of lsif files only after successful CI --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b276e704..0f2a0580 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,6 +51,8 @@ jobs: 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 From 5fddfe5554d6bb56dc18bddb88cb4de52c6dd280 Mon Sep 17 00:00:00 2001 From: ghostbuster91 Date: Mon, 31 Jan 2022 23:54:35 +0100 Subject: [PATCH 4/4] Enable semanticDb explicitly --- build.sbt | 7 +++++++ 1 file changed, 7 insertions(+) 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