Skip to content

Commit

Permalink
Add Windows to build matrix, adjust Gradle build (#2045)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Edgar <[email protected]>
  • Loading branch information
MikeEdgar authored Oct 29, 2024
1 parent 31a9d0a commit a4d6fd1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ on:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17, 21 ]
name: build with jdk ${{matrix.java}}
os:
- ubuntu-latest
- windows-latest
java:
- 17
- 21
runs-on: ${{ matrix.os }}
name: build with jdk ${{matrix.java}} (${{ matrix.os }})

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -68,7 +73,7 @@ jobs:

## Attach target directories for safe Sonar scan in separate job
- name: Attach Build Output
if: matrix.java == '17'
if: ${{ matrix.java == '17' && matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v4
with:
name: target
Expand Down
16 changes: 13 additions & 3 deletions tools/gradle-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<properties>
<gradle.executable>./gradlew</gradle.executable>
<gradle.task>build</gradle.task>
<gradle.opts>-Xms4096M -Xmx4096M</gradle.opts>
<skip.gradle.build>false</skip.gradle.build>
<artifactFilePrefix>${project.artifactId}</artifactFilePrefix>
</properties>
Expand Down Expand Up @@ -44,6 +45,15 @@
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- copy all dependencies to target/dependencies -->
<plugin>
Expand Down Expand Up @@ -115,7 +125,7 @@
</arguments>
<environmentVariables>
<MAVEN_REPO_LOCAL>${settings.localRepository}</MAVEN_REPO_LOCAL>
<GRADLE_OPTS>${env.MAVEN_OPTS}</GRADLE_OPTS>
<GRADLE_OPTS>${gradle.opts}</GRADLE_OPTS>
</environmentVariables>
<skip>${skip.gradle.build}</skip>
</configuration>
Expand Down Expand Up @@ -234,7 +244,7 @@
</arguments>
<environmentVariables>
<MAVEN_REPO_LOCAL>${settings.localRepository}</MAVEN_REPO_LOCAL>
<GRADLE_OPTS>${env.MAVEN_OPTS}</GRADLE_OPTS>
<GRADLE_OPTS>${gradle.opts}</GRADLE_OPTS>
</environmentVariables>
<skip>${skip.gradle.build}</skip>
</configuration>
Expand Down Expand Up @@ -281,7 +291,7 @@
</arguments>
<environmentVariables>
<MAVEN_REPO_LOCAL>${settings.localRepository}</MAVEN_REPO_LOCAL>
<GRADLE_OPTS>${env.MAVEN_OPTS}</GRADLE_OPTS>
<GRADLE_OPTS>${gradle.opts}</GRADLE_OPTS>
</environmentVariables>
<skip>${skip.gradle.build}</skip>
</configuration>
Expand Down

0 comments on commit a4d6fd1

Please sign in to comment.