-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
90 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# This workflow builds the WRES distros | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
Build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies. | ||
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 | ||
|
||
# Run and build using gradle | ||
# Disable aggregateJavaDocs | ||
- name: Run build | ||
run: ./gradlew distZip testCodeCoverageReport javadoc | ||
|
||
# Confirm the test code inside wres-external-services-tests zip compiles | ||
- name: Compile external-services-tests | ||
run: | | ||
cd wres-external-services-tests | ||
../gradlew installDist | ||
cd build/install/wres-external-services-tests | ||
./gradlew testClasses | ||
# Create the system tests zip | ||
- name: Create systests zip | ||
run: | | ||
cd systests | ||
../gradlew distZip installDist | ||
# Create the admin scripts zip | ||
- name: Create admin scripts | ||
run: | | ||
cd scripts | ||
../gradlew distZip | ||
- name: Creating md5 | ||
run: | | ||
md5sum build/distributions/wres-*.zip >> checksum.txt | ||
md5sum wres-*/build/distributions/wres-*-*.zip >> checksum.txt | ||
md5sum systests/build/distributions/systests-*.zip >> checksum.txt | ||
md5sum scripts/build/distributions/wres-admin-scripts-*.zip >> checksum.txt | ||
# Archive the artifacts created from this build | ||
- name: Archive artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build-artifacts | ||
path: | | ||
checksum.txt | ||
build/distributions/wres-*.zip | ||
wres-*/build/distributions/wres-*-*.zip | ||
systests/build/distributions/systests-*.zip | ||
scripts/build/distributions/wres-admin-scripts-*.zip | ||
dependency-submission: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. | ||
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md | ||
- name: Generate and submit dependency graph | ||
uses: gradle/actions/dependency-submission@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 |