Finish adding native-linux-riscv64
architecture support
#672
Workflow file for this run
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
name: Java CI with Maven | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
name: | |
description: 'Github Actions' | |
required: true | |
default: 'Github Actions' | |
jobs: | |
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/run-on-arch-action@v2.4.0 | |
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. | |
apt-get remove -q -y openjdk-11-jdk && apt-get install -q -y openjdk-8-jdk | |
java --version |