Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nightly builds to run on both Java11 and 17 #2074

Merged
merged 16 commits into from
Mar 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
275 changes: 24 additions & 251 deletions .github/workflows/nightly-check-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ on:
branches: [ 'nightly/**', 'release/v*' ]

jobs:
check:
nightly:
strategy:
fast-fail: false
matrix:
gradle-task: ['check', 'testSerial', 'testParallel', 'testOutOfBand']
test-jvm-version: ['11', '17']
if: ${{ github.repository_owner == 'deephaven' || github.event_name != 'schedule' }}
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -41,111 +46,30 @@ jobs:
echo "org.gradle.java.installations.paths=${{ steps.setup-java-11.outputs.path }},${{ steps.setup-java-17.outputs.path }}," >> gradle.properties
cat gradle.properties

- name: Run gradle
- name: Run gradle ${{ matrix.gradle-task }} on java ${{ matrix.test-jvm-version }}
uses: burrunan/gradle-cache-action@v1
with:
job-id: check
arguments: --scan --continue --rerun-tasks check
job-id: gradle-run
arguments: --scan --continue --rerun-tasks ${{ matrix.gradle-task }} -PtestRuntimeVersion=${{ matrix.test-jvm-version }}
gradle-version: wrapper

- name: Upload Test Results
uses: actions/upload-artifact@v2
if: always()
with:
name: nightly-check-ci-results
path: '**/build/test-results/*/TEST-*.xml'

- name: Upload Test Reports
uses: actions/upload-artifact@v2
if: always()
with:
name: nightly-check-ci-reports
path: '**/build/reports/tests/**'

- name: Upload JVM Error Logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: nightly-check-ci-jvm-err
path: '**/*_pid*.log'
if-no-files-found: ignore

- name: Publish Test Results
uses: scacap/action-surefire-report@v1
if: ${{ github.repository_owner == 'deephaven' }}
env:
NODE_OPTIONS: '--max_old_space_size=4096'
with:
check_name: check report
github_token: ${{ secrets.GITHUB_TOKEN }}
report_paths: '**/build/test-results/*/TEST-*.xml'

- name: Slack Nightly Failure
uses: slackapi/slack-github-action@v1.15.0
id: slack-nightly-failure
if: ${{ failure() && github.repository_owner == 'deephaven' }}
# TODO(deephaven-core#947): Parameterize nightly ci failure workflow and trigger
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NIGHTLY_FAILURE }}

testSerial:
if: ${{ github.repository_owner == 'deephaven' || github.event_name != 'schedule' }}
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup JDK 11
id: setup-java-11
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'

- name: Setup JDK 17
id: setup-java-17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'

- name: Set JAVA_HOME
run: echo "JAVA_HOME=${{ steps.setup-java-11.outputs.path }}" >> $GITHUB_ENV

- name: Setup gradle properties
run: |
cat .github/env/${{ runner.os }}/gradle.properties >> gradle.properties
echo >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java-11.outputs.path }},${{ steps.setup-java-17.outputs.path }}," >> gradle.properties
cat gradle.properties

- name: Run gradle
uses: burrunan/gradle-cache-action@v1
with:
job-id: testSerial
arguments: --scan --continue --rerun-tasks testSerial
gradle-version: wrapper

- name: Upload Test Results
uses: actions/upload-artifact@v2
if: always()
with:
name: nightly-testSerial-ci-results
path: '**/build/test-results/*/TEST-*.xml'

- name: Upload Test Reports
uses: actions/upload-artifact@v2
if: always()
with:
name: nightly-testSerial-ci-reports
path: '**/build/reports/tests/**'
name: nightly-${{ matrix.gradle-task }}-java${{ matrix.test-jvm-version }}-ci-results
path: |
**/build/test-results/*/TEST-*.xml
**/build/reports/tests/**

- name: Upload JVM Error Logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: nightly-testSerial-ci-jvm-err
path: '**/*_pid*.log'
name: nightly-${{ matrix.gradle-task }}-java${{ matrix.test-jvm-version }}-ci-jvm-err
path: |
**/*_pid*.log
**/core.*
if-no-files-found: ignore

- name: Publish Test Results
Expand All @@ -154,170 +78,19 @@ jobs:
env:
NODE_OPTIONS: '--max_old_space_size=4096'
with:
check_name: testSerial report
# We have to make a unique report per run https://github.com/ScaCap/action-surefire-report/issues/70
check_name: check report ${{ matrix.gradle-task }} java${{ matrix.test-jvm-version }}
github_token: ${{ secrets.GITHUB_TOKEN }}
report_paths: '**/build/test-results/*/TEST-*.xml'

- name: Slack Nightly Failure
uses: slackapi/slack-github-action@v1.15.0
uses: slackapi/slack-github-action@v1.18.0
id: slack-nightly-failure
if: ${{ failure() && github.repository_owner == 'deephaven' }}
# TODO(deephaven-core#947): Parameterize nightly ci failure workflow and trigger
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NIGHTLY_FAILURE }}

testParallel:
if: ${{ github.repository_owner == 'deephaven' || github.event_name != 'schedule' }}
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup JDK 11
id: setup-java-11
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'

- name: Setup JDK 17
id: setup-java-17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'

- name: Set JAVA_HOME
run: echo "JAVA_HOME=${{ steps.setup-java-11.outputs.path }}" >> $GITHUB_ENV

- name: Setup gradle properties
run: |
cat .github/env/${{ runner.os }}/gradle.properties >> gradle.properties
echo >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java-11.outputs.path }},${{ steps.setup-java-17.outputs.path }}," >> gradle.properties
cat gradle.properties

- name: Run gradle
uses: burrunan/gradle-cache-action@v1
with:
job-id: testParallel
arguments: --scan --continue --rerun-tasks testParallel
gradle-version: wrapper

- name: Upload Test Results
uses: actions/upload-artifact@v2
if: always()
with:
name: nightly-testParallel-ci-results
path: '**/build/test-results/*/TEST-*.xml'

- name: Upload Test Reports
uses: actions/upload-artifact@v2
if: always()
with:
name: nightly-testParallel-ci-reports
path: '**/build/reports/tests/**'

- name: Upload JVM Error Logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: nightly-testParallel-ci-jvm-err
path: '**/*_pid*.log'
if-no-files-found: ignore

- name: Publish Test Results
uses: scacap/action-surefire-report@v1
if: ${{ github.repository_owner == 'deephaven' }}
env:
NODE_OPTIONS: '--max_old_space_size=4096'
with:
check_name: testParallel report
github_token: ${{ secrets.GITHUB_TOKEN }}
report_paths: '**/build/test-results/*/TEST-*.xml'

- name: Slack Nightly Failure
uses: slackapi/slack-github-action@v1.15.0
id: slack-nightly-failure
if: ${{ failure() && github.repository_owner == 'deephaven' }}
# TODO(deephaven-core#947): Parameterize nightly ci failure workflow and trigger
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NIGHTLY_FAILURE }}

testOutOfBand:
if: ${{ github.repository_owner == 'deephaven' || github.event_name != 'schedule' }}
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup JDK 11
id: setup-java-11
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'

- name: Setup JDK 17
id: setup-java-17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'

- name: Set JAVA_HOME
run: echo "JAVA_HOME=${{ steps.setup-java-11.outputs.path }}" >> $GITHUB_ENV

- name: Setup gradle properties
run: |
cat .github/env/${{ runner.os }}/gradle.properties >> gradle.properties
echo >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java-11.outputs.path }},${{ steps.setup-java-17.outputs.path }}," >> gradle.properties
cat gradle.properties

- name: Run gradle
uses: burrunan/gradle-cache-action@v1
with:
job-id: testOutOfBand
arguments: --scan --continue --rerun-tasks testOutOfBand
gradle-version: wrapper

- name: Upload Test Results
uses: actions/upload-artifact@v2
if: always()
with:
name: nightly-testOutOfBand-ci-results
path: '**/build/test-results/*/TEST-*.xml'

- name: Upload Test Reports
uses: actions/upload-artifact@v2
if: always()
with:
name: nightly-testOutOfBand-ci-reports
path: '**/build/reports/tests/**'

- name: Upload JVM Error Logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: nightly-testOutOfBand-ci-jvm-err
path: '**/*_pid*.log'
if-no-files-found: ignore

- name: Publish Test Results
uses: scacap/action-surefire-report@v1
if: ${{ github.repository_owner == 'deephaven' }}
env:
NODE_OPTIONS: '--max_old_space_size=4096'
with:
check_name: testOutOfBand report
github_token: ${{ secrets.GITHUB_TOKEN }}
report_paths: '**/build/test-results/*/TEST-*.xml'

- name: Slack Nightly Failure
uses: slackapi/slack-github-action@v1.15.0
id: slack-nightly-failure
if: ${{ failure() && github.repository_owner == 'deephaven' }}
# TODO(deephaven-core#947): Parameterize nightly ci failure workflow and trigger
payload: |
{
"slack-message": "Nightly build failure in ${{ matrix.gradle-task }} on Java ${{ matrix.test-jvm-version }} @ ${{ github.event.head_commit.url }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NIGHTLY_FAILURE }}