From 561f9719bd998193886ef0ceee29f11eba8c00a7 Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Mon, 11 Nov 2024 14:39:29 +0000 Subject: [PATCH 01/15] New community build workflow --- .github/workflows/ci.yml | 2 +- .github/workflows/community-build.yml | 34 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/community-build.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2a0b009..c2e84314 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: push: branches: - - main + - FIXME pull_request: jobs: test: diff --git a/.github/workflows/community-build.yml b/.github/workflows/community-build.yml new file mode 100644 index 00000000..78aa08fe --- /dev/null +++ b/.github/workflows/community-build.yml @@ -0,0 +1,34 @@ +name: Community build +on: + push: + branches: [main] + tags: ["*"] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 11 + cache: 'sbt' + + - uses: sbt/setup-sbt@v1 + + - run: sbt cli/pack + + - run: | + zip -r scip-java.zip ./scip-java/target/pack + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + path: scip-java.zip + name: scip-java-binary + if-no-files-found: error + + + From 06ac772685eef81023c1ed488ec34afd51d724a9 Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Mon, 11 Nov 2024 14:41:53 +0000 Subject: [PATCH 02/15] WIP --- .github/workflows/community-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/community-build.yml b/.github/workflows/community-build.yml index 78aa08fe..8f52b0d2 100644 --- a/.github/workflows/community-build.yml +++ b/.github/workflows/community-build.yml @@ -3,6 +3,7 @@ on: push: branches: [main] tags: ["*"] + pull_request: jobs: build: runs-on: ubuntu-latest From ad3f7972e53f7290d3e01cb7c844a9ad254cee0a Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Mon, 11 Nov 2024 14:45:23 +0000 Subject: [PATCH 03/15] WIP --- .github/workflows/community-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/community-build.yml b/.github/workflows/community-build.yml index 8f52b0d2..e2f9476d 100644 --- a/.github/workflows/community-build.yml +++ b/.github/workflows/community-build.yml @@ -22,7 +22,7 @@ jobs: - run: sbt cli/pack - run: | - zip -r scip-java.zip ./scip-java/target/pack + cd scip-java/target/pack && zip -r scip-java.zip . - name: Upload artifacts uses: actions/upload-artifact@v4 From 7e8565098dbc0a46dbe82bc03088e0c3b92023c5 Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Mon, 11 Nov 2024 14:47:39 +0000 Subject: [PATCH 04/15] WIP --- .github/workflows/community-build.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/community-build.yml b/.github/workflows/community-build.yml index e2f9476d..241a16e9 100644 --- a/.github/workflows/community-build.yml +++ b/.github/workflows/community-build.yml @@ -4,6 +4,14 @@ on: branches: [main] tags: ["*"] pull_request: + workflow_dispatch: + inputs: + scipJavaVersion: + description: 'Version of bindgen to run (if empty, main branch will be republished)' + required: false + default: '' + type: string + jobs: build: runs-on: ubuntu-latest @@ -22,7 +30,7 @@ jobs: - run: sbt cli/pack - run: | - cd scip-java/target/pack && zip -r scip-java.zip . + cd scip-java/target/pack && zip -r ../../../scip-java.zip . - name: Upload artifacts uses: actions/upload-artifact@v4 From 2b7a7729ad5d20c4b1574e97d495c0ca00aab978 Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Mon, 11 Nov 2024 15:00:51 +0000 Subject: [PATCH 05/15] WIP --- .github/workflows/community-build.yml | 32 ++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/community-build.yml b/.github/workflows/community-build.yml index 241a16e9..c3a5ae8e 100644 --- a/.github/workflows/community-build.yml +++ b/.github/workflows/community-build.yml @@ -13,12 +13,13 @@ on: type: string jobs: - build: + build_from_source: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: fetch-depth: 0 + - uses: actions/setup-java@v3 with: distribution: 'temurin' @@ -40,4 +41,33 @@ jobs: if-no-files-found: error + community_build: + runs-on: ubuntu-latest + needs: [build_from_source] + strategy: + fail-fast: true + matrix: + include: + - repo: spring-projects/spring-data-relational + jdk: 11 + cache: maven + steps: + - name: Download binaries + uses: actions/download-artifact@v4 + id: scip-java-binary + with: + path: binaries + + - name: List downloaded binaries + run: ls -R binaries + + - uses: actions/checkout@v3 + with: + repository: ${{ matrix.repo }} + + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: ${{ matrix.jdk }} + cache: ${{ matrix.cache }} From b9d32d7bfaa88463ca7b7000351912e107d12e6c Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Mon, 11 Nov 2024 15:06:52 +0000 Subject: [PATCH 06/15] WIP --- .github/workflows/community-build.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/community-build.yml b/.github/workflows/community-build.yml index c3a5ae8e..599aa4ae 100644 --- a/.github/workflows/community-build.yml +++ b/.github/workflows/community-build.yml @@ -61,9 +61,15 @@ jobs: - name: List downloaded binaries run: ls -R binaries + - name: Unpack scip-java build + run: | + unzip binaries/scip-java-binary/scip-java.zip + ls -R scip-java + - uses: actions/checkout@v3 with: repository: ${{ matrix.repo }} + path: sources - uses: actions/setup-java@v3 with: @@ -71,3 +77,8 @@ jobs: java-version: ${{ matrix.jdk }} cache: ${{ matrix.cache }} + - run: ../scip-java/bin/scip-java index + working-directory: sources + + + From 136f8e34d6ba98fa90b13bde377f3ab7c8277231 Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Mon, 11 Nov 2024 15:09:44 +0000 Subject: [PATCH 07/15] WIP --- .github/workflows/community-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/community-build.yml b/.github/workflows/community-build.yml index 599aa4ae..7628bc80 100644 --- a/.github/workflows/community-build.yml +++ b/.github/workflows/community-build.yml @@ -64,7 +64,7 @@ jobs: - name: Unpack scip-java build run: | unzip binaries/scip-java-binary/scip-java.zip - ls -R scip-java + working-directory: scip-java - uses: actions/checkout@v3 with: From e82ce09ecea6ca5a822d4cfc4e89dec75be62964 Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Mon, 11 Nov 2024 15:12:55 +0000 Subject: [PATCH 08/15] WIP --- .github/workflows/community-build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/community-build.yml b/.github/workflows/community-build.yml index 7628bc80..a38686c2 100644 --- a/.github/workflows/community-build.yml +++ b/.github/workflows/community-build.yml @@ -63,8 +63,7 @@ jobs: - name: Unpack scip-java build run: | - unzip binaries/scip-java-binary/scip-java.zip - working-directory: scip-java + unzip binaries/scip-java-binary/scip-java.zip -d scip-java - uses: actions/checkout@v3 with: From 3c97f4bcf929cf659d50d586fa7cfccbb73d8857 Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Mon, 11 Nov 2024 15:15:52 +0000 Subject: [PATCH 09/15] WIP --- .github/workflows/community-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/community-build.yml b/.github/workflows/community-build.yml index a38686c2..66bd9ae8 100644 --- a/.github/workflows/community-build.yml +++ b/.github/workflows/community-build.yml @@ -49,7 +49,7 @@ jobs: matrix: include: - repo: spring-projects/spring-data-relational - jdk: 11 + jdk: 17 cache: maven steps: - name: Download binaries From 618fc7fb498579562e517a583126339f1e3d99f9 Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Mon, 11 Nov 2024 15:39:23 +0000 Subject: [PATCH 10/15] WIP --- .github/workflows/ci.yml | 28 +++++++++------------------ .github/workflows/community-build.yml | 8 ++++++++ 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c2e84314..f8df9134 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: matrix: os: [ubuntu-latest] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: @@ -48,25 +48,15 @@ jobs: - uses: sbt/setup-sbt@v1 - name: Build Dockerised CLI - run: sbt cli/docker - - - name: Test repos - shell: bash - run: | - set -eu - check_repo() { - REPO=$1 - mkdir -p .repos/$REPO - git clone https://github.com/$REPO.git .repos/$REPO && cd .repos/$REPO && git submodule update --init + run: sbt cli/docker dumpScipJavaVersion - docker run -v $PWD/.repos/$REPO:/sources -w /sources sourcegraph/scip-java:latest scip-java index - file .repos/$REPO/index.scip || (echo "$REPO SCIP index doesn't exist!"; exit 1) - } - - sudo apt install parallel - export -f check_repo - - parallel -j4 check_repo ::: circe/circe indeedeng/iwf-java-sdk + - uses: actions/checkout@v3 + with: + path: sources + repository: spring-projects/spring-boot + + - run: | + docker run -v $PWD/sources:/sources -w /sources sourcegraph/scip-java:$(cat VERSION) scip-java index bazel: runs-on: ubuntu-latest diff --git a/.github/workflows/community-build.yml b/.github/workflows/community-build.yml index 66bd9ae8..2cf7a583 100644 --- a/.github/workflows/community-build.yml +++ b/.github/workflows/community-build.yml @@ -51,6 +51,14 @@ jobs: - repo: spring-projects/spring-data-relational jdk: 17 cache: maven + + - repo: spring-projects/spring-framework + jdk: 17 + cache: maven + + - repo: spring-projects/spring-boot + jdk: 17 + cache: maven steps: - name: Download binaries uses: actions/download-artifact@v4 From dffab0c53b9a3afe6e45f92dc4605e8840ebb0be Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Mon, 11 Nov 2024 15:43:12 +0000 Subject: [PATCH 11/15] WIP --- .github/workflows/community-build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/community-build.yml b/.github/workflows/community-build.yml index 2cf7a583..764c92ba 100644 --- a/.github/workflows/community-build.yml +++ b/.github/workflows/community-build.yml @@ -50,15 +50,12 @@ jobs: include: - repo: spring-projects/spring-data-relational jdk: 17 - cache: maven - repo: spring-projects/spring-framework jdk: 17 - cache: maven - repo: spring-projects/spring-boot jdk: 17 - cache: maven steps: - name: Download binaries uses: actions/download-artifact@v4 @@ -82,7 +79,6 @@ jobs: with: distribution: 'temurin' java-version: ${{ matrix.jdk }} - cache: ${{ matrix.cache }} - run: ../scip-java/bin/scip-java index working-directory: sources From c9af841d109b5633d616449d1228e3ca7dea861c Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Mon, 11 Nov 2024 15:44:12 +0000 Subject: [PATCH 12/15] WIP --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8df9134..c562ffda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: - uses: sbt/setup-sbt@v1 - name: Build Dockerised CLI - run: sbt cli/docker dumpScipJavaVersion + run: sbt cli/docker - uses: actions/checkout@v3 with: @@ -56,7 +56,7 @@ jobs: repository: spring-projects/spring-boot - run: | - docker run -v $PWD/sources:/sources -w /sources sourcegraph/scip-java:$(cat VERSION) scip-java index + docker run -v $PWD/sources:/sources -w /sources sourcegraph/scip-java:latest-snapshot scip-java index bazel: runs-on: ubuntu-latest From ad56d0aecf0b6e4972e6966562ca4f96b32b3edf Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Mon, 11 Nov 2024 16:04:53 +0000 Subject: [PATCH 13/15] WIP --- .github/workflows/community-build.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/community-build.yml b/.github/workflows/community-build.yml index 764c92ba..dc0b83ab 100644 --- a/.github/workflows/community-build.yml +++ b/.github/workflows/community-build.yml @@ -7,10 +7,19 @@ on: workflow_dispatch: inputs: scipJavaVersion: - description: 'Version of bindgen to run (if empty, main branch will be republished)' + description: 'Version of scip-java to run (if empty, main branch will be republished)' required: false default: '' type: string + runGroup: + description: 'Which set of repos to run (quick runs a small number of small repos, full runs all)' + required: false + default: quick + type: choice + options: + - quick + - full + jobs: build_from_source: @@ -50,12 +59,16 @@ jobs: include: - repo: spring-projects/spring-data-relational jdk: 17 + group: quick - repo: spring-projects/spring-framework jdk: 17 + group: full - repo: spring-projects/spring-boot jdk: 17 + group: full + if: inputs.runGroup == matrix.group steps: - name: Download binaries uses: actions/download-artifact@v4 From 41c9bf6bceef04342c7c23070fb4c745bc3e01c7 Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Mon, 11 Nov 2024 16:10:15 +0000 Subject: [PATCH 14/15] Update community-build.yml --- .github/workflows/community-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/community-build.yml b/.github/workflows/community-build.yml index dc0b83ab..d4148075 100644 --- a/.github/workflows/community-build.yml +++ b/.github/workflows/community-build.yml @@ -68,7 +68,7 @@ jobs: - repo: spring-projects/spring-boot jdk: 17 group: full - if: inputs.runGroup == matrix.group + if: ${{ inputs.runGroup == matrix.group }} steps: - name: Download binaries uses: actions/download-artifact@v4 From 278eaa03a441372642245562314fe190cc4129bb Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Mon, 11 Nov 2024 16:11:32 +0000 Subject: [PATCH 15/15] WIP --- .github/workflows/community-build.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/community-build.yml b/.github/workflows/community-build.yml index d4148075..e1774e75 100644 --- a/.github/workflows/community-build.yml +++ b/.github/workflows/community-build.yml @@ -68,32 +68,33 @@ jobs: - repo: spring-projects/spring-boot jdk: 17 group: full - if: ${{ inputs.runGroup == matrix.group }} steps: - name: Download binaries uses: actions/download-artifact@v4 id: scip-java-binary + if: ${{ inputs.runGroup == matrix.group }} with: path: binaries - - name: List downloaded binaries - run: ls -R binaries - - name: Unpack scip-java build + if: ${{ inputs.runGroup == matrix.group }} run: | unzip binaries/scip-java-binary/scip-java.zip -d scip-java - uses: actions/checkout@v3 + if: ${{ inputs.runGroup == matrix.group }} with: repository: ${{ matrix.repo }} path: sources - uses: actions/setup-java@v3 + if: ${{ inputs.runGroup == matrix.group }} with: distribution: 'temurin' java-version: ${{ matrix.jdk }} - run: ../scip-java/bin/scip-java index + if: ${{ inputs.runGroup == matrix.group }} working-directory: sources