Skip to content

Java CI with Gradle #3192

Java CI with Gradle

Java CI with Gradle #3192

Workflow file for this run

# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
push:
branches: [ main, develop, 'release/**', 'hotfix/**' ]
tags: [ 'v*.*.*' ]
pull_request:
branches: [ main, develop, 'feature/**', 'bugfix/**', 'hotfix/**', 'release/**' ]
workflow_dispatch:
schedule:
- cron: '23 4 * * *'
jobs:
build:
if: github.event_name == 'pull_request' || github.event_name == 'push'
uses: ./.github/workflows/build.yml
with:
git-ref: ${{ github.head_ref || github.ref_name }}
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
interop-smoke:
if: github.event_name == 'pull_request' || github.event_name == 'push'
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
actions: write
env:
INTEROP_MODE: smoke
steps:
- uses: actions/checkout@v6
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@f29f5a9d7b09a7c6b29859002d29d24e1674c884 # v5
- name: Build runnable Cryptad dist
env:
GITHUB_TOKEN: ${{ github.token }}
run: ./gradlew assembleCryptadDist
- name: Run Hyphanet interop smoke
env:
INTEROP_SKIP_BUILD: '1'
run: tools/interop/run-hyphanet-interop-smoke.sh
- name: Upload interop diagnostics
if: failure()
uses: actions/upload-artifact@v6
with:
name: interop-smoke-diagnostics
path: |
build/interop-smoke/
!build/interop-smoke/artifacts/private-insert-uris.json
interop-extended:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 90
permissions:
contents: read
actions: write
env:
INTEROP_MODE: extended
INTEROP_ENABLE_USK_SUBSCRIBE_SOAK: '1'
INTEROP_ENABLE_PERSISTENT_REPLAY: '1'
INTEROP_ENABLE_OPENNET: '0'
INTEROP_SOAK_DURATION_SECONDS: '900'
INTEROP_SOAK_POLL_INTERVAL_SECONDS: '15'
INTEROP_EXTENDED_TIMEOUT_SECONDS: '3600'
INTEROP_OUT_DIR: build/interop-extended
INTEROP_TIMEOUT_SECONDS: '3600'
steps:
- uses: actions/checkout@v6
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@f29f5a9d7b09a7c6b29859002d29d24e1674c884 # v5
- name: Build runnable Cryptad dist
env:
GITHUB_TOKEN: ${{ github.token }}
run: ./gradlew assembleCryptadDist
- name: Run extended Hyphanet interop
env:
INTEROP_SKIP_BUILD: '1'
run: tools/interop/run-hyphanet-interop-smoke.sh
- name: Upload extended interop diagnostics
if: always()
uses: actions/upload-artifact@v6
with:
name: interop-extended-diagnostics-${{ github.run_id }}-${{ github.run_attempt }}
path: |
build/interop-extended/
!build/interop-extended/artifacts/private-insert-uris.json
if-no-files-found: warn
retention-days: 30
performance-smoke:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 45
permissions:
contents: read
actions: write
env:
PERF_MODE: smoke
PERF_OUT_DIR: build/perf-smoke
PERF_TIMEOUT_SECONDS: '900'
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@f29f5a9d7b09a7c6b29859002d29d24e1674c884 # v5
- name: Run performance smoke
env:
GITHUB_TOKEN: ${{ github.token }}
run: tools/perf/run-performance-smoke.sh
- name: Upload performance smoke diagnostics
if: always()
uses: actions/upload-artifact@v6
with:
name: performance-smoke-diagnostics-${{ github.run_id }}-${{ github.run_attempt }}
path: |
build/perf-smoke/summary.json
build/perf-smoke/artifacts/
if-no-files-found: warn
retention-days: 30
interop-self-test:
name: interop parser/client self-test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python_cmd: python3
- os: macos-latest
python_cmd: python3
- os: windows-latest
python_cmd: py -3
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Run interop parser/client self-test
shell: bash
run: ${{ matrix.python_cmd }} tools/interop/interop_smoke.py --self-test
performance-self-test:
name: performance smoke self-test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python_cmd: python3
- os: macos-latest
python_cmd: python3
- os: windows-latest
python_cmd: py -3.12
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Run performance smoke self-test
shell: bash
run: ${{ matrix.python_cmd }} tools/perf/perf_smoke.py --self-test
release-certification-self-test:
name: release certification self-test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python_cmd: python3
- os: macos-latest
python_cmd: python3
- os: windows-latest
python_cmd: py -3
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Run release certification self-tests
shell: bash
run: |
${{ matrix.python_cmd }} tools/release-certification/release_certification.py --self-test
${{ matrix.python_cmd }} tools/release-certification/app_platform_smoke.py --self-test
dependency-submission:
if: github.event_name == 'pull_request' || github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'temurin'
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@f29f5a9d7b09a7c6b29859002d29d24e1674c884 # v5