Skip to content

Commit

Permalink
feat:canyou upgrade fix
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Kai <281165273grape@gmail.com>
  • Loading branch information
GrapeBaBa committed Dec 15, 2023
1 parent 1aa3e2d commit e947510
Show file tree
Hide file tree
Showing 22 changed files with 10,607 additions and 7,902 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 20
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 20
java-version: 21
distribution: 'temurin'

- name: Setup Gradle
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 20
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 20
java-version: 21
distribution: 'temurin'

- name: Setup Gradle
Expand Down
31 changes: 20 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [ '21.0.1' ]
version: [ '22.3.2' ]
java-version: [ '21' ]
os: [ macos-latest ]

Expand All @@ -52,12 +52,13 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
distribution: 'graalvm'
cache: 'gradle'
set-java-home: 'true'
native-image-job-reports: 'true'

- name: 🏗️ Native Image Build & Test
id: native-build
run: |
echo $JAVA_HOME
echo $GRAALVM_HOME
./gradlew nativeCompile
mv hildr-node/build/native/nativeCompile/hildr-node hildr-node/build/native/nativeCompile/hildr-node-osx
ls -ltrh hildr-node/build/native/nativeCompile/hildr-node-osx
Expand All @@ -76,7 +77,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [ '21.0.1' ]
version: [ '22.3.2' ]
java-version: [ '21' ]
os: [ windows-latest ]

Expand All @@ -97,7 +98,6 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
distribution: 'graalvm'
cache: 'gradle'
set-java-home: 'true'
native-image-job-reports: 'true'

- name: 🏗️ Native Image Build & Test
Expand All @@ -120,7 +120,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [ '21.0.1' ]
version: [ '22.3.2' ]
java-version: [ '21' ]
os: [ ubuntu-latest ]

Expand All @@ -141,7 +141,6 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
distribution: 'graalvm'
cache: 'gradle'
set-java-home: 'true'
native-image-job-reports: 'true'

- name: 🏗️ Native Image Build & Test
Expand Down Expand Up @@ -172,13 +171,12 @@ jobs:
- name: ☕ Setup GraalVM Build
uses: graalvm/setup-graalvm@v1
with:
version: '21.0.1'
version: '22.3.2'
java-version: '21'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: 'gradle'
native-image-musl: 'true'
set-java-home: 'true'
native-image-job-reports: 'true'

- name: 🏗️ Build static image with musl libc
Expand All @@ -199,31 +197,42 @@ jobs:
push_image_to_github:
name: Push Docker image to Github
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

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

- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/jvm.dock
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Build and push graalvm native Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}-native
labels: ${{ steps.meta.outputs.labels }}-native


release:
name: 🚰 Release new version.
needs: [ native-build-osx, native-build-musl, native-build-linux, native-build-windows, push_image_to_github ]
Expand Down
2 changes: 1 addition & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This contains a simple docker setup for running hildr and op-geth.

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`.

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`
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`

## Troubleshooting
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.
6 changes: 3 additions & 3 deletions hildr-node/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {
id 'application'
// id "checkstyle"
id "jacoco"
id "com.diffplug.spotless" version "6.22.0"
id "com.diffplug.spotless" version "6.23.3"
id "net.ltgt.errorprone" version "3.1.0"
id 'org.graalvm.buildtools.native' version '0.9.28'
id 'com.github.johnrengelman.shadow' version '8.1.1'
Expand All @@ -23,7 +23,7 @@ plugins {
}

group 'me.grapebaba'
version '0.2.1'
version '0.2.2'

repositories {
// Use Maven Central for resolving dependencies.
Expand Down Expand Up @@ -74,7 +74,7 @@ dependencies {
implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.2")
implementation("com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.2")

implementation('org.web3j:core:4.9.8') {
implementation('org.web3j:core:4.10.3') {
exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on'
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
exclude group: 'com.squareup.okhttp3', module: 'logging-interceptor'
Expand Down
Loading

0 comments on commit e947510

Please sign in to comment.