-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add native-linux-riscv64 package #111
Merged
hyperxpro
merged 10 commits into
hyperxpro:riscv64
from
luhenry:dev/ludovic/port-riscv64
Oct 25, 2023
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f38a0a2
Add native-linux-riscv64 package
luhenry b569e95
Target jdk8 when compiling on JDK 9+
luhenry 9ac5fd4
Use Ubuntu 22.04 for JDK 21
luhenry 02b3f18
Add JDK 11 and 17 builds
luhenry 837b65e
Use latest JDK 21 from Adoptium
luhenry ace44cb
Also run tests with JDK 8 when compiling with JDK 11 and 17
luhenry 734ba82
Upload Linux-riscv64-Build-JDK11 artifacts
luhenry 74cb45e
trigger ci
luhenry fe69b9b
Test riscv64 JDK 11 build on aarch64 with JDK 8
luhenry 4f1d55f
Revert parts of "Also run tests with JDK 8 when compiling with JDK 11…
luhenry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -26,7 +26,7 @@ jobs: | |
java-version: 8 | ||
architecture: x64 | ||
- name: Build with Maven | ||
run: mvn -B -ntp clean package --file pom.xml | ||
run: mvn -B --show-version -ntp clean package --file pom.xml | ||
- name: Upload the build | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
|
@@ -44,7 +44,7 @@ jobs: | |
java-version: 11 | ||
architecture: x64 | ||
- name: Build with Maven | ||
run: mvn -B -ntp clean package --file pom.xml | ||
run: mvn -B --show-version -ntp --file pom.xml clean package | ||
|
||
MacOS-x86_64-Build-JDK17: | ||
runs-on: macos-latest | ||
|
@@ -57,7 +57,7 @@ jobs: | |
java-version: 17 | ||
architecture: x64 | ||
- name: Build with Maven | ||
run: mvn -B -ntp clean package --file pom.xml | ||
run: mvn -B --show-version -ntp --file pom.xml clean package | ||
|
||
Linux-x86_64-Build-JDK8: | ||
runs-on: ubuntu-latest | ||
|
@@ -98,7 +98,7 @@ jobs: | |
restore-keys: | | ||
${{ runner.os }}-pr-${{ env.cache-name }}- | ||
${{ runner.os }}-pr- | ||
- uses: uraimo/run-on-arch-action@v2.3.0 | ||
- uses: uraimo/run-on-arch-action@v2.4.0 | ||
name: Run commands | ||
id: runcmd | ||
with: | ||
|
@@ -125,7 +125,7 @@ jobs: | |
run: | | ||
export JAVA_HOME="/jdk" | ||
chmod +x ./mvnw | ||
./mvnw -B -ntp clean package | ||
./mvnw -B --show-version -ntp clean package | ||
|
||
- name: Upload the build | ||
uses: actions/upload-artifact@v3 | ||
|
@@ -145,7 +145,7 @@ jobs: | |
key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pr-${{ matrix.arch }}-pr-${{ env.cache-name }}-pr- | ||
- uses: uraimo/run-on-arch-action@v2.3.0 | ||
- uses: uraimo/run-on-arch-action@v2.4.0 | ||
name: Run commands | ||
id: runcmd | ||
with: | ||
|
@@ -172,7 +172,7 @@ jobs: | |
run: | | ||
export JAVA_HOME="/jdk" | ||
chmod +x ./mvnw | ||
./mvnw -B -ntp clean package | ||
./mvnw -B --show-version -ntp clean package | ||
|
||
Linux-Aarch64-Build-JDK17: | ||
runs-on: ubuntu-latest | ||
|
@@ -186,7 +186,7 @@ jobs: | |
key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pr-${{ matrix.arch }}-pr-${{ env.cache-name }}-pr- | ||
- uses: uraimo/run-on-arch-action@v2.3.0 | ||
- uses: uraimo/run-on-arch-action@v2.4.0 | ||
name: Run commands | ||
id: runcmd | ||
with: | ||
|
@@ -214,7 +214,7 @@ jobs: | |
export MAVEN_OPTS="-Djdk.lang.Process.launchMechanism=vfork" | ||
export JAVA_HOME="/jdk" | ||
chmod +x ./mvnw | ||
./mvnw -B -ntp clean package | ||
./mvnw -B --show-version -ntp clean package | ||
|
||
Linux-ArmV7-Build-JDK8: | ||
runs-on: ubuntu-latest | ||
|
@@ -228,7 +228,7 @@ jobs: | |
key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pr-${{ matrix.arch }}-pr-${{ env.cache-name }}-pr- | ||
- uses: uraimo/run-on-arch-action@v2.3.0 | ||
- uses: uraimo/run-on-arch-action@v2.4.0 | ||
name: Run commands | ||
id: runcmd | ||
with: | ||
|
@@ -255,7 +255,7 @@ jobs: | |
run: | | ||
export JAVA_HOME="/jdk" | ||
chmod +x ./mvnw | ||
./mvnw -B -ntp clean package | ||
./mvnw -B --show-version -ntp clean package | ||
|
||
- name: Upload the build | ||
uses: actions/upload-artifact@v3 | ||
|
@@ -275,7 +275,7 @@ jobs: | |
key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pr-${{ matrix.arch }}-pr-${{ env.cache-name }}-pr- | ||
- uses: uraimo/run-on-arch-action@v2.3.0 | ||
- uses: uraimo/run-on-arch-action@v2.4.0 | ||
name: Run commands | ||
id: runcmd | ||
with: | ||
|
@@ -302,7 +302,7 @@ jobs: | |
run: | | ||
export JAVA_HOME="/jdk" | ||
chmod +x ./mvnw | ||
./mvnw -B -ntp clean package | ||
./mvnw -B --show-version -ntp clean package | ||
|
||
Linux-s390x-Build-JDK8: | ||
runs-on: ubuntu-latest | ||
|
@@ -316,7 +316,7 @@ jobs: | |
key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pr-${{ matrix.arch }}-pr-${{ env.cache-name }}-pr- | ||
- uses: uraimo/run-on-arch-action@v2.3.0 | ||
- uses: uraimo/run-on-arch-action@v2.4.0 | ||
name: Run commands | ||
id: runcmd | ||
with: | ||
|
@@ -339,7 +339,7 @@ jobs: | |
|
||
run: | | ||
chmod +x ./mvnw | ||
./mvnw -B -ntp clean package | ||
./mvnw -B --show-version -ntp clean package | ||
|
||
- name: Upload the build | ||
uses: actions/upload-artifact@v3 | ||
|
@@ -359,7 +359,7 @@ jobs: | |
key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pr-${{ matrix.arch }}-pr-${{ env.cache-name }}-pr- | ||
- uses: uraimo/run-on-arch-action@v2.3.0 | ||
- uses: uraimo/run-on-arch-action@v2.4.0 | ||
name: Run commands | ||
id: runcmd | ||
with: | ||
|
@@ -382,7 +382,160 @@ jobs: | |
|
||
run: | | ||
chmod +x ./mvnw | ||
./mvnw -B -ntp clean package | ||
./mvnw -B --show-version -ntp clean package | ||
|
||
Linux-riscv64-Build-JDK11: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-m2-repository-${{ runner.os }}-jdk11-riscv64 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pr-${{ matrix.arch }}-pr-${{ env.cache-name }}-pr- | ||
|
||
- uses: uraimo/[email protected] | ||
name: Run commands | ||
id: runcmd | ||
with: | ||
arch: riscv64 | ||
distro: ubuntu20.04 | ||
|
||
# Not required, but speeds up builds by storing container images in | ||
# a GitHub package registry. | ||
githubToken: ${{ github.token }} | ||
|
||
# Mount the .m2/repository | ||
dockerRunArgs: | | ||
--platform linux/riscv64 | ||
--volume "/home/runner/.m2/repository/:/root/.m2/repository" | ||
# Install dependencies | ||
install: | | ||
apt-get update | ||
apt-get install -q -y curl gnupg2 autoconf automake libtool make tar git cmake build-essential openjdk-11-jdk | ||
|
||
run: | | ||
export MAVEN_OPTS="-Djdk.lang.Process.launchMechanism=vfork" | ||
chmod +x ./mvnw | ||
./mvnw -B --show-version -ntp clean package | ||
|
||
- uses: uraimo/[email protected] | ||
name: Test on JDK 8 | ||
id: test | ||
with: | ||
arch: aarch64 | ||
distro: ubuntu20.04 | ||
|
||
# Not required, but speeds up builds by storing container images in | ||
# a GitHub package registry. | ||
githubToken: ${{ github.token }} | ||
|
||
# Mount the .m2/repository | ||
dockerRunArgs: | | ||
--platform linux/aarch64 | ||
--volume "/home/runner/.m2/repository/:/root/.m2/repository" | ||
|
||
# Install dependencies | ||
install: | | ||
apt-get update | ||
apt-get install -q -y curl gnupg2 autoconf automake libtool make tar git cmake build-essential openjdk-8-jdk | ||
|
||
run: | | ||
export MAVEN_OPTS="-Djdk.lang.Process.launchMechanism=vfork" | ||
chmod +x ./mvnw | ||
# Build native-linux-aarch64 only | ||
./mvnw -B --show-version -ntp clean package -pl :native-linux-aarch64 -DskipTests | ||
# Test with JDK 8 | ||
./mvnw -B --show-version -ntp surefire:test | ||
|
||
# RISC-V doesn't upload the JDK 8 build because JDK 8 doesn't exist on RISC-V. Instead, we upload | ||
# the JDK 11 build. It should work on JDK 8 as well, as we are testing it on all other platforms. | ||
- name: Upload the build | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Linux-riscv64-Build-JDK11 | ||
path: /home/runner/work/Brotli4j/ | ||
|
||
Linux-riscv64-Build-JDK17: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-m2-repository-${{ runner.os }}-jdk17-riscv64 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pr-${{ matrix.arch }}-pr-${{ env.cache-name }}-pr- | ||
- uses: uraimo/[email protected] | ||
name: Run commands | ||
id: runcmd | ||
with: | ||
arch: riscv64 | ||
distro: ubuntu20.04 | ||
|
||
# Not required, but speeds up builds by storing container images in | ||
# a GitHub package registry. | ||
githubToken: ${{ github.token }} | ||
|
||
# Mount the .m2/repository | ||
dockerRunArgs: | | ||
--platform linux/riscv64 | ||
--volume "/home/runner/.m2/repository/:/root/.m2/repository" | ||
# Install dependencies | ||
install: | | ||
apt-get update | ||
apt-get install -q -y curl gnupg2 autoconf automake libtool make tar git cmake build-essential openjdk-17-jdk | ||
|
||
run: | | ||
export MAVEN_OPTS="-Djdk.lang.Process.launchMechanism=vfork" | ||
chmod +x ./mvnw | ||
./mvnw -B --show-version -ntp clean package | ||
|
||
Linux-riscv64-Build-JDK21: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-m2-repository-${{ runner.os }}-jdk21-riscv64 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pr-${{ matrix.arch }}-pr-${{ env.cache-name }}-pr- | ||
- uses: uraimo/[email protected] | ||
name: Run commands | ||
id: runcmd | ||
with: | ||
arch: riscv64 | ||
distro: ubuntu22.04 | ||
luhenry marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Not required, but speeds up builds by storing container images in | ||
# a GitHub package registry. | ||
githubToken: ${{ github.token }} | ||
|
||
# Mount the .m2/repository | ||
dockerRunArgs: | | ||
--platform linux/riscv64 | ||
--volume "/home/runner/.m2/repository/:/root/.m2/repository" | ||
|
||
# Install dependencies | ||
install: | | ||
apt-get update | ||
apt-get install -q -y curl gnupg2 autoconf automake libtool make tar git cmake build-essential | ||
|
||
curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh | ||
jabba install 21-custom=tgz+https://api.adoptium.net/v3/binary/latest/21/ea/linux/riscv64/jdk/hotspot/normal/eclipse?project=jdk -o /jdk | ||
|
||
run: | | ||
export JAVA_HOME="/jdk" | ||
luhenry marked this conversation as resolved.
Show resolved
Hide resolved
|
||
chmod +x ./mvnw | ||
./mvnw -B --show-version -ntp clean package | ||
|
||
Windows-x86_64-Build-JDK8: | ||
runs-on: windows-latest | ||
|
@@ -397,7 +550,7 @@ jobs: | |
- name: Enable Developer Command Prompt | ||
uses: ilammy/[email protected] | ||
- name: Build with Maven | ||
run: mvn -B -ntp clean package --file pom.xml | ||
run: mvn -B --show-version -ntp clean package --file pom.xml | ||
- name: Upload the build | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
|
@@ -418,7 +571,7 @@ jobs: | |
- name: Enable Developer Command Prompt | ||
uses: ilammy/[email protected] | ||
- name: Build with Maven | ||
run: mvn -B -ntp clean package --file pom.xml | ||
run: mvn -B --show-version -ntp --file pom.xml clean package | ||
|
||
Windows-x86_64-Build-JDK17: | ||
runs-on: windows-latest | ||
|
@@ -433,4 +586,4 @@ jobs: | |
- name: Enable Developer Command Prompt | ||
uses: ilammy/[email protected] | ||
- name: Build with Maven | ||
run: mvn -B -ntp clean package --file pom.xml | ||
run: mvn -B --show-version -ntp --file pom.xml clean package |
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
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
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we do this, it will compile
native-linux-aarch64
and run its tests notnative-linux-riscv64
.I guess this is not easily achievable, let me think of something. I will do a direct push.