Skip to content

Commit 023d296

Browse files
committed
feat:canyou upgrade fix
Signed-off-by: Chen Kai <[email protected]>
1 parent 1aa3e2d commit 023d296

22 files changed

+10603
-7905
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v3
14-
- name: Set up JDK 20
14+
- name: Set up JDK 21
1515
uses: actions/setup-java@v3
1616
with:
17-
java-version: 20
17+
java-version: 21
1818
distribution: 'temurin'
1919

2020
- name: Setup Gradle

.github/workflows/pull_request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v3
11-
- name: Set up JDK 20
11+
- name: Set up JDK 21
1212
uses: actions/setup-java@v3
1313
with:
14-
java-version: 20
14+
java-version: 21
1515
distribution: 'temurin'
1616

1717
- name: Setup Gradle

.github/workflows/release.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ jobs:
3131
strategy:
3232
fail-fast: false
3333
matrix:
34-
version: [ '21.0.1' ]
3534
java-version: [ '21' ]
3635
os: [ macos-latest ]
3736

@@ -47,17 +46,17 @@ jobs:
4746
- name: ☕ Setup GraalVM Build
4847
uses: graalvm/setup-graalvm@v1
4948
with:
50-
version: ${{ matrix.version }}
5149
java-version: ${{ matrix.java-version }}
5250
github-token: ${{ secrets.GITHUB_TOKEN }}
5351
distribution: 'graalvm'
5452
cache: 'gradle'
55-
set-java-home: 'true'
5653
native-image-job-reports: 'true'
5754

5855
- name: 🏗️ Native Image Build & Test
5956
id: native-build
6057
run: |
58+
echo $JAVA_HOME
59+
echo $GRAALVM_HOME
6160
./gradlew nativeCompile
6261
mv hildr-node/build/native/nativeCompile/hildr-node hildr-node/build/native/nativeCompile/hildr-node-osx
6362
ls -ltrh hildr-node/build/native/nativeCompile/hildr-node-osx
@@ -76,7 +75,6 @@ jobs:
7675
strategy:
7776
fail-fast: false
7877
matrix:
79-
version: [ '21.0.1' ]
8078
java-version: [ '21' ]
8179
os: [ windows-latest ]
8280

@@ -92,12 +90,10 @@ jobs:
9290
- name: ☕ Setup GraalVM Build
9391
uses: graalvm/setup-graalvm@v1
9492
with:
95-
version: ${{ matrix.version }}
9693
java-version: ${{ matrix.java-version }}
9794
github-token: ${{ secrets.GITHUB_TOKEN }}
9895
distribution: 'graalvm'
9996
cache: 'gradle'
100-
set-java-home: 'true'
10197
native-image-job-reports: 'true'
10298

10399
- name: 🏗️ Native Image Build & Test
@@ -120,7 +116,6 @@ jobs:
120116
strategy:
121117
fail-fast: false
122118
matrix:
123-
version: [ '21.0.1' ]
124119
java-version: [ '21' ]
125120
os: [ ubuntu-latest ]
126121

@@ -136,12 +131,10 @@ jobs:
136131
- name: ☕ Setup GraalVM Build
137132
uses: graalvm/setup-graalvm@v1
138133
with:
139-
version: ${{ matrix.version }}
140134
java-version: ${{ matrix.java-version }}
141135
github-token: ${{ secrets.GITHUB_TOKEN }}
142136
distribution: 'graalvm'
143137
cache: 'gradle'
144-
set-java-home: 'true'
145138
native-image-job-reports: 'true'
146139

147140
- name: 🏗️ Native Image Build & Test
@@ -172,13 +165,11 @@ jobs:
172165
- name: ☕ Setup GraalVM Build
173166
uses: graalvm/setup-graalvm@v1
174167
with:
175-
version: '21.0.1'
176168
java-version: '21'
177169
distribution: 'graalvm'
178170
github-token: ${{ secrets.GITHUB_TOKEN }}
179171
cache: 'gradle'
180172
native-image-musl: 'true'
181-
set-java-home: 'true'
182173
native-image-job-reports: 'true'
183174

184175
- name: 🏗️ Build static image with musl libc
@@ -199,31 +190,42 @@ jobs:
199190
push_image_to_github:
200191
name: Push Docker image to Github
201192
runs-on: ubuntu-latest
193+
permissions: write-all
202194
steps:
203195
- name: Check out the repo
204196
uses: actions/checkout@v4
205197
- name: Log in to Docker Hub
206-
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
198+
uses: docker/login-action@v3
207199
with:
208200
registry: ${{ env.REGISTRY }}
209201
username: ${{ github.actor }}
210202
password: ${{ secrets.GITHUB_TOKEN }}
211203

212204
- name: Extract metadata (tags, labels) for Docker
213205
id: meta
214-
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
206+
uses: docker/metadata-action@v5
215207
with:
216208
images: ${{ env.REGISTRY }}/${{ github.repository }}
217209

218210
- name: Build and push Docker image
219-
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
211+
uses: docker/build-push-action@v5
220212
with:
221213
context: .
222214
file: ./docker/jvm.dock
223215
push: true
224216
tags: ${{ steps.meta.outputs.tags }}
225217
labels: ${{ steps.meta.outputs.labels }}
226218

219+
- name: Build and push graalvm native Docker image
220+
uses: docker/build-push-action@v5
221+
with:
222+
context: .
223+
file: ./docker/Dockerfile
224+
push: true
225+
tags: ${{ steps.meta.outputs.tags }}-native
226+
labels: ${{ steps.meta.outputs.labels }}-native
227+
228+
227229
release:
228230
name: 🚰 Release new version.
229231
needs: [ native-build-osx, native-build-musl, native-build-linux, native-build-windows, push_image_to_github ]

docker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This contains a simple docker setup for running hildr and op-geth.
66

77
Begin by copying `.env.default` to `.env`. You can set the network to sync to by changing the `NETWORK` value (supported options are optimism-goerli and base-goerli). Make sure to set the `L1_RPC_URL` value to a valid RPC URL for the L1 being used by the given network. If you are running in production, you may also want to set a secure `JWT_SECRET` value. You can create a new secret by running `openssl rand -hex 32`.
88

9-
To run both hildr and op-geth together, run `docker compose up`. To run just op-geth without hildr for local development, run `COMPOSE_PROFILES=op-geth,metrics docker compose up`
9+
To run both hildr and op-geth together, run `docker compose up`. To run just op-geth without hildr for local development, run `COMPOSE_PROFILES=hildr-node,op-geth,metrics docker compose up -d`
1010

1111
## Troubleshooting
1212
If you are getting `permission denied` errors when attempting to run `docker-compose`, try `sudo docker compose` instead. This is often required when running docker depending on how it was installed.

hildr-node/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ plugins {
1212
id 'application'
1313
// id "checkstyle"
1414
id "jacoco"
15-
id "com.diffplug.spotless" version "6.22.0"
15+
id "com.diffplug.spotless" version "6.23.3"
1616
id "net.ltgt.errorprone" version "3.1.0"
1717
id 'org.graalvm.buildtools.native' version '0.9.28'
1818
id 'com.github.johnrengelman.shadow' version '8.1.1'
@@ -23,7 +23,7 @@ plugins {
2323
}
2424

2525
group 'me.grapebaba'
26-
version '0.2.1'
26+
version '0.2.2'
2727

2828
repositories {
2929
// Use Maven Central for resolving dependencies.
@@ -74,7 +74,7 @@ dependencies {
7474
implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.2")
7575
implementation("com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.2")
7676

77-
implementation('org.web3j:core:4.9.8') {
77+
implementation('org.web3j:core:4.10.3') {
7878
exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on'
7979
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
8080
exclude group: 'com.squareup.okhttp3', module: 'logging-interceptor'

0 commit comments

Comments
 (0)