Release v1.6.0 #19
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 | |
| pull_request: | |
| branches: | |
| - main | |
| 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 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| 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 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| cache: maven | |
| - name: Build and run tests | |
| run: ./mvnw -B -ntp clean verify | |
| - name: Generate Javadoc | |
| run: ./mvnw -B -ntp javadoc:javadoc | |
| 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 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| cache: maven | |
| - name: Run coarse performance smoke benchmark | |
| run: | | |
| ./mvnw -B -ntp -DskipTests test-compile \ | |
| "org.codehaus.mojo:exec-maven-plugin:3.5.0:java" \ | |
| "-Dexec.mainClass=com.demcha.compose.CurrentSpeedBenchmark" \ | |
| "-Dexec.classpathScope=test" \ | |
| "-Dgraphcompose.benchmark.profile=smoke" | |
| - name: Upload smoke benchmark artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-smoke-${{ github.run_id }} | |
| path: 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 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| cache: maven | |
| - name: Restore benchmark history cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: 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: Run full benchmark suite | |
| run: | | |
| ./mvnw -B -ntp -DskipTests test-compile \ | |
| "org.codehaus.mojo:exec-maven-plugin:3.5.0:java" \ | |
| "-Dexec.mainClass=com.demcha.compose.CurrentSpeedBenchmark" \ | |
| "-Dexec.classpathScope=test" \ | |
| "-Dgraphcompose.benchmark.profile=full" \ | |
| "-Dgraphcompose.benchmark.enforceGate=false" | |
| - name: Count available benchmark runs | |
| id: benchmark-runs | |
| run: | | |
| count=0 | |
| if [ -d target/benchmarks/current-speed ]; then | |
| count=$(find 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 -DskipTests test-compile \ | |
| "org.codehaus.mojo:exec-maven-plugin:3.5.0:java" \ | |
| "-Dexec.mainClass=com.demcha.compose.BenchmarkDiffTool" \ | |
| "-Dexec.classpathScope=test" \ | |
| "-Dexec.args=current-speed" | |
| - name: Upload benchmark artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-full-${{ github.run_id }} | |
| path: | | |
| target/benchmarks/current-speed/** | |
| target/benchmarks/diffs/current-speed/** | |
| if-no-files-found: ignore |