Skip to content

Build (Multi thread) #2

Build (Multi thread)

Build (Multi thread) #2

name: Build (Multi thread)
on: [workflow_dispatch]
jobs:
build-large-runner:
runs-on: ubuntu-latest-4-cores
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Cache Maven dependencies
uses: actions/cache@v3
env:
cache-name: cache-mvn-deps
with:
path: ~/.m2/repository
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: "zulu"
java-version: "11"
- name: Collect Workflow Telemetry
uses: runforesight/workflow-telemetry-action@v1
with:
theme: dark
- name: Build
run: mvn -B -e -T 2 -DskipTests=true install
env:
MAVEN_OPTS: -Xmx15g
- name: Test
run: |
mvn -B -e -T 2 surefire:test -DargLine="-XX:MaxRAMPercentage=40.0" -Dsurefire.reports.directory=${GITHUB_WORKSPACE}/surefire-reports-aggregate
env:
MAVEN_OPTS: -Xmx3g