diff --git a/.github/workflows/mandrel.yml b/.github/workflows/mandrel.yml new file mode 100644 index 000000000000..37def0826921 --- /dev/null +++ b/.github/workflows/mandrel.yml @@ -0,0 +1,47 @@ +name: Mandrel-Quarkus tests + +on: + push: + paths-ignore: + - '.github/workflows/main.yml' + - '.github/workflows/quarkus.yml' + - '**.md' + pull_request: + paths-ignore: + - '.github/workflows/main.yml' + - '.github/workflows/quarkus.yml' + - '**.md' + workflow_dispatch: + +# The following aims to reduce CI CPU cycles by: +# 1. Cancelling any previous builds of this PR when pushing new changes to it +# 2. Cancelling any previous builds of a branch when pushing new changes to it in a fork +# 3. Cancelling any pending builds, but not active ones, when pushing to a branch in the main +# repository. This prevents us from constantly cancelling CI runs, while being able to skip +# intermediate builds. E.g., if we perform two pushes the first one will start a CI job and +# the second one will add another one to the queue; if we perform a third push while the +# first CI job is still running the previously queued CI job (for the second push) will be +# cancelled and a new CI job will be queued for the latest (third) push. +concurrency: + group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}" + cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'graalvm/mandrel' }} + +jobs: + q-main-ea: + name: "Q main M 23.1 EA" + uses: graalvm/mandrel/.github/workflows/base.yml@default + with: + quarkus-version: "main" + repo: ${{ github.repository }} + version: ${{ github.ref }} + mandrel-packaging-version: "23.1" + jdk: "21/ea" + q-main-ea-win: + name: "Q main M 23.1 windows EA" + uses: graalvm/mandrel/.github/workflows/base-windows.yml@default + with: + quarkus-version: "main" + repo: ${{ github.repository }} + version: ${{ github.ref }} + mandrel-packaging-version: "23.1" + jdk: "21/ea" diff --git a/.github/workflows/quarkus.yml b/.github/workflows/quarkus.yml index 5a92174e957c..ec3e1a33dda4 100644 --- a/.github/workflows/quarkus.yml +++ b/.github/workflows/quarkus.yml @@ -84,7 +84,7 @@ jobs: shell: bash run: tar -czvf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) $(basename ${GRAALVM_HOME}) - name: Persist GraalVM build - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: graalvm path: graalvm.tgz @@ -102,7 +102,7 @@ jobs: shell: bash run: tar -czvf maven-repo.tgz -C ~ .m2/repository - name: Persist Maven Repo - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: maven-repo path: maven-repo.tgz @@ -120,7 +120,7 @@ jobs: steps: - name: Download GraalVM build if: startsWith(matrix.os-name, 'ubuntu') - uses: actions/download-artifact@v1 + uses: actions/download-artifact@v3 with: name: graalvm path: . @@ -141,7 +141,7 @@ jobs: run: ${QUARKUS_PATH}/.github/ci-prerequisites.sh - name: Download Maven Repo if: startsWith(matrix.os-name, 'ubuntu') - uses: actions/download-artifact@v1 + uses: actions/download-artifact@v3 with: name: maven-repo path: . @@ -168,7 +168,7 @@ jobs: shell: bash run: find . -type d -name '*-reports' -o -wholename '*/build/reports/tests/functionalTest' | tar -czf test-reports.tgz -T - - name: Upload failure Archive (if maven failed) - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 if: failure() with: name: test-reports-native-${{matrix.category}} diff --git a/README-Mandrel.md b/README-Mandrel.md new file mode 100644 index 000000000000..ab1b6f7b8323 --- /dev/null +++ b/README-Mandrel.md @@ -0,0 +1,76 @@ +# Mandrel + +Mandrel is [a downstream distribution of the GraalVM community edition](https://developers.redhat.com/blog/2020/06/05/mandrel-a-community-distribution-of-graalvm-for-the-red-hat-build-of-quarkus/). +Mandrel's main goal is to provide a `native-image` release specifically to support [Quarkus](https://quarkus.io). +The aim is to align the `native-image` capabilities from GraalVM with OpenJDK and Red Hat Enterprise Linux libraries to improve maintainability for native Quarkus applications. +Mandrel can best be described as a distribution of a regular OpenJDK with a specially packaged GraalVM Native Image builder (`native-image`). + +## How Does Mandrel Differ From Graal + +Mandrel releases are built from a code base derived from the upstream GraalVM code base, with only minor changes but some significant exclusions. +A full distribution of GraalVM is much more than `native-image`: it has polyglot support, the Truffle framework which allows for efficient implementation of interpreters, an LLVM compiler back end for native image, the libgraal JIT compiler as a replacement for Hotspot’s C2 server compiler and much more. +Mandrel is the small subset of that functionality we support for the `native-image` use-case. + +Mandrel's `native-image` also doesn't include the following features: +* The experimental image-build server, i.e., the `--experimental-build-server` option. +* The LLVM backend, i.e., the `-H:CompilerBackend=llvm` option. +* The musl libc implementation, i.e., the `--libc=musl` option. +* Support for generating static native images, i.e., the `--static` option. +* Support for non JVM-based languages and polyglot, i.e., the `--language:` option. + +Mandrel is also built slightly differently to GraalVM, using the standard OpenJDK project release of jdk17u and jdk20. +This means it does not profit from a few small enhancements that Oracle have added to the version of OpenJDK used to build their own GraalVM downloads. +Most of these enhancements are to the JVMCI module that allows the Graal compiler to be run inside OpenJDK. +The others are small cosmetic changes to behaviour. +These enhancements may in some cases cause minor differences in the progress of native image generation. +They should not cause the resulting images themselves to execute in a noticeably different manner. + +## Communication Channels + +* [Slack](https://www.graalvm.org/slack-invitation) - Join `#mandrel` channel at graalvm's slack workspace +* [graalvm-dev@oss.oracle.com](mailto:graalvm-dev@oss.oracle.com?subject=[MANDREL]) mailing list - Subscribe [here](https://oss.oracle.com/mailman/listinfo/graalvm-dev) +* [GitHub issues](https://github.com/graalvm/mandrel/issues) for bug reports, questions, or requests for enhancements. + +Please report security vulnerabilities according to the [Reporting Vulnerabilities guide](https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html). + +## Getting Started + +Mandrel distributions can be downloaded from [the repository's releases](https://github.com/graalvm/mandrel/releases) +and container images are available at [quay.io](https://quay.io/repository/quarkus/ubi-quarkus-mandrel-builder-image?tag=latest&tab=tags). + +### Prerequisites + +Mandrel's `native-image` depends on the following packages: +* freetype-devel +* gcc +* glibc-devel +* libstdc++-static +* zlib-devel + +On Fedora/CentOS/RHEL they can be installed with: +```bash +dnf install glibc-devel zlib-devel gcc freetype-devel libstdc++-static +``` + +**Note**: The package might be called `glibc-static` or `libstdc++-devel` instead of `libstdc++-static` depending on your system. +If the system is missing stdc++, `gcc-c++` package is needed too. + +On Ubuntu-like systems with: +```bash +apt install g++ zlib1g-dev libfreetype6-dev +``` + +## Building Mandrel From Source + +For building Mandrel from source please see [mandrel-packaging](https://github.com/graalvm/mandrel-packaging) +and consult [Repository Structure in CONTRIBUTING.md](CONTRIBUTING.md#repository-structure) regarding which branch of Mandrel to use. + +# Community +Empowering Software Development with Works on Arm Initiative +![Works on Arm logo](img/works_on_arm_900x77.png) +[Works on Arm](https://www.arm.com/solutions/infrastructure/works-on-arm) is a strategic initiative to enable and accelerate the +software ecosystem for Arm64. + +[GraalVM's](https://www.graalvm.org/) [Mandrel](https://github.com/graalvm/mandrel) distribution that +powers [Quarkus Native](https://quarkus.io/guides/building-native-image) proudly counts itself among the libraries and +tools that successfully leveraged the resources from Works on Arm. diff --git a/compiler/mx.compiler/suite.py b/compiler/mx.compiler/suite.py index 63e20767254d..b9f23c54753e 100644 --- a/compiler/mx.compiler/suite.py +++ b/compiler/mx.compiler/suite.py @@ -4,8 +4,8 @@ "sourceinprojectwhitelist" : [], "groupId" : "org.graalvm.compiler", - "version" : "23.1.0", - "release" : True, + "version" : "23.1.0.0", + "release" : False, "url" : "http://www.graalvm.org/", "developer" : { "name" : "GraalVM Development", diff --git a/espresso/mx.espresso/suite.py b/espresso/mx.espresso/suite.py index fc490aa0c73b..e39ec7243b35 100644 --- a/espresso/mx.espresso/suite.py +++ b/espresso/mx.espresso/suite.py @@ -23,8 +23,8 @@ suite = { "mxversion": "6.44.0", "name": "espresso", - "version" : "23.1.0", - "release" : True, + "version" : "23.1.0.0", + "release" : False, "groupId" : "org.graalvm.espresso", "url" : "https://www.graalvm.org/reference-manual/java-on-truffle/", "developer" : { diff --git a/regex/mx.regex/suite.py b/regex/mx.regex/suite.py index b39ab3bf1d8c..e749475522d1 100644 --- a/regex/mx.regex/suite.py +++ b/regex/mx.regex/suite.py @@ -43,8 +43,8 @@ "name" : "regex", - "version" : "23.1.0", - "release" : True, + "version" : "23.1.0.0", + "release" : False, "groupId" : "org.graalvm.regex", "url" : "http://www.graalvm.org/", "developer" : { diff --git a/sdk/mx.sdk/suite.py b/sdk/mx.sdk/suite.py index e463cce1e058..9103a7ea5b51 100644 --- a/sdk/mx.sdk/suite.py +++ b/sdk/mx.sdk/suite.py @@ -41,8 +41,8 @@ suite = { "mxversion": "6.39.0", "name" : "sdk", - "version" : "23.1.0", - "release" : True, + "version" : "23.1.0.0", + "release" : False, "sourceinprojectwhitelist" : [], "url" : "https://github.com/oracle/graal", "groupId" : "org.graalvm.sdk", diff --git a/substratevm/mx.substratevm/suite.py b/substratevm/mx.substratevm/suite.py index 3922aa419145..1324877cece8 100644 --- a/substratevm/mx.substratevm/suite.py +++ b/substratevm/mx.substratevm/suite.py @@ -2,8 +2,8 @@ suite = { "mxversion": "6.27.1", "name": "substratevm", - "version" : "23.1.0", - "release" : True, + "version" : "23.1.0.0", + "release" : False, "url" : "https://github.com/oracle/graal/tree/master/substratevm", "groupId" : "org.graalvm.nativeimage", diff --git a/tools/mx.tools/suite.py b/tools/mx.tools/suite.py index e2c40dd07575..c5dd5fe26a4e 100644 --- a/tools/mx.tools/suite.py +++ b/tools/mx.tools/suite.py @@ -26,8 +26,8 @@ "defaultLicense" : "GPLv2-CPE", "groupId" : "org.graalvm.tools", - "version" : "23.1.0", - "release" : True, + "version" : "23.1.0.0", + "release" : False, "url" : "http://openjdk.java.net/projects/graal", "developer" : { "name" : "GraalVM Development", diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index 6686c1cbb85b..77a7d8f303c2 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -41,8 +41,8 @@ suite = { "mxversion": "6.39.0", "name" : "truffle", - "version" : "23.1.0", - "release" : True, + "version" : "23.1.0.0", + "release" : False, "groupId" : "org.graalvm.truffle", "sourceinprojectwhitelist" : [], "url" : "http://openjdk.java.net/projects/graal", diff --git a/vm/mx.vm/suite.py b/vm/mx.vm/suite.py index b5a69ea9e125..5552e0ebc322 100644 --- a/vm/mx.vm/suite.py +++ b/vm/mx.vm/suite.py @@ -1,6 +1,6 @@ suite = { "name": "vm", - "version" : "23.1.0", + "version" : "23.1.0.0", "mxversion": "6.41.0", "release" : True, "groupId" : "org.graalvm", diff --git a/wasm/mx.wasm/suite.py b/wasm/mx.wasm/suite.py index 4751ad79cc08..50b51d4e7660 100644 --- a/wasm/mx.wasm/suite.py +++ b/wasm/mx.wasm/suite.py @@ -42,7 +42,7 @@ "mxversion": "6.41.0", "name" : "wasm", "groupId" : "org.graalvm.wasm", - "version" : "23.1.0", + "version" : "23.1.0.0", "versionConflictResolution" : "latest", "url" : "http://graalvm.org/", "developer" : {