123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222 |
- 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
- with:
- fetch-depth: 0
- - name: Set up JDK 11 for running Gradle
- uses: actions/setup-java@v2
- with:
- distribution: adopt
- java-version: 11
- - name: Cache Gradle Wrapper
- uses: actions/cache@v2
- with:
- path: ~/.gradle/wrapper
- key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- - name: Build
- run: ./gradlew build --no-build-cache
- build-gradle-plugins:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2.3.4
- with:
- fetch-depth: 0
- - name: Set up JDK 11 for running Gradle
- uses: actions/setup-java@v2
- with:
- distribution: adopt
- java-version: 11
- - name: Cache Gradle Wrapper
- uses: actions/cache@v2
- with:
- path: ~/.gradle/wrapper
- key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- - name: Build
- run: ../gradlew build --no-build-cache
- working-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
- with:
- fetch-depth: 0
- - 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: Cache Gradle Wrapper
- uses: actions/cache@v2
- with:
- path: ~/.gradle/wrapper
- key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- - name: Test
- run: ./gradlew 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
- with:
- fetch-depth: 0
- - name: Set up JDK 11 for running Gradle
- uses: actions/setup-java@v2
- with:
- distribution: adopt
- java-version: 11
- - name: Cache Gradle Wrapper
- uses: actions/cache@v2
- with:
- path: ~/.gradle/wrapper
- key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- - name: Test
- run: ./gradlew test -PtestLatestDeps=true --no-build-cache
- smoke-test:
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os:
- - windows-latest
- - ubuntu-latest
- smoke-test-suite:
- - jetty
- - liberty
- - payara
- - tomcat
- - tomee
- - websphere
- - wildfly
- - other
- exclude:
- - os: windows-latest
- smoke-test-suite: websphere
- fail-fast: false
- steps:
- - name: Support longpaths
- run: git config --system core.longpaths true
- if: matrix.os == 'windows-latest'
- - uses: actions/checkout@v2.3.4
- with:
- fetch-depth: 0
- - name: Set up JDK 11 for running Gradle
- uses: actions/setup-java@v2
- with:
- distribution: adopt
- java-version: 11
- - name: Cache Gradle Wrapper
- uses: actions/cache@v2
- with:
- path: ~/.gradle/wrapper
- key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- - name: Test
- run: ./gradlew :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
- with:
- fetch-depth: 0
- - name: Set up JDK 11 for running Gradle
- uses: actions/setup-java@v2
- with:
- distribution: adopt
- java-version: 11
- - name: Cache Gradle Wrapper
- uses: actions/cache@v2
- with:
- path: ~/.gradle/wrapper
- key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('examples/distro/gradle/wrapper/gradle-wrapper.properties') }}
- - name: Local publish of artifacts
- # javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
- run: ./gradlew publishToMavenLocal -x javadoc
- - name: Local publish of gradle plugins
- # javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
- run: ../gradlew publishToMavenLocal -x javadoc
- working-directory: gradle-plugins
- - name: Build distro
- run: ./gradlew build --init-script ../../.github/scripts/local.init.gradle.kts --no-build-cache
- working-directory: examples/distro
- - name: Build extension
- run: ./gradlew build --init-script ../../.github/scripts/local.init.gradle.kts --no-build-cache
- working-directory: examples/extension
- - name: Run muzzle check against extension
- run: ./gradlew muzzle --init-script ../../.github/scripts/local.init.gradle.kts
- working-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
- with:
- fetch-depth: 0
- - 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
|