forked from openjdk/jdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/rivos/main' into rivos/merge-jdk…
…-24+12
- Loading branch information
Showing
20 changed files
with
1,008 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
set sysroot /sysroot/focal-riscv64 | ||
|
||
handle SIGILL nostop noprint | ||
handle SIGSEGV nostop noprint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# | ||
# Copyright (c) 2022, Rivos Inc. and/or its affiliates. All rights reserved. | ||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
# | ||
# This code is free software; you can redistribute it and/or modify it | ||
# under the terms of the GNU General Public License version 2 only, as | ||
# published by the Free Software Foundation. Oracle designates this | ||
# particular file as subject to the "Classpath" exception as provided | ||
# by Oracle in the LICENSE file that accompanied this code. | ||
# | ||
# This code is distributed in the hope that it will be useful, but WITHOUT | ||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
# version 2 for more details (a copy is included in the LICENSE file that | ||
# accompanied this code). | ||
# | ||
# You should have received a copy of the GNU General Public License version | ||
# 2 along with this work; if not, write to the Free Software Foundation, | ||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
# | ||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | ||
# or visit www.oracle.com if you need additional information or have any | ||
# questions. | ||
# | ||
|
||
name: 'OpenJDK Downstreaming' | ||
|
||
on: | ||
schedule: | ||
# Trigger on Sunday to Friday at 21:00 UTC (23:00 CET, 14:00 PT) | ||
# It triggers at least 9 hours before start of the working day in CET | ||
# since that's when I would want to review it. And given GHA takes a long | ||
# time to run, we want to start doing it as early as possible | ||
- cron: '0 21 * * 0-4' | ||
workflow_dispatch: | ||
inputs: {} | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
fetch-push-pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.WORKFLOW_TOKEN }} | ||
ref: 'rivos/main' | ||
fetch-depth: 0 | ||
|
||
- name: "Fetch" | ||
id: fetch | ||
run: | | ||
git remote add upstream https://github.com/openjdk/jdk.git | ||
git fetch --tags upstream master | ||
- name: "Configure" | ||
id: configure | ||
run: | | ||
TAG=$(git tag | grep --extended-regexp '^jdk\-.*' | sort --version-sort | tail --lines 1 | tr --delete '\n') | ||
test -n "$TAG" | ||
echo "tag=$TAG" >> $GITHUB_OUTPUT | ||
echo "diff=$(test -n "$(git diff rivos/main...$TAG)" && echo "true" || echo "false")" >> $GITHUB_OUTPUT | ||
- name: "Push" | ||
run: | | ||
git push origin ${{ steps.configure.outputs.tag }} | ||
if [ "${{ steps.configure.outputs.diff }}" = "true" ]; then | ||
git branch -f rivos/merge-${{ steps.configure.outputs.tag }} ${{ steps.configure.outputs.tag }} | ||
git checkout rivos/merge-${{ steps.configure.outputs.tag }} | ||
# Setup user for merge commit | ||
git config user.name "Ludovic Henry" | ||
git config user.email "ludovic@rivosinc.com" | ||
if ! git merge --no-ff --no-edit origin/rivos/main; then | ||
# Print the conflicts | ||
git diff | ||
# Abort the merge and let assignee manually resolve them | ||
git merge --abort | ||
fi | ||
git push origin rivos/merge-${{ steps.configure.outputs.tag }} | ||
fi | ||
- name: "Create PR" | ||
run: | | ||
if [ "${{ steps.configure.outputs.diff }}" = "true" ]; then | ||
gh pr create \ | ||
--repo rivosinc/jdk \ | ||
--base rivos/main \ | ||
--head rivos/merge-${{ steps.configure.outputs.tag }} \ | ||
--title "Merge ${{ steps.configure.outputs.tag }} into rivos/main" \ | ||
--body "" \ | ||
--assignee "luhenry" || true | ||
fi | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Default owners to managed runtimes team | ||
* @rivosinc/managed-runtimes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
DIST=${DIST:-focal} | ||
|
||
/sysroot/run-in.sh /sysroot/$DIST-amd64 make $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Setup | ||
|
||
## QEMU | ||
|
||
You most likely want to setup QEMU user-space emulation at the OS level to transparently execute RISC-V binaries on an x86-64 host. | ||
|
||
To do so, first install `rivos-sdk-qemu`: | ||
``` | ||
sudo apt-get update | ||
sudo apt-get install -y rivos-sdk-qemu | ||
``` | ||
|
||
Then, setup binfmt_mist with: | ||
``` | ||
docker run --privileged --rm -v /rivos:/rivos -e QEMU_BINARY_PATH=/rivos/qemu/bin tonistiigi/binfmt --install riscv64 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
DIST=${DIST:-focal} | ||
|
||
ARGS=( | ||
--with-boot-jdk=/rivos/jdk | ||
--with-zlib=system | ||
--with-sysroot=/sysroot/$DIST-amd64 | ||
--with-jmh=/workspace/jmh/build/images/jmh | ||
--with-jtreg=/workspace/jtreg/build/images/jtreg | ||
--with-hsdis=binutils --with-binutils-src=/workspace/binutils --enable-hsdis-bundling | ||
) | ||
|
||
bash configure ${ARGS[@]} $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
ARGS=( | ||
--openjdk-target=riscv64-linux-gnu | ||
--with-boot-jdk=/rivos/jdk | ||
--with-build-jdk=/rivos/jdk | ||
# --with-debug-level=slowdebug | ||
--with-zlib=system | ||
--with-sysroot=/rivos/sysroot/riscv | ||
--with-jmh=/workspace/jmh/build/images/jmh | ||
--with-jtreg=/workspace/jtreg/build/images/jtreg | ||
--with-hsdis=binutils --with-binutils-src=/workspace/binutils --enable-hsdis-bundling | ||
) | ||
|
||
bash configure ${ARGS[@]} $* |
Oops, something went wrong.