Workflow started by l46kok. #8839
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: CEL-Java CI | |
| run-name: Workflow started by ${{ github.actor }}. | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| pull_request: | |
| branches: | |
| - 'main' | |
| # Cancel previous workflows on the PR when there are multiple fast commits. | |
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| Bazel-Build-Java8: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | |
| - run: echo "🐧 Job is running on a ${{ runner.os }} server!" | |
| - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
| - name: Check out repository code | |
| uses: actions/checkout@v6 | |
| - name: Mark job start | |
| run: touch "$RUNNER_TEMP/job-start" | |
| - name: Setup Bazel | |
| uses: bazel-contrib/setup-bazel@0.18.0 | |
| with: | |
| # Store build cache per workflow. | |
| disk-cache: ${{ github.workflow }}-${{ github.job }} | |
| # Prevent PRs from polluting cache | |
| cache-save: ${{ github.event_name != 'pull_request' }} | |
| - name: Bazel Output Version | |
| run: bazelisk --version | |
| - name: Java 8 Build | |
| run: bazel build ... --java_language_version=8 --java_runtime_version=8 --build_tag_filters=-conformance_maven | |
| - name: Unwanted Dependencies | |
| run: .github/workflows/unwanted_deps.sh | |
| - name: Cross-artifact Duplicate Classes Check | |
| run: .github/workflows/cross_artifact_dependencies_check.sh | |
| - name: Prune disk cache entries not used by this job | |
| # Bazel bumps mtimes on use; drop stale entries so the saved cache doesn't grow unbounded. | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| du -sh ~/.cache/bazel-disk | |
| find ~/.cache/bazel-disk -type f ! -newer "$RUNNER_TEMP/job-start" -delete | |
| du -sh ~/.cache/bazel-disk | |
| - run: echo "🍏 This job's status is ${{ job.status }}." | |
| Bazel-Tests: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | |
| - run: echo "🐧 Job is running on a ${{ runner.os }} server!" | |
| - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
| - name: Check out repository code | |
| uses: actions/checkout@v6 | |
| - name: Mark job start | |
| run: touch "$RUNNER_TEMP/job-start" | |
| - name: Setup Bazel | |
| uses: bazel-contrib/setup-bazel@0.18.0 | |
| with: | |
| # Store build cache per workflow. | |
| disk-cache: ${{ github.workflow }}-${{ github.job }} | |
| # Prevent PRs from polluting cache | |
| cache-save: ${{ github.event_name != 'pull_request' }} | |
| - name: Bazel Output Version | |
| run: bazelisk --version | |
| - name: Bazel Test | |
| # Exclude codelab exercises as they are intentionally made to fail | |
| # Exclude maven conformance tests. They are only executed when there's version change. | |
| run: bazelisk test ... --deleted_packages=//codelab/src/test/codelab --test_output=errors --test_tag_filters=-conformance_maven --build_tag_filters=-conformance_maven | |
| - name: Prune disk cache entries not used by this job | |
| # Bazel bumps mtimes on use; drop stale entries so the saved cache doesn't grow unbounded. | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| du -sh ~/.cache/bazel-disk | |
| find ~/.cache/bazel-disk -type f ! -newer "$RUNNER_TEMP/job-start" -delete | |
| du -sh ~/.cache/bazel-disk | |
| - run: echo "🍏 This job's status is ${{ job.status }}." | |
| # -- Start of Maven Conformance Tests (Ran only when there's version changes) -- | |
| Maven-Conformance: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | |
| - run: echo "🐧 Job is running on a ${{ runner.os }} server!" | |
| - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
| - name: Check out repository code | |
| uses: actions/checkout@v6 | |
| - name: Get changed files | |
| id: changed_file | |
| uses: tj-actions/changed-files@v47 | |
| with: | |
| files: publish/cel_version.bzl | |
| - name: Setup Bazel | |
| if: steps.changed_file.outputs.any_changed == 'true' | |
| uses: bazel-contrib/setup-bazel@0.18.0 | |
| with: | |
| # Store build cache per workflow. | |
| disk-cache: ${{ github.workflow }}-${{ github.job }} | |
| # Never write to the cache, strictly read-only | |
| cache-save: false | |
| - name: Verify Version Consistency | |
| if: steps.changed_file.outputs.any_changed == 'true' | |
| run: | | |
| CEL_VERSION=$(grep 'CEL_VERSION =' publish/cel_version.bzl | cut -d '"' -f 2) | |
| MODULE_VERSION=$(grep 'CEL_VERSION =' MODULE.bazel | cut -d '"' -f 2) | |
| if [ -z "$CEL_VERSION" ] || [ -z "$MODULE_VERSION" ]; then | |
| echo "❌ Error: Could not extract one or both version strings." | |
| exit 1 | |
| fi | |
| echo "Version in publish/cel_version.bzl: ${CEL_VERSION}" | |
| echo "Version in MODULE.bazel: ${MODULE_VERSION}" | |
| if [ "$CEL_VERSION" != "$MODULE_VERSION" ]; then | |
| echo "❌ Error: Version mismatch between files!" | |
| exit 1 | |
| fi | |
| echo "✅ Versions match." | |
| - name: Run Conformance Maven Test on Version Change | |
| if: steps.changed_file.outputs.any_changed == 'true' | |
| run: bazelisk test //conformance/src/test/java/dev/cel/conformance:conformance_maven --test_output=errors | |
| - run: echo "🍏 This job's status is ${JOB_STATUS}." | |
| env: | |
| JOB_STATUS: ${{ job.status }} |