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

Further improvements to GitHub Actions config #4917

Merged
merged 7 commits into from
May 12, 2023
4 changes: 2 additions & 2 deletions .github/workflows/ci-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
key: deploy-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: deploy-${{ runner.os }}-maven
- name: Install bats
run: sudo apt-get install bats
- name: Build images
Expand Down
32 changes: 13 additions & 19 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,32 @@ jobs:
cache: 'maven'
- run: mvn -V -B dependency-check:check
timeout-minutes: 60
documentation:
name: Javadoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ env.DEV_JDK }}
cache: 'maven'
- run: mvn -V -B -q -T 2C install javadoc:javadoc -DskipTests -D'dependency-check.skip' -D'license.skip' --projects '!exist-distribution,!exist-installer' --also-make
test:
name: (JDK ${{ matrix.jdk }} / ${{ matrix.os }}) Test
name: ${{ matrix.os }} Test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
jdk: [ '17' ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.jdk }}
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.jdk }}
java-version: ${{ env.DEV_JDK }}
cache: 'maven'
- name: Maven Build
timeout-minutes: 10
run: mvn -V -B -T 1C compile test-compile -DtrimStackTrace=false -D'dependency-check.skip' -D'license.skip'
- name: Maven Test
timeout-minutes: 60
run: mvn -V -B verify -D'dependency-check.skip' -D'license.skip'
- name: Maven Code Coverage
if: ${{ github.ref == 'refs/heads/develop' && matrix.jdk == env.DEV_JDK && matrix.os == 'ubuntu-latest' }}
run: mvn -V -B verify -DtrimStackTrace=false -D'dependency-check.skip' -D'license.skip'
- name: Javadoc (Linux only)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: mvn -V -B -q -T 1C install javadoc:javadoc -DskipTests -D'dependency-check.skip' -D'license.skip' --projects '!exist-distribution,!exist-installer' --also-make
- name: Maven Code Coverage (Develop branch on Linux only)
if: ${{ github.ref == 'refs/heads/develop' && matrix.os == 'ubuntu-latest' }}
env:
CI_NAME: github
BRANCH_NAME_OR_REF: ${{ github.head_ref || github.ref }}
Expand All @@ -73,7 +67,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}-jdk${{ matrix.jdk }}-build-logs
name: ${{ runner.os }}-build-logs
retention-days: 5
path: |
**/*.jfr
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/ci-xqts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ jobs:
with:
distribution: temurin
java-version: '17'
cache: 'maven'
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: xqts-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: xqts-${{ runner.os }}-maven
- name: Maven XQTS Build
run: mvn -V -B clean package -DskipTests -Ddependency-check.skip=true --projects exist-xqts --also-make
- name: Run XQTS
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
key: sonarcloud-${{ runner.os }}-cache-${{ hashFiles('**/pom.xml') }}
restore-keys: sonarcloud-${{ runner.os }}-cache
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
key: sonarcloud-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: sonarcloud-${{ runner.os }}-maven
- name: Analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
Expand Down
Loading