Skip to content

Commit

Permalink
Build testsuite/data module in separate job, build release w/JDK 17
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Edgar <[email protected]>
  • Loading branch information
MikeEdgar committed Nov 23, 2023
1 parent c5d137e commit bf0f112
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 70 deletions.
34 changes: 30 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,35 @@ on:
- 'README*'

jobs:
build-test-data:
runs-on: ubuntu-latest
name: build test data app
steps:
- uses: actions/checkout@v4
name: checkout

- uses: actions/setup-java@v3
name: set up jdk 17
with:
distribution: 'temurin'
java-version: '17'

- name: maven cache
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: build with maven
run: mvn -B formatter:validate impsort:check install -pl 'testsuite/data'

build:
runs-on: ubuntu-latest
needs: build-test-data
strategy:
matrix:
java: [ 11, 17 ]
java: [ 11, 17, 21 ]
name: build with jdk ${{matrix.java}}

steps:
Expand All @@ -51,7 +75,7 @@ jobs:
restore-keys: ${{ runner.os }}-m2

- name: build with maven
run: mvn -B formatter:validate impsort:check install -Pcoverage -Pgradle-smoke-test
run: mvn -B formatter:validate impsort:check install -pl '!testsuite/data' -Pcoverage -Pgradle-smoke-test

## Store information about the build context for Sonar scan in separate job
- name: Save Build Context
Expand All @@ -78,6 +102,7 @@ jobs:
javadoc:
name: verify javadocs
runs-on: ubuntu-latest
needs: build-test-data
steps:
- uses: actions/checkout@v4
name: checkout
Expand All @@ -96,10 +121,11 @@ jobs:
restore-keys: ${{ runner.os }}-m2

- name: generate javadocs
run: mvn -B install javadoc:javadoc -DskipTests
run: mvn -B install javadoc:javadoc -pl '!testsuite/data' -DskipTests

tck-reporting:
runs-on: ubuntu-latest
needs: build-test-data
strategy:
matrix:
include:
Expand All @@ -126,7 +152,7 @@ jobs:
restore-keys: ${{ runner.os }}-m2

- name: build with maven
run: mvn -B -pl '!testsuite/extra,!tools,!tools/gradle-plugin,!tools/maven-plugin,!ui,!ui/open-api-ui,!ui/open-api-ui-forms' install -DskipTests
run: mvn -B install -pl '!testsuite/data,!testsuite/extra,!tools,!tools/gradle-plugin,!tools/maven-plugin,!ui,!ui/open-api-ui,!ui/open-api-ui-forms' -DskipTests

- name: execute tck ${{ matrix.tck-version }}
run: mvn -B test -f testsuite/tck/pom.xml -Dsmallrye.commit=$(git rev-parse HEAD) -Dversion.eclipse.microprofile.openapi=${{ matrix.tck-version }}
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
java-version: 17

- name: maven cache
uses: actions/cache@v3
Expand Down Expand Up @@ -61,12 +61,6 @@ jobs:
cache-read-only: true
arguments: publishPlugins -Pgradle.publish.key=${{secrets.GRADLE_PUBLISH_KEY}} -Pgradle.publish.secret=${{secrets.GRADLE_PUBLISH_SECRET}}

- uses: actions/upload-artifact@v3
name: tck-report
with:
name: tck-report
path: testsuite/tck/target/surefire-reports

- uses: radcortez/milestone-release-action@main
name: milestone release
with:
Expand Down Expand Up @@ -112,7 +106,7 @@ jobs:
restore-keys: ${{ runner.os }}-m2

- name: build with maven
run: mvn -B -pl '!testsuite/extra,!tools,!tools/gradle-plugin,!tools/maven-plugin,!ui,!ui/open-api-ui,!ui/open-api-ui-forms' install -DskipTests
run: mvn -B -pl '!testsuite/data,!testsuite/extra,!tools,!tools/gradle-plugin,!tools/maven-plugin,!ui,!ui/open-api-ui,!ui/open-api-ui-forms' install -DskipTests

- name: execute tck ${{ matrix.tck-version }}
run: mvn -B test -f testsuite/tck/pom.xml -Dsmallrye.commit=$(git rev-parse HEAD) -Dversion.eclipse.microprofile.openapi=${{ matrix.tck-version }}
Expand Down
58 changes: 0 additions & 58 deletions testsuite/data/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.release>${java.version}</maven.compiler.release>
<version.mvn-jlink-wrapper>1.1.1</version.mvn-jlink-wrapper>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>3.5.3</quarkus.platform.version>
Expand Down Expand Up @@ -224,61 +223,4 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>build-with-downloaded-jdk17</id>
<activation>
<jdk>(,17)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.igormaznitsa</groupId>
<artifactId>mvn-jlink-wrapper</artifactId>
<version>${version.mvn-jlink-wrapper}</version>
<executions>
<execution>
<id>download-jdk</id>
<goals>
<goal>cache-jdk</goal>
</goals>
<configuration>
<jdkCachePath>${project.basedir}/jdk-cache</jdkCachePath>
<jdkPathProperty>custom-jdk-path</jdkPathProperty>
<provider>ADOPT</provider>
<providerConfig>
<release>${java.version}</release>
<arch>x64</arch> <!-- TODO select automatically, but how? -->
</providerConfig>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<executable>${custom-jdk-path}/bin/javac</executable>
<fork>true</fork>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<javadocExecutable>${custom-jdk-path}/bin/javadoc</javadocExecutable>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit bf0f112

Please sign in to comment.