Build (Multi thread) #2
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: 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 |