Skip to content

Commit cfa0229

Browse files
authored
Merge branch 'main' into renovate/docker-login-action-4.x
2 parents a2828bf + f722f53 commit cfa0229

189 files changed

Lines changed: 3109 additions & 1761 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bazelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
common --java_language_version=17
2+
common --tool_java_language_version=17
3+
common --java_runtime_version=remotejdk_25
4+
common --tool_java_runtime_version=remotejdk_25

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.7.0
1+
9.1.1

.github/workflows/ci.yaml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,49 @@ on:
55
- main
66
pull_request:
77
jobs:
8+
format:
9+
runs-on: ubuntu-latest
10+
name: Formatting
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: actions/setup-java@v4
15+
with:
16+
distribution: temurin
17+
java-version: 17
18+
19+
- uses: gradle/actions/setup-gradle@v4
20+
with:
21+
gradle-version: 9.4.1
22+
23+
- run: gradle spotlessCheck --no-daemon
24+
25+
kotlin_plugin:
26+
runs-on: ubuntu-latest
27+
name: scip-kotlinc
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- uses: actions/setup-java@v4
32+
with:
33+
distribution: temurin
34+
java-version: 17
35+
36+
- uses: gradle/actions/setup-gradle@v4
37+
with:
38+
gradle-version: 9.4.1
39+
40+
- name: scip-kotlinc tests
41+
run: gradle :scip-kotlinc:test --no-daemon
42+
843
docker_test:
944
runs-on: ubuntu-latest
1045
name: Docker CLI tests
1146
steps:
1247
- uses: actions/checkout@v4
1348

1449
- name: Build Dockerised CLI
15-
run: docker build -t sourcegraph/scip-java:latest .
50+
run: docker build -t ghcr.io/scip-code/scip-java:latest .
1651

1752
- name: Test repos
1853
shell: bash
@@ -23,7 +58,7 @@ jobs:
2358
mkdir -p ".repos/$REPO"
2459
git clone "https://github.com/$REPO.git" ".repos/$REPO" && cd ".repos/$REPO" && git submodule update --init
2560
26-
docker run -v "$PWD/.repos/$REPO:/sources" -w /sources sourcegraph/scip-java:latest scip-java index
61+
docker run -v "$PWD/.repos/$REPO:/sources" -w /sources ghcr.io/scip-code/scip-java:latest scip-java index
2762
file ".repos/$REPO/index.scip" || (echo "$REPO SCIP index doesn't exist!"; exit 1)
2863
}
2964

.github/workflows/nix.yaml

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
strategy:
4040
fail-fast: false
4141
matrix:
42-
java: [11, 17, 21]
42+
java: [17, 21, 25]
4343
steps:
4444
- uses: actions/checkout@v4
4545

@@ -107,21 +107,6 @@ jobs:
107107
- run: du -h index.scip
108108
working-directory: examples/bazel-example
109109

110-
kotlin_plugin:
111-
runs-on: ubuntu-latest
112-
name: scip-kotlinc
113-
steps:
114-
- uses: actions/checkout@v4
115-
116-
- uses: DeterminateSystems/nix-installer-action@v22
117-
with:
118-
summarize: false
119-
120-
- uses: DeterminateSystems/magic-nix-cache-action@v13
121-
122-
- name: scip-kotlinc tests
123-
run: gradle :scip-kotlinc:test --no-daemon
124-
125110
snapshots:
126111
runs-on: ubuntu-latest
127112
name: Snapshots
@@ -150,7 +135,7 @@ jobs:
150135
strategy:
151136
fail-fast: false
152137
matrix:
153-
java: [11, 17, 21]
138+
java: [17, 21, 25]
154139
steps:
155140
- uses: actions/checkout@v4
156141

@@ -169,7 +154,7 @@ jobs:
169154
printf 'SCIP_JAVA_VERSION=%s\n' "$SCIP_JAVA_VERSION" >> "$GITHUB_ENV"
170155
printf 'SCIP_JAVA_CLI=%s\n' "$PWD/scip-java/build/install/scip-java/bin/scip-java" >> "$GITHUB_ENV"
171156
172-
- run: mvn clean verify -DskipTests "-Dscip-java.version=$SCIP_JAVA_VERSION" sourcegraph:sourcegraphDependencies
157+
- run: mvn clean verify -DskipTests "-Dscip-java.version=$SCIP_JAVA_VERSION" scip:dependencies
173158
working-directory: examples/maven-example
174159

175160
- run: |

.github/workflows/release-cli.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
cd "$OUT_DIR"
3838
3939
VERSION=${VERSION#v}
40-
ARTIFACT="com.sourcegraph:scip-java:${VERSION}"
40+
ARTIFACT="org.scip-code:scip-java:${VERSION}"
4141
4242
for attempt in {1..10}; do
4343
if cs resolve "$ARTIFACT" >/dev/null 2>&1; then
@@ -57,7 +57,7 @@ jobs:
5757
--bat=true \
5858
-o scip-java \
5959
"$ARTIFACT" \
60-
--main com.sourcegraph.scip_java.ScipJava
60+
--main org.scip_code.scip_java.ScipJava
6161
6262
chmod +x scip-java
6363
./scip-java --help >/dev/null
@@ -74,11 +74,11 @@ jobs:
7474
run: |
7575
set -euo pipefail
7676
77-
if gh release view "$TAG" --repo "sourcegraph/scip-java" >/dev/null 2>&1; then
77+
if gh release view "$TAG" --repo "scip-code/scip-java" >/dev/null 2>&1; then
7878
echo "exists=true" >> "$GITHUB_OUTPUT"
7979
else
8080
echo "exists=false" >> "$GITHUB_OUTPUT"
81-
echo "GitHub release $TAG does not exist in sourcegraph/scip-java; skipping asset upload."
81+
echo "GitHub release $TAG does not exist in scip-code/scip-java; skipping asset upload."
8282
fi
8383
8484
- name: Upload release assets
@@ -96,5 +96,5 @@ jobs:
9696
"scip-java-${TAG}" \
9797
"scip-java-${TAG}.bat" \
9898
"scip-java-${TAG}.sha256" \
99-
--repo "sourcegraph/scip-java" \
99+
--repo "scip-code/scip-java" \
100100
--clobber

.github/workflows/release-docker.yaml

Lines changed: 71 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,91 @@ on:
44
branches:
55
- main
66
tags: ["*"]
7+
8+
permissions:
9+
contents: read
10+
packages: write
11+
712
jobs:
813
publish:
9-
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
include:
17+
- runner: ubuntu-latest
18+
arch: amd64
19+
- runner: ubuntu-24.04-arm
20+
arch: arm64
21+
runs-on: ${{ matrix.runner }}
1022
steps:
1123
- uses: actions/checkout@v4
1224
with:
1325
fetch-depth: 0
26+
1427
- uses: docker/setup-buildx-action@v3
15-
- name: Login to DockerHub
28+
29+
- name: Login to GitHub Container Registry
1630
uses: docker/login-action@v4
1731
with:
18-
username: ${{ secrets.DOCKER_USERNAME }}
19-
password: ${{ secrets.DOCKER_PASSWORD }}
20-
- name: Build and push Docker image
32+
registry: ghcr.io
33+
username: ${{ github.actor }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: Resolve Docker tag
37+
id: tag
2138
shell: bash
2239
run: |
2340
set -euo pipefail
2441
25-
tags=(--tag sourcegraph/scip-java:latest-snapshot)
26-
42+
image="ghcr.io/scip-code/scip-java"
2743
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
2844
version="${GITHUB_REF_NAME#v}"
29-
tags=(
30-
--tag sourcegraph/scip-java:latest
31-
--tag "sourcegraph/scip-java:${version}"
32-
)
45+
tag="${image}:${version}-${{ matrix.arch }}"
46+
else
47+
tag="${image}:latest-snapshot-${{ matrix.arch }}"
3348
fi
3449
35-
docker buildx build --push "${tags[@]}" .
50+
echo "tag=${tag}" >> "$GITHUB_OUTPUT"
51+
52+
- name: Build and push Docker image
53+
uses: docker/build-push-action@v6
54+
with:
55+
context: .
56+
push: true
57+
platforms: linux/${{ matrix.arch }}
58+
tags: ${{ steps.tag.outputs.tag }}
59+
labels: |
60+
org.opencontainers.image.source=https://github.com/scip-code/scip-java
61+
org.opencontainers.image.revision=${{ github.sha }}
62+
63+
publish-manifest:
64+
needs: publish
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: docker/setup-buildx-action@v3
68+
69+
- name: Login to GitHub Container Registry
70+
uses: docker/login-action@v3
71+
with:
72+
registry: ghcr.io
73+
username: ${{ github.actor }}
74+
password: ${{ secrets.GITHUB_TOKEN }}
75+
76+
- name: Create and push multi-arch manifest
77+
shell: bash
78+
run: |
79+
set -euo pipefail
80+
81+
image="ghcr.io/scip-code/scip-java"
82+
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
83+
version="${GITHUB_REF_NAME#v}"
84+
docker buildx imagetools create \
85+
--tag "${image}:latest" \
86+
--tag "${image}:${version}" \
87+
"${image}:${version}-amd64" \
88+
"${image}:${version}-arm64"
89+
else
90+
docker buildx imagetools create \
91+
--tag "${image}:latest-snapshot" \
92+
"${image}:latest-snapshot-amd64" \
93+
"${image}:latest-snapshot-arm64"
94+
fi

.github/workflows/release-maven.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,18 @@ jobs:
1919
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
2020
run: nix develop --command gradle --no-daemon publishToMavenCentral
2121
env:
22-
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
23-
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
22+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASSWORD }}
23+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USERNAME }}
2424
- name: Publish release ${{ github.ref }}
2525
if: ${{ startsWith(github.ref, 'refs/tags/') }}
2626
run: |
2727
version="${GITHUB_REF_NAME#v}"
2828
nix develop --command gradle --no-daemon \
2929
"-PreleaseVersion=$version" publishAndReleaseToMavenCentral
3030
env:
31-
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
32-
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
33-
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.PGP_SECRET }}
34-
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.PGP_PASSPHRASE }}
31+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASSWORD }}
32+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USERNAME }}
33+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
3534

3635
release-cli:
3736
if: ${{ startsWith(github.ref, 'refs/tags/') }}

0 commit comments

Comments
 (0)