202 lines
6.0 KiB
YAML
202 lines
6.0 KiB
YAML
name: Nightly build without cache
|
|
|
|
on:
|
|
schedule:
|
|
# strange schedule to reduce the risk of DDOS GitHub infra
|
|
- cron: "48 4 * * *"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
|
|
- name: Set up JDK 11 for running Gradle
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: adopt
|
|
java-version: 11
|
|
|
|
- name: Build
|
|
env:
|
|
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
|
|
uses: gradle/gradle-build-action@v2
|
|
with:
|
|
# javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
|
|
arguments: build --no-build-cache -x javadoc
|
|
|
|
build-gradle-plugins:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
|
|
- name: Set up JDK 11 for running Gradle
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: adopt
|
|
java-version: 11
|
|
|
|
- name: Build
|
|
uses: gradle/gradle-build-action@v2
|
|
with:
|
|
arguments: build --no-build-cache
|
|
build-root-directory: gradle-plugins
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
test-java-version:
|
|
- 8
|
|
- 11
|
|
- 15
|
|
vm:
|
|
- hotspot
|
|
- openj9
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
|
|
- id: setup-test-java
|
|
name: Set up JDK ${{ matrix.test-java-version }}-${{ matrix.vm }} for running tests
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: adopt-${{ matrix.vm }}
|
|
java-version: ${{ matrix.test-java-version }}
|
|
|
|
- name: Set up JDK 11 for running Gradle
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: adopt
|
|
java-version: 11
|
|
|
|
- name: Test
|
|
env:
|
|
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
|
|
uses: gradle/gradle-build-action@v2
|
|
with:
|
|
arguments: test -PtestJavaVersion=${{ matrix.test-java-version }} -PtestJavaVM=${{ matrix.vm }} -Porg.gradle.java.installations.paths=${{ steps.setup-test-java.outputs.path }} -Porg.gradle.java.installations.auto-download=false --no-build-cache
|
|
|
|
testLatestDeps:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
|
|
- name: Set up JDK 11 for running Gradle
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: adopt
|
|
java-version: 11
|
|
|
|
- name: Test
|
|
env:
|
|
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
|
|
uses: gradle/gradle-build-action@v2
|
|
with:
|
|
arguments: test -PtestLatestDeps=true --no-build-cache
|
|
|
|
smoke-test:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- windows-2019
|
|
- ubuntu-latest
|
|
smoke-test-suite:
|
|
- jetty
|
|
- liberty
|
|
- payara
|
|
- tomcat
|
|
- tomee
|
|
- websphere
|
|
- wildfly
|
|
- other
|
|
exclude:
|
|
- os: windows-2019
|
|
smoke-test-suite: websphere
|
|
fail-fast: false
|
|
steps:
|
|
- name: Support longpaths
|
|
run: git config --system core.longpaths true
|
|
if: matrix.os == 'windows-2019'
|
|
|
|
- uses: actions/checkout@v2.3.4
|
|
|
|
- name: Set up JDK 11 for running Gradle
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: adopt
|
|
java-version: 11
|
|
|
|
- name: Test
|
|
env:
|
|
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
|
|
uses: gradle/gradle-build-action@v2
|
|
with:
|
|
arguments: ":smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }} --no-build-cache"
|
|
|
|
# muzzle is intentionally not included in the nightly-no-cache build because
|
|
# it doesn't use gradle cache anyways and so is already covered by the normal nightly build
|
|
|
|
examples:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
|
|
- name: Set up JDK 11 for running Gradle
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: adopt
|
|
java-version: 11
|
|
|
|
- name: Local publish of artifacts
|
|
uses: gradle/gradle-build-action@v2
|
|
with:
|
|
# javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
|
|
arguments: publishToMavenLocal -x javadoc
|
|
|
|
- name: Local publish of gradle plugins
|
|
uses: gradle/gradle-build-action@v2
|
|
with:
|
|
# javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
|
|
arguments: publishToMavenLocal -x javadoc
|
|
build-root-directory: gradle-plugins
|
|
|
|
- name: Build distro
|
|
uses: gradle/gradle-build-action@v2
|
|
with:
|
|
arguments: build --init-script ../../.github/scripts/local.init.gradle.kts --no-build-cache
|
|
build-root-directory: examples/distro
|
|
|
|
- name: Build extension
|
|
uses: gradle/gradle-build-action@v2
|
|
with:
|
|
arguments: build --init-script ../../.github/scripts/local.init.gradle.kts --no-build-cache
|
|
build-root-directory: examples/extension
|
|
|
|
- name: Run muzzle check against extension
|
|
uses: gradle/gradle-build-action@v2
|
|
with:
|
|
arguments: muzzle --init-script ../../.github/scripts/local.init.gradle.kts
|
|
build-root-directory: examples/extension
|
|
|
|
issue:
|
|
name: Open issue on failure
|
|
needs: [ build, test, testLatestDeps, smoke-test, examples ]
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
steps:
|
|
# run this action to get workflow conclusion
|
|
# You can get conclusion by env (env.WORKFLOW_CONCLUSION)
|
|
- uses: technote-space/workflow-conclusion-action@v2.2
|
|
|
|
- uses: actions/checkout@v2.3.4
|
|
|
|
- uses: JasonEtco/create-an-issue@v2.6
|
|
if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
filename: .github/templates/workflow-failed.md
|