Skip to content

Commit 6ea75a4

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

22 files changed

+10615
-7906
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: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
strategy:
3232
fail-fast: false
3333
matrix:
34-
version: [ '21.0.1' ]
34+
version: [ '22.3.2' ]
3535
java-version: [ '21' ]
3636
os: [ macos-latest ]
3737

@@ -58,16 +58,18 @@ jobs:
5858
- name: 🏗️ Native Image Build & Test
5959
id: native-build
6060
run: |
61-
./gradlew nativeCompile
62-
mv hildr-node/build/native/nativeCompile/hildr-node hildr-node/build/native/nativeCompile/hildr-node-osx
63-
ls -ltrh hildr-node/build/native/nativeCompile/hildr-node-osx
61+
echo $JAVA_HOME
62+
echo $GRAALVM_HOME
63+
./gradlew buildBinary
64+
mv hildr-node/build/binary/hildr-node hildr-node/build/binary/hildr-node-osx
65+
ls -ltrh hildr-node/build/binary/hildr-node-osx
6466
6567
- name: 📤 Upload ${{ matrix.os }} native image
6668
uses: actions/upload-artifact@v3
6769
with:
6870
name: hildr-node-osx
6971
path: |
70-
hildr-node/build/native/nativeCompile/hildr-node-osx
72+
hildr-node/build/binary/hildr-node-osx
7173
if-no-files-found: error
7274

7375
native-build-windows:
@@ -76,7 +78,7 @@ jobs:
7678
strategy:
7779
fail-fast: false
7880
matrix:
79-
version: [ '21.0.1' ]
81+
version: [ '22.3.2' ]
8082
java-version: [ '21' ]
8183
os: [ windows-latest ]
8284

@@ -103,15 +105,15 @@ jobs:
103105
- name: 🏗️ Native Image Build & Test
104106
id: native-build
105107
run: |
106-
./gradlew nativeCompile
107-
ls -ltrh hildr-node/build/native/nativeCompile/hildr-node.exe
108+
./gradlew buildBinary
109+
ls -ltrh hildr-node/build/binary/hildr-node.exe
108110
109111
- name: 📤 Upload ${{ matrix.os }} native image
110112
uses: actions/upload-artifact@v3
111113
with:
112114
name: hildr-node-windows
113115
path: |
114-
hildr-node/build/native/nativeCompile/hildr-node.exe
116+
hildr-node/build/binary/hildr-node.exe
115117
if-no-files-found: error
116118

117119
native-build-linux:
@@ -120,7 +122,7 @@ jobs:
120122
strategy:
121123
fail-fast: false
122124
matrix:
123-
version: [ '21.0.1' ]
125+
version: [ '22.3.2' ]
124126
java-version: [ '21' ]
125127
os: [ ubuntu-latest ]
126128

@@ -172,14 +174,14 @@ jobs:
172174
- name: ☕ Setup GraalVM Build
173175
uses: graalvm/setup-graalvm@v1
174176
with:
175-
version: '21.0.1'
177+
version: '22.3.2'
176178
java-version: '21'
177179
distribution: 'graalvm'
178180
github-token: ${{ secrets.GITHUB_TOKEN }}
179181
cache: 'gradle'
180182
native-image-musl: 'true'
181-
set-java-home: 'true'
182183
native-image-job-reports: 'true'
184+
set-java-home: 'true'
183185

184186
- name: 🏗️ Build static image with musl libc
185187
id: native-build
@@ -199,31 +201,42 @@ jobs:
199201
push_image_to_github:
200202
name: Push Docker image to Github
201203
runs-on: ubuntu-latest
204+
permissions: write-all
202205
steps:
203206
- name: Check out the repo
204207
uses: actions/checkout@v4
205208
- name: Log in to Docker Hub
206-
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
209+
uses: docker/login-action@v3
207210
with:
208211
registry: ${{ env.REGISTRY }}
209212
username: ${{ github.actor }}
210213
password: ${{ secrets.GITHUB_TOKEN }}
211214

212215
- name: Extract metadata (tags, labels) for Docker
213216
id: meta
214-
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
217+
uses: docker/metadata-action@v5
215218
with:
216219
images: ${{ env.REGISTRY }}/${{ github.repository }}
217220

218221
- name: Build and push Docker image
219-
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
222+
uses: docker/build-push-action@v5
220223
with:
221224
context: .
222225
file: ./docker/jvm.dock
223226
push: true
224227
tags: ${{ steps.meta.outputs.tags }}
225228
labels: ${{ steps.meta.outputs.labels }}
226229

230+
- name: Build and push graalvm native Docker image
231+
uses: docker/build-push-action@v5
232+
with:
233+
context: .
234+
file: ./docker/Dockerfile
235+
push: true
236+
tags: ${{ steps.meta.outputs.tags }}-native
237+
labels: ${{ steps.meta.outputs.labels }}-native
238+
239+
227240
release:
228241
name: 🚰 Release new version.
229242
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)