Skip to content

Commit

Permalink
Merge pull request #15 from HHS/dev
Browse files Browse the repository at this point in the history
1.1.0
  • Loading branch information
bischoffz committed Jun 17, 2024
2 parents 2d75085 + e28b4ff commit bf76f65
Show file tree
Hide file tree
Showing 17 changed files with 1,813 additions and 48 deletions.
47 changes: 21 additions & 26 deletions .github/workflows/dev_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ name: GCM Pipeline Development Build
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]

jobs:
dev-build:
Expand All @@ -28,18 +26,6 @@ jobs:
distribution: 'temurin'
cache: maven

- name: Get GCM Version
run: |
echo "gcm_version=v$(mvn help:evaluate -Dexpression=gcm.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV"
- name: Checkout GCM
if: ${{ endsWith(env.gcm_version, 'SNAPSHOT') }}
uses: actions/checkout@v4
with:
repository: HHS/ASPR-8
path: gcm
ref: dev

- name: Get GCM Taskit Version
run: |
echo "gcm_taskit_version=v$(mvn help:evaluate -Dexpression=gcm-taskit.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV"
Expand All @@ -52,24 +38,20 @@ jobs:
path: gcm-taskit
ref: dev

- name: Get Util Version
if: ${{ endsWith(env.gcm_version, 'SNAPSHOT') }}
- name: Get GCM and Taskit Version
if: ${{ endsWith(env.gcm_taskit_version, 'SNAPSHOT') }}
run: |
echo "util_version=v$(mvn help:evaluate -Dexpression=util.version -q -DforceStdout --file gcm/pom.xml)" >> "$GITHUB_ENV"
echo "gcm_version=v$(mvn help:evaluate -Dexpression=gcm.version -q -DforceStdout --file gcm-taskit/pom.xml)" >> "$GITHUB_ENV"
echo "taskit_version=v$(mvn help:evaluate -Dexpression=taskit.version -q -DforceStdout --file gcm-taskit/pom.xml)" >> "$GITHUB_ENV"
- name: Checkout Util
if: ${{ endsWith(env.util_version, 'SNAPSHOT') }}
- name: Checkout GCM
if: ${{ endsWith(env.gcm_version, 'SNAPSHOT') }}
uses: actions/checkout@v4
with:
repository: HHS/ASPR-ms-util
path: util
repository: HHS/ASPR-8
path: gcm
ref: dev

- name: Get Taskit Version
if: ${{ endsWith(env.gcm_taskit_version, 'SNAPSHOT') }}
run: |
echo "taskit_version=v$(mvn help:evaluate -Dexpression=taskit.version -q -DforceStdout --file gcm-taskit/pom.xml)" >> "$GITHUB_ENV"
- name: Checkout Taskit
if: ${{ endsWith(env.taskit_version, 'SNAPSHOT') }}
uses: actions/checkout@v4
Expand All @@ -78,6 +60,19 @@ jobs:
path: taskit-core
ref: dev

- name: Get Util Version
if: ${{ endsWith(env.gcm_version, 'SNAPSHOT') }}
run: |
echo "util_version=v$(mvn help:evaluate -Dexpression=util.version -q -DforceStdout --file gcm/pom.xml)" >> "$GITHUB_ENV"
- name: Checkout Util
if: ${{ endsWith(env.util_version, 'SNAPSHOT') }}
uses: actions/checkout@v4
with:
repository: HHS/ASPR-ms-util
path: util
ref: dev

- name: Build Util
if: ${{ endsWith(env.util_version, 'SNAPSHOT') }}
run: mvn clean install -DskipTests --file util/pom.xml
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/dev_pr_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: GCM Pipeline Development PR Build

on:
pull_request:
branches-ignore: [ "main" ]

jobs:
dev-build:
runs-on: ubuntu-latest
steps:
- name: Checkout GCM Pipeline
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Get GCM Taskit Version
run: |
echo "gcm_taskit_version=v$(mvn help:evaluate -Dexpression=gcm-taskit.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV"
- name: Checkout GCM Taskit
if: ${{ endsWith(env.gcm_taskit_version, 'SNAPSHOT') }}
uses: actions/checkout@v4
with:
repository: HHS/ASPR-ms-gcm-taskit
path: gcm-taskit
ref: dev

- name: Get GCM and Taskit Version
if: ${{ endsWith(env.gcm_taskit_version, 'SNAPSHOT') }}
run: |
echo "gcm_version=v$(mvn help:evaluate -Dexpression=gcm.version -q -DforceStdout --file gcm-taskit/pom.xml)" >> "$GITHUB_ENV"
echo "taskit_version=v$(mvn help:evaluate -Dexpression=taskit.version -q -DforceStdout --file gcm-taskit/pom.xml)" >> "$GITHUB_ENV"
- name: Checkout GCM
if: ${{ endsWith(env.gcm_version, 'SNAPSHOT') }}
uses: actions/checkout@v4
with:
repository: HHS/ASPR-8
path: gcm
ref: dev

- name: Checkout Taskit
if: ${{ endsWith(env.taskit_version, 'SNAPSHOT') }}
uses: actions/checkout@v4
with:
repository: HHS/ASPR-ms-taskit
path: taskit-core
ref: dev

- name: Get Util Version
if: ${{ endsWith(env.gcm_version, 'SNAPSHOT') }}
run: |
echo "util_version=v$(mvn help:evaluate -Dexpression=util.version -q -DforceStdout --file gcm/pom.xml)" >> "$GITHUB_ENV"
- name: Checkout Util
if: ${{ endsWith(env.util_version, 'SNAPSHOT') }}
uses: actions/checkout@v4
with:
repository: HHS/ASPR-ms-util
path: util
ref: dev

- name: Build Util
if: ${{ endsWith(env.util_version, 'SNAPSHOT') }}
run: mvn clean install -DskipTests --file util/pom.xml

- name: Build GCM
if: ${{ endsWith(env.gcm_version, 'SNAPSHOT') }}
run: mvn clean install -DskipTests --file gcm/pom.xml

- name: Build Taskit
if: ${{ endsWith(env.taskit_version, 'SNAPSHOT') }}
run: mvn clean install -DskipTests --file taskit-core/pom.xml

- name: Build GCM Taskit
if: ${{ endsWith(env.gcm_taskit_version, 'SNAPSHOT') }}
run: mvn clean install -DskipTests --file gcm-taskit/pom.xml

- name: Build GCM Pipeline
run: mvn clean install --file pom.xml

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
# - name: Update dependency graph
# uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
125 changes: 103 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,39 +49,41 @@

<!-- Properties -->
<properties>
<revision>1.0.3</revision>
<revision>1.1.0</revision>

<!-- basic project properties -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>

<!-- protobuf specific plugins versions -->
<os-maven-plugin.version>1.7.1</os-maven-plugin.version>
<build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
<maven-replacer-plugin.version>1.4.1</maven-replacer-plugin.version>
<protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version>

<!-- plugin versions -->
<flatten-maven-plugin.version>1.3.0</flatten-maven-plugin.version>
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
<maven-failsafe-plugin.version>3.0.0-M5</maven-failsafe-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
<maven-gpg-plugin.version>3.2.2</maven-gpg-plugin.version>
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
<maven-surefire-plugin.version>3.3.0</maven-surefire-plugin.version>
<maven-failsafe-plugin.version>3.3.0</maven-failsafe-plugin.version>
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
<maven-javadoc-plugin.version>3.7.0</maven-javadoc-plugin.version>
<maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
<central-publishing-maven-plugin.version>0.4.0</central-publishing-maven-plugin.version>

<!-- dependency versions -->
<gcm.version>4.2.0</gcm.version>
<gcm-taskit.version>2.8.3</gcm-taskit.version>
<jacoco-maven-plugin.version>0.8.9</jacoco-maven-plugin.version>
<junit-jupiter-engine.version>5.8.2</junit-jupiter-engine.version>
<protoc.version>3.25.2</protoc.version>
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
<junit-jupiter-engine.version>5.10.2</junit-jupiter-engine.version>
</properties>

<dependencies>
<dependency>
<groupId>gov.hhs.aspr.ms.gcm</groupId>
<artifactId>simulation</artifactId>
<version>${gcm.version}</version>
</dependency>
<dependency>
<groupId>gov.hhs.aspr.ms.gcm.taskit</groupId>
<artifactId>protobuf</artifactId>
<version>${gcm-taskit.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
Expand All @@ -105,6 +107,20 @@

<build>
<plugins>
<plugin>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>${os-maven-plugin.version}</version>
<executions>
<execution>
<id>detect-os</id>
<phase>initialize</phase>
<goals>
<goal>detect</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- used with the ${revision} for versioning, creates a pom that has the version replaced with the value of ${revision} -->
<plugin>
Expand Down Expand Up @@ -136,6 +152,78 @@
</executions>
</plugin>

<!-- attaches generated proto sources to classpath -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${build-helper-maven-plugin.version}</version>
<executions>
<execution>
<id>add-proto-gen-folder-as-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/protobuf/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>

<!-- some of the generated proto files have warnings that clutter the 'problems' id the IDE. This adds a SuppressWarnings("all") to each generated file to clear up the warnings. -->
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>maven-replacer-plugin</artifactId>
<version>${maven-replacer-plugin.version}</version>
<executions>
<execution>
<id>replace-warnings-in-gen-files</id>
<phase>process-sources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>target/generated-sources/**/*.java</include>
</includes>
<regex>true</regex>
<regexFlags>
<regexFlag>MULTILINE</regexFlag>
</regexFlags>
<replacements>
<replacement>
<token>^(@SuppressWarnings\(.*?\)\s+)?public final class</token>
<value>@SuppressWarnings("all") public final class</value>
</replacement>
</replacements>
</configuration>
</plugin>

<!-- compiles proto files -->
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>${protobuf-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<configuration>
<protocArtifact>com.google.protobuf:protoc:${protoc.version}:exe:${os.detected.classifier}</protocArtifact>
<protoSourceRoot>${basedir}/src/main/proto/gov/hhs/aspr/ms/gcm/pipeline</protoSourceRoot>
<attachProtoSources>false</attachProtoSources>
</configuration>
</plugin>

<!-- Runs unit tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -207,13 +295,6 @@
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<doclint>all,-missing</doclint>
<additionalDependencies>
<additionalDependency>
<groupId>gov.hhs.aspr.ms.gcm</groupId>
<artifactId>simulation</artifactId>
<version>${gcm.version}</version>
</additionalDependency>
</additionalDependencies>
<author>false</author>
<additionalJOptions>
<additionalJOption>-Xmaxerrs</additionalJOption>
Expand Down
Loading

0 comments on commit bf76f65

Please sign in to comment.