120 lines
3.6 KiB
YAML
120 lines
3.6 KiB
YAML
name: Pushes
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
- pmd/7.0.x
|
|
schedule:
|
|
# build it monthly: At 04:00 on day-of-month 1.
|
|
- cron: '0 4 1 * *'
|
|
|
|
jobs:
|
|
linux:
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: false
|
|
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.m2/repository
|
|
~/.cache
|
|
vendor/bundle
|
|
key: push-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: |
|
|
push-${{ runner.os }}-
|
|
- name: Set up Ruby 2.7
|
|
uses: actions/setup-ruby@v1
|
|
with:
|
|
ruby-version: 2.7
|
|
- name: Check Environment
|
|
run: .ci/check-environment.sh
|
|
shell: bash
|
|
- name: Build
|
|
run: .ci/build.sh
|
|
shell: bash
|
|
env:
|
|
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=180 -Dmaven.wagon.http.retryHandler.count=3 -DstagingProgressTimeoutMinutes=30
|
|
PMD_CI_SECRET_PASSPHRASE: ${{ secrets.PMD_CI_SECRET_PASSPHRASE }}
|
|
PMD_CI_JOB_URL: "https://github.com/pmd/pmd/runs/${{ github.run_id }}"
|
|
PMD_CI_PUSH_COMMIT_COMPARE: ${{ github.event.compare }}
|
|
PMD_CI_GIT_REF: ${{ github.ref }}
|
|
|
|
windows-macos:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ windows-latest, macos-latest ]
|
|
needs: linux
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.m2/repository
|
|
~/.cache
|
|
vendor/bundle
|
|
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-
|
|
- name: Check Environment
|
|
run: .ci/check-environment.sh
|
|
shell: bash
|
|
- name: Build
|
|
run: .ci/build-pr-win-macos.sh
|
|
shell: bash
|
|
env:
|
|
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=180 -Dmaven.wagon.http.retryHandler.count=3
|
|
|
|
coveralls:
|
|
runs-on: ubuntu-latest
|
|
needs: [linux]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.m2/repository
|
|
~/.cache
|
|
vendor/bundle
|
|
key: coveralls-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: |
|
|
coveralls-${{ runner.os }}-
|
|
- name: Check Environment
|
|
run: .ci/check-environment.sh
|
|
shell: bash
|
|
- name: Build
|
|
run: .ci/build-coveralls.sh
|
|
shell: bash
|
|
env:
|
|
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=180 -Dmaven.wagon.http.retryHandler.count=3
|
|
PMD_CI_SECRET_PASSPHRASE: ${{ secrets.PMD_CI_SECRET_PASSPHRASE }}
|
|
PMD_CI_JOB_URL: "https://github.com/pmd/pmd/runs/${{ github.run_id }}"
|
|
|
|
sonar:
|
|
runs-on: ubuntu-latest
|
|
needs: [linux]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.m2/repository
|
|
~/.cache
|
|
vendor/bundle
|
|
key: sonar-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: |
|
|
sonar-${{ runner.os }}-
|
|
- name: Check Environment
|
|
run: .ci/check-environment.sh
|
|
shell: bash
|
|
- name: Build
|
|
run: .ci/build-sonar.sh
|
|
shell: bash
|
|
env:
|
|
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=180 -Dmaven.wagon.http.retryHandler.count=3
|
|
PMD_CI_SECRET_PASSPHRASE: ${{ secrets.PMD_CI_SECRET_PASSPHRASE }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|