@@ -15,6 +15,31 @@ concurrency:
1515 cancel-in-progress : true
1616
1717jobs :
18+ Static-Checks :
19+ runs-on : ubuntu-latest
20+ timeout-minutes : 30
21+ steps :
22+ - run : echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
23+ - run : echo "🐧 Job is running on a ${{ runner.os }} server!"
24+ - run : echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
25+ - name : Check out repository code
26+ uses : actions/checkout@v6
27+ - name : Setup Bazel
28+ uses : bazel-contrib/setup-bazel@0.18.0
29+ with :
30+ # Avoid downloading Bazel every time.
31+ bazelisk-cache : true
32+ # Store build cache per workflow.
33+ disk-cache : ${{ github.workflow }}
34+ # Share repository cache between workflows.
35+ repository-cache : true
36+ # Never write to the cache, strictly read-only
37+ cache-save : false
38+ - name : Unwanted Dependencies
39+ run : .github/workflows/unwanted_deps.sh
40+ - name : Cross-artifact Duplicate Classes Check
41+ run : .github/workflows/cross_artifact_dependencies_check.sh
42+ - run : echo "🍏 This job's status is ${{ job.status }}."
1843 Bazel-Tests :
1944 runs-on : ubuntu-latest
2045 timeout-minutes : 30
@@ -25,14 +50,16 @@ jobs:
2550 - name : Check out repository code
2651 uses : actions/checkout@v6
2752 - name : Setup Bazel
28- uses : bazel-contrib/setup-bazel@0.14 .0
53+ uses : bazel-contrib/setup-bazel@0.18 .0
2954 with :
3055 # Avoid downloading Bazel every time.
3156 bazelisk-cache : true
3257 # Store build cache per workflow.
3358 disk-cache : ${{ github.workflow }}
3459 # Share repository cache between workflows.
3560 repository-cache : true
61+ # Prevent PRs from polluting cache
62+ cache-save : ${{ github.event_name != 'pull_request' }}
3663 - name : Bazel Output Version
3764 run : bazelisk --version
3865 - name : Java 8 Build
@@ -41,19 +68,41 @@ jobs:
4168 # Exclude codelab exercises as they are intentionally made to fail
4269 # Exclude maven conformance tests. They are only executed when there's version change.
4370 run : bazelisk test ... --deleted_packages=//codelab/src/test/codelab --test_output=errors --test_tag_filters=-conformance_maven --build_tag_filters=-conformance_maven
71+ - run : echo "🍏 This job's status is ${{ job.status }}."
4472
45- # -- Start of Maven Conformance Tests (Ran only when there's version changes) --
46- - name : Get changed file
73+ # -- Start of Maven Conformance Tests (Ran only when there's version changes) --
74+ Maven-Conformance :
75+ runs-on : ubuntu-latest
76+ timeout-minutes : 30
77+ steps :
78+ - run : echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
79+ - run : echo "🐧 Job is running on a ${{ runner.os }} server!"
80+ - run : echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
81+ - name : Check out repository code
82+ uses : actions/checkout@v6
83+ - name : Get changed files
4784 id : changed_file
4885 uses : tj-actions/changed-files@v46
4986 with :
5087 files : publish/cel_version.bzl
88+ - name : Setup Bazel
89+ if : steps.changed_file.outputs.any_changed == 'true'
90+ uses : bazel-contrib/setup-bazel@0.18.0
91+ with :
92+ # Avoid downloading Bazel every time.
93+ bazelisk-cache : true
94+ # Store build cache per workflow.
95+ disk-cache : ${{ github.workflow }}
96+ # Share repository cache between workflows.
97+ repository-cache : true
98+ # Never write to the cache, strictly read-only
99+ cache-save : false
51100 - name : Verify Version Consistency
52101 if : steps.changed_file.outputs.any_changed == 'true'
53102 run : |
54103 CEL_VERSION=$(grep 'CEL_VERSION =' publish/cel_version.bzl | cut -d '"' -f 2)
55104
56- MODULE_VERSION=$(grep 'dev.cel:cel ' MODULE.bazel | cut -d '"' -f 2 | cut -d ':' -f 3 )
105+ MODULE_VERSION=$(grep 'CEL_VERSION = ' MODULE.bazel | cut -d '"' -f 2)
57106
58107 if [ -z "$CEL_VERSION" ] || [ -z "$MODULE_VERSION" ]; then
59108 echo "❌ Error: Could not extract one or both version strings."
0 commit comments