Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
charphi committed Jul 15, 2024
2 parents 5768747 + b3f50dd commit 4d10591
Show file tree
Hide file tree
Showing 9 changed files with 490 additions and 115 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ updates:
target-branch: "develop"
directory: "/"
schedule:
interval: daily
time: "04:00"
interval: "weekly"
day: "saturday"
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
target-branch: "develop"
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Check links in documentation

on:
push:
paths:
- '.github/workflows/check-links.yml'
- 'lychee.toml'
- '**/*.md'
schedule:
# Run on the first of each month at 9:00 AM
- cron: "0 9 1 * *"
workflow_dispatch:

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref }}"
cancel-in-progress: true

jobs:
lychee:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Restore lychee cache
uses: actions/cache@v4
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-

- name: Check links
id: lychee
uses: lycheeverse/[email protected]
with:
fail: true
args: --max-concurrency 1 --cache --no-progress --exclude-all-private './**/*.md'
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -50,7 +50,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -64,4 +64,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
59 changes: 59 additions & 0 deletions .github/workflows/java-bundled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Update java.bundled

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * SAT'

jobs:
update-mvn-property:
runs-on: ubuntu-latest
name: Update Maven property using the latest release version (tag) of a GitHub repository

env:
DEP_PROP: java.bundled.version
DEP_REPO: adoptium/temurin21-binaries

steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
cache: 'maven'

- name: Get latest release version
id: lr
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: ${{ env.DEP_REPO }}

- name: Apply latest release version on Maven property
run: >
mvn -B -ntp versions:set-property
-Dproperty=${{ env.DEP_PROP }}
-DnewVersion=${{ steps.lr.outputs.release }}
-DgenerateBackupPoms=false
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
commit-message: Bump ${{ env.DEP_PROP }} to ${{ steps.lr.outputs.release }}
title: Bump ${{ env.DEP_PROP }} to ${{ steps.lr.outputs.release }}
body: ${{ steps.lr.outputs.description }}
delete-branch: true
branch: PR/maven/${{ github.ref_name }}/${{ env.DEP_PROP }}-${{ steps.lr.outputs.release }}
labels: dependencies,java

- name: Create summary
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" >> $GITHUB_STEP_SUMMARY
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" >> $GITHUB_STEP_SUMMARY
12 changes: 6 additions & 6 deletions .github/workflows/java-ea-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ '-ea' ]
os: [ ubuntu-latest ]
java: [ 21 ]
os: [ ubuntu-latest, macos-latest ]

name: JDK${{ matrix.java }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'

- name: Build and (headless) test with Maven
uses: GabrielBB/xvfb-action@v1
uses: smithki/xvfb-action@v1.1.2
with:
run: mvn -U -B -ntp package
run: mvn -U -B -ntp verify
72 changes: 55 additions & 17 deletions .github/workflows/java8-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,103 +4,132 @@ on: [ push, pull_request ]

jobs:
build-and-test-job:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/develop') || startsWith(github.ref, 'refs/tags/v')
strategy:
fail-fast: false
matrix:
java: [ 8, 17 ]
os: [ ubuntu-latest, macOS-latest, windows-latest ]
java: [ 8, 21 ]
os: [ ubuntu-latest, macos-13, windows-latest ]

name: JDK${{ matrix.java }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'

- name: Pre-download dependencies with Maven
run: mvn -U -B -ntp dependency:go-offline

- name: Build and (headless) test with Maven
uses: GabrielBB/xvfb-action@v1
uses: smithki/xvfb-action@v1.1.2
with:
run: mvn -U -B -ntp package
run: mvn -U -B -ntp verify

auto-merge-job:
needs: build-and-test-job
if: startsWith(github.repository, 'jdemetra/') && github.event_name == 'pull_request' && github.actor == 'dependabot[bot]'
permissions:
contents: write
pull-requests: write

name: Auto-merge on dependabot PR
runs-on: ubuntu-latest

steps:
- name: Merge PR
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

snapshot-job:
needs: build-and-test-job
if: startsWith(github.repository, 'jdemetra/') && startsWith(github.ref, 'refs/heads/develop')
strategy:
matrix:
java: [ 17 ]
java: [ 21 ]
os: [ ubuntu-latest ]

name: Snapshot on develop
runs-on: ${{ matrix.os }}

steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'

- name: Deploy snapshot with Maven if settings defined
run: test ! -f ci.settings.xml || mvn -B -ntp deploy -DskipTests=true -s ci.settings.xml -P base-deploy,snapshot-deploy,!non-deployable-modules
run: test ! -f ci.settings.xml || mvn -B -ntp deploy -DskipTests -s ci.settings.xml -P base-deploy,snapshot-deploy,!non-deployable-modules
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
SIGN_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
SIGN_KEY_PASS: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Dryrun release assets with Maven
run: mvn -B -ntp install -DskipTests=true -P full-release -Djreleaser.dry.run=true
run: mvn -B -ntp install -DskipTests -P full-release -Djreleaser.output.directory=$PWD/out/jreleaser -Djreleaser.dry.run
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.JRELEASER_GITHUB_TOKEN }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.MAVEN_GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Upload JReleaser output
if: always()
uses: actions/upload-artifact@v4
with:
name: assets-snapshot-log
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
release-job:
needs: build-and-test-job
if: startsWith(github.repository, 'jdemetra/') && startsWith(github.ref, 'refs/tags/v')
strategy:
matrix:
java: [ 17 ]
java: [ 21 ]
os: [ ubuntu-latest ]

name: Release on tag
runs-on: ${{ matrix.os }}

steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'

- name: Deploy with Maven if settings defined
run: test ! -f ci.settings.xml || mvn -B -ntp deploy -DskipTests=true -s ci.settings.xml -P base-deploy,release-deploy,!non-deployable-modules
run: test ! -f ci.settings.xml || mvn -B -ntp deploy -DskipTests -s ci.settings.xml -P base-deploy,release-deploy,!non-deployable-modules
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
Expand All @@ -110,9 +139,18 @@ jobs:
MAVEN_OPTS: "--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"

- name: Release assets with Maven
run: mvn -B -ntp install -DskipTests=true -P full-release
run: mvn -B -ntp install -DskipTests -P full-release -Djreleaser.output.directory=$PWD/out/jreleaser
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.JRELEASER_GITHUB_TOKEN }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.MAVEN_GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Upload JReleaser output
if: always()
uses: actions/upload-artifact@v4
with:
name: assets-release-log
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
Loading

0 comments on commit 4d10591

Please sign in to comment.