123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- name: Reusable - Assemble
- on:
- workflow_call:
- inputs:
- cache-read-only:
- type: boolean
- required: false
- no-build-cache:
- type: boolean
- required: false
- secrets:
- GRADLE_ENTERPRISE_ACCESS_KEY:
- required: false
- GE_CACHE_USERNAME:
- required: false
- GE_CACHE_PASSWORD:
- required: false
- jobs:
- assemble:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - name: Set up JDK for running Gradle
- uses: actions/setup-java@v3
- with:
- distribution: temurin
- java-version: 17
- - name: Start deadlock detector
- run: .github/scripts/deadlock-detector.sh
- - name: Assemble
- uses: gradle/gradle-build-action@v2
- env:
- GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
- GE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
- with:
- # javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
- arguments: assemble generateLicenseReport -x javadoc ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
- cache-read-only: ${{ inputs.cache-read-only }}
- # gradle enterprise is used for the build cache
- gradle-home-cache-excludes: caches/build-cache-1
- - name: Check licenses
- run: |
- # add any untracked folders that may have been added by generateLicenseReport
- git add licenses
- # there's always going to one line difference due to the timestamp included in the report
- if [[ $(git diff --cached --shortstat licenses) == " 1 file changed, 1 insertion(+), 1 deletion(-)" ]]
- then
- echo "Licenses are up-to-date."
- else
- echo "Licenses are not up-to-date, please run './gradlew generateLicenseReport' locally and commit."
- echo
- echo $(git diff --cached --stat licenses)
- echo
- echo $(git diff --cached licenses)
- exit 1
- fi
- - name: Check for jApiCmp diffs
- run: |
- if git diff --quiet
- then
- echo "No diff detected."
- else
- echo "Diff detected - did you run './gradlew jApiCmp'?"
- echo $(git diff --name-only)
- echo $(git diff)
- exit 1
- fi
- - name: Upload deadlock detector artifacts if any
- if: always()
- uses: actions/upload-artifact@v3
- with:
- name: deadlock-detector-assemble
- path: /tmp/deadlock-detector-*
- if-no-files-found: ignore
- - name: Upload jvm crash dump files if any
- if: always()
- uses: actions/upload-artifact@v3
- with:
- name: javacore-assemble
- path: |
- **/hs_err_pid*.log
- **/javacore.*.txt
- **/Snap.*.trc
- **/core.*.dmp
- **/jitdump.*.dmp
- if-no-files-found: ignore
|