diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 602b224dcf..a76805b4c4 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: docker login uses: docker/login-action@v2 with: diff --git a/.github/workflows/latest-bitcoind.yml b/.github/workflows/latest-bitcoind.yml index 05ada03e09..530f7a82d7 100644 --- a/.github/workflows/latest-bitcoind.yml +++ b/.github/workflows/latest-bitcoind.yml @@ -16,7 +16,7 @@ jobs: timeout-minutes: 90 steps: - name: Checkout bitcoind master - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: bitcoin/bitcoin path: bitcoin @@ -34,14 +34,14 @@ jobs: working-directory: ./bitcoin - name: Checkout eclair master - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: eclair - - name: Set up JDK 11 - uses: actions/setup-java@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 17 distribution: 'adopt' - name: Configure OS settings diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0c556c624d..591c495760 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,12 +13,12 @@ jobs: timeout-minutes: 30 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - name: Set up JDK 11 - uses: actions/setup-java@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 17 distribution: 'adopt' - name: Cache Maven dependencies @@ -31,10 +31,14 @@ jobs: - name: Configure OS settings run: echo "fs.file-max = 1024000" | sudo tee -a /etc/sysctl.conf + # github runner still use maven 3.8.8 :( + - name: Install maven 3.9.9 + run: mvn wrapper:wrapper -Dmaven="3.9.9" + # NB: we exclude external API tests from the CI, because we don't want our build to fail because a dependency is failing. # This means we won't automatically catch changes in external APIs, but developers should regularly run the test suite locally so in practice it shouldn't be a problem. - name: Build with Maven - run: mvn test-compile && mvn scoverage:report -DtagsToExclude=external-api + run: ./mvnw test-compile && ./mvnw scoverage:report -DtagsToExclude=external-api - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 diff --git a/BUILD.md b/BUILD.md index 515fd3dd87..c79ca838f7 100644 --- a/BUILD.md +++ b/BUILD.md @@ -2,7 +2,7 @@ ## Requirements -- [OpenJDK 11](https://adoptopenjdk.net/?variant=openjdk11&jvmVariant=hotspot). +- [OpenJDK 17](https://adoptium.net/temurin/releases/?version=17). - [Maven](https://maven.apache.org/download.cgi) 3.6.0 or newer ## Build diff --git a/Dockerfile b/Dockerfile index 6e98941214..27914e95f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM adoptopenjdk/openjdk11:jdk-11.0.3_7-alpine as BUILD +FROM eclipse-temurin:17-alpine as BUILD # Setup maven, we don't use https://hub.docker.com/_/maven/ as it declare .m2 as volume, we loose all mvn cache # We can alternatively do as proposed by https://github.com/carlossg/docker-maven#packaging-a-local-repository-with-the-image @@ -41,8 +41,8 @@ COPY . . RUN mvn package -pl eclair-node -am -DskipTests -Dgit.commit.id=notag -Dgit.commit.id.abbrev=notag -o # It might be good idea to run the tests here, so that the docker build fail if the code is bugged -# We currently use a debian image for runtime because of some jni-related issue with sqlite -FROM openjdk:11.0.4-jre-slim +# We currently use a ubuntu image for runtime because of some jni-related issue with sqlite +FROM eclipse-temurin:17-jre-noble WORKDIR /app # install jq for eclair-cli diff --git a/README.md b/README.md index d7cd932560..84e2609759 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ rpcclienttimeout=30 Eclair is developed in [Scala](https://www.scala-lang.org/), a powerful functional language that runs on the JVM, and is packaged as a ZIP archive. -To run Eclair, you first need to install Java, we recommend that you use [OpenJDK 11](https://adoptopenjdk.net/?variant=openjdk11&jvmVariant=hotspot). Other runtimes also work, but we don't recommend using them. +To run Eclair, you first need to install Java, we recommend that you use [OpenJDK 17](https://adoptium.net/temurin/releases/?version=17). Other runtimes also work, but we don't recommend using them. Then download our latest [release](https://github.com/ACINQ/eclair/releases), unzip the archive and run the following command: diff --git a/contrib/arm64v8.Dockerfile b/contrib/arm64v8.Dockerfile index f828828eac..d98c969d0a 100644 --- a/contrib/arm64v8.Dockerfile +++ b/contrib/arm64v8.Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:11-jdk-jammy as BUILD +FROM eclipse-temurin:17-jdk-noble as BUILD # Setup maven, we don't use https://hub.docker.com/_/maven/ as it declare .m2 as volume, we loose all mvn cache # We can alternatively do as proposed by https://github.com/carlossg/docker-maven#packaging-a-local-repository-with-the-image @@ -42,7 +42,7 @@ RUN mvn package -pl eclair-node -am -DskipTests -Dgit.commit.id=notag -Dgit.comm # It might be good idea to run the tests here, so that the docker build fail if the code is bugged # We currently use a debian image for runtime because of some jni-related issue with sqlite -FROM openjdk:11.0.4-jre-slim +FROM eclipse-temurin:17-jre-noble WORKDIR /app # install jq for eclair-cli diff --git a/docs/release-notes/eclair-vnext.md b/docs/release-notes/eclair-vnext.md index bd7013d146..c3c8dfbfc9 100644 --- a/docs/release-notes/eclair-vnext.md +++ b/docs/release-notes/eclair-vnext.md @@ -26,6 +26,11 @@ To enable CoinGrinder at all fee rates and prevent the automatic consolidation o consolidatefeerate=0 ``` +### Upgrade build and runtime platform to JDK 17 + +Eclair is now built with and targets JDK 17 and will no longer run on JDK11. + + ### Incoming obsolete channels will be rejected Eclair will not allow remote peers to open new `static_remote_key` channels. These channels are obsolete, node operators should use `option_anchors` channels now. @@ -68,7 +73,7 @@ $ sha256sum -c SHA256SUMS.stripped Eclair builds are deterministic. To reproduce our builds, please use the following environment (*): - Ubuntu 22.04 -- AdoptOpenJDK 11.0.22 +- AdoptOpenJDK 17.0.12 - Maven 3.9.2 Use the following command to generate the eclair-node package: @@ -79,7 +84,7 @@ mvn clean install -DskipTests That should generate `eclair-node/target/eclair-node--XXXXXXX-bin.zip` with sha256 checksums that match the one we provide and sign in `SHA256SUMS.asc` -(*) You may be able to build the exact same artefacts with other operating systems or versions of JDK 11, we have not tried everything. +(*) You may be able to build the exact same artefacts with other operating systems or versions of JDK 17, we have not tried everything. ## Upgrading diff --git a/pom.xml b/pom.xml index 1c3a1af499..a17289f5bc 100644 --- a/pom.xml +++ b/pom.xml @@ -65,8 +65,7 @@ 2020-01-01T00:00:00Z UTF-8 - 11 - 11 + 17 2.13.11 2.13 2.6.20 @@ -101,6 +100,11 @@ maven-jar-plugin 3.3.0 + + org.apache.maven.plugins + maven-wrapper-plugin + 3.3.2 + @@ -141,6 +145,7 @@ -Werror -unchecked -deprecation + -release:17 -Xmx1024m @@ -215,6 +220,10 @@ + + org.apache.maven.plugins + maven-wrapper-plugin + org.apache.maven.plugins