Skip to content

Commit

Permalink
Adding multithread build test action (#3155)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-kyosev-gs authored Oct 4, 2024
1 parent fd831b1 commit f0a9b81
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/build-large-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- 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 4 install -DargLine="-Xmx12g"
env:
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/build-multi-thread.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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

0 comments on commit f0a9b81

Please sign in to comment.