v1.6.1 prep: Java 17 baseline migration #34
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| # Run CI for any incoming PR regardless of the base branch so | |
| # feature branches targeting `develop` (e.g. v1.7 prep) also | |
| # exercise the full pipeline. | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 5 * * 1' | |
| permissions: | |
| contents: read | |
| jobs: | |
| architecture-and-documentation-guards: | |
| name: Architecture and Documentation Guards | |
| if: github.event_name != 'schedule' | |
| runs-on: ubuntu-latest | |
| env: | |
| JAVA_TOOL_OPTIONS: -Djava.awt.headless=true | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Temurin JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| cache: maven | |
| - name: Run guards | |
| run: | | |
| ./mvnw -B -ntp clean \ | |
| "-Dtest=EnginePdfBoundaryTest,CanonicalTemplateComposerPdfBoundaryTest,PdfRenderInterfaceGuardTest,PdfRenderingSystemECSDispatchTest,DocumentationCoverageTest,DocumentationExamplesTest,CanonicalSurfaceGuardTest,TemplateComposeApiTest" \ | |
| test | |
| build-and-test: | |
| name: Build and run tests | |
| if: github.event_name != 'schedule' | |
| needs: architecture-and-documentation-guards | |
| runs-on: ubuntu-latest | |
| env: | |
| JAVA_TOOL_OPTIONS: -Djava.awt.headless=true | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Temurin JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| cache: maven | |
| - name: Build and run tests | |
| run: ./mvnw -B -ntp clean verify | |
| - name: Generate Javadoc | |
| run: ./mvnw -B -ntp javadoc:javadoc | |
| examples-generation: | |
| name: Examples Generation Smoke Test | |
| if: github.event_name != 'schedule' | |
| needs: build-and-test | |
| runs-on: ubuntu-latest | |
| env: | |
| JAVA_TOOL_OPTIONS: -Djava.awt.headless=true | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Temurin JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| cache: maven | |
| - name: Install root artifact | |
| run: ./mvnw -B -ntp -DskipTests install -pl . | |
| - name: Compile examples module | |
| run: ./mvnw -B -ntp -f examples/pom.xml clean compile | |
| - name: Run GenerateAllExamples | |
| run: | | |
| ./mvnw -B -ntp -f examples/pom.xml exec:java \ | |
| "-Dexec.mainClass=com.demcha.examples.GenerateAllExamples" | |
| - name: Upload generated PDFs | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: examples-pdfs-${{ github.run_id }} | |
| path: examples/target/generated-pdfs/** | |
| if-no-files-found: error | |
| perf-smoke: | |
| name: Performance Smoke Check | |
| if: github.event_name == 'pull_request' | |
| needs: architecture-and-documentation-guards | |
| runs-on: ubuntu-latest | |
| env: | |
| JAVA_TOOL_OPTIONS: -Djava.awt.headless=true | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Temurin JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| cache: maven | |
| - name: Install root artifact | |
| run: ./mvnw -B -ntp -DskipTests install -pl . | |
| - name: Compile benchmarks module | |
| run: ./mvnw -B -ntp -f benchmarks/pom.xml clean compile | |
| - name: Run coarse performance smoke benchmark | |
| run: | | |
| ./mvnw -B -ntp -f benchmarks/pom.xml -DskipTests \ | |
| "org.codehaus.mojo:exec-maven-plugin:3.5.0:java" \ | |
| "-Dexec.mainClass=com.demcha.compose.CurrentSpeedBenchmark" \ | |
| "-Dgraphcompose.benchmark.profile=smoke" | |
| - name: Upload smoke benchmark artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-smoke-${{ github.run_id }} | |
| path: benchmarks/target/benchmarks/current-speed/** | |
| if-no-files-found: ignore | |
| benchmark-diff: | |
| name: Weekly Benchmark Diff | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| env: | |
| JAVA_TOOL_OPTIONS: -Djava.awt.headless=true | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Temurin JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| cache: maven | |
| - name: Restore benchmark history cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: benchmarks/target/benchmarks/current-speed | |
| key: benchmark-current-speed-${{ github.ref_name }}-${{ github.run_id }} | |
| restore-keys: | | |
| benchmark-current-speed-${{ github.ref_name }}- | |
| benchmark-current-speed- | |
| - name: Install root artifact | |
| run: ./mvnw -B -ntp -DskipTests install -pl . | |
| - name: Compile benchmarks module | |
| run: ./mvnw -B -ntp -f benchmarks/pom.xml clean compile | |
| - name: Run full benchmark suite | |
| run: | | |
| ./mvnw -B -ntp -f benchmarks/pom.xml -DskipTests \ | |
| "org.codehaus.mojo:exec-maven-plugin:3.5.0:java" \ | |
| "-Dexec.mainClass=com.demcha.compose.CurrentSpeedBenchmark" \ | |
| "-Dgraphcompose.benchmark.profile=full" \ | |
| "-Dgraphcompose.benchmark.enforceGate=false" | |
| - name: Count available benchmark runs | |
| id: benchmark-runs | |
| run: | | |
| count=0 | |
| if [ -d benchmarks/target/benchmarks/current-speed ]; then | |
| count=$(find benchmarks/target/benchmarks/current-speed -maxdepth 1 -name 'run-*.json' | wc -l | tr -d ' ') | |
| fi | |
| echo "count=$count" >> "$GITHUB_OUTPUT" | |
| - name: Diff newest benchmark reports | |
| if: steps.benchmark-runs.outputs.count != '0' && steps.benchmark-runs.outputs.count != '1' | |
| run: | | |
| ./mvnw -B -ntp -f benchmarks/pom.xml -DskipTests \ | |
| "org.codehaus.mojo:exec-maven-plugin:3.5.0:java" \ | |
| "-Dexec.mainClass=com.demcha.compose.BenchmarkDiffTool" \ | |
| "-Dexec.args=current-speed" | |
| - name: Upload benchmark artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-full-${{ github.run_id }} | |
| path: | | |
| benchmarks/target/benchmarks/current-speed/** | |
| benchmarks/target/benchmarks/diffs/current-speed/** | |
| if-no-files-found: ignore |