88
99jobs :
1010 test-jre21 :
11- runs-on : ubuntu-latest
11+ runs-on : ${{ matrix.os }}
12+ strategy :
13+ fail-fast : false
14+ matrix :
15+ include :
16+ - os : ubuntu-latest
17+ bazel : ' 8.x'
18+ - os : ubuntu-latest
19+ bazel : ' 9.x'
20+ - os : macos-latest
21+ bazel : ' 8.x'
22+ - os : macos-latest
23+ bazel : ' 9.x'
1224 steps :
1325 - name : Setup Java JDK
1426 uses : actions/setup-java@v4
@@ -24,48 +36,67 @@ jobs:
2436 run : go install github.com/bazelbuild/bazelisk@latest && export PATH=$PATH:$(go env GOPATH)/bin
2537 - uses : actions/checkout@v4
2638 - name : Run bazel-diff tests
39+ env :
40+ USE_BAZEL_VERSION : ${{ matrix.bazel }}
2741 run : ~/go/bin/bazelisk coverage --combined_report=lcov //cli/... --enable_bzlmod=true --enable_workspace=false
2842 - name : Upload coverage report
2943 uses : actions/upload-artifact@v4
3044 if : always()
3145 with :
32- name : coverage-report-jre21
46+ name : coverage-report-jre21-${{ matrix.os }}-bazel-${{ matrix.bazel }}
3347 path : bazel-out/_coverage/_coverage_report.dat
3448 if-no-files-found : warn
3549 - name : Upload test logs
3650 uses : actions/upload-artifact@v4
3751 if : always()
3852 with :
39- name : test-logs-jre21
53+ name : test-logs-jre21-${{ matrix.os }}-bazel-${{ matrix.bazel }}
4054 path : bazel-testlogs/
4155 if-no-files-found : warn
4256 test-jre11-run-example :
43- runs-on : ubuntu-latest
57+ runs-on : ${{ matrix.os }}
4458 strategy :
4559 fail-fast : false
4660 matrix :
4761 include :
48- - bazel : ' 7.x'
62+ - os : ubuntu-latest
63+ bazel : ' 7.x'
4964 disable_workspace : ' false'
5065 extra_flags : ' '
51- - bazel : ' 7.x'
66+ - os : ubuntu-latest
67+ bazel : ' 7.x'
5268 disable_workspace : ' false'
5369 extra_flags : ' --incompatible_disable_native_repo_rules'
54- - bazel : ' 8.x'
70+ - os : ubuntu-latest
71+ bazel : ' 8.x'
5572 disable_workspace : ' true'
5673 extra_flags : ' '
57- - bazel : ' 8.6.0rc1'
74+ - os : ubuntu-latest
75+ bazel : ' 8.6.0rc1'
5876 disable_workspace : ' true'
5977 extra_flags : ' '
60- - bazel : ' 8.x'
78+ - os : ubuntu-latest
79+ bazel : ' 8.x'
6180 disable_workspace : ' true'
6281 extra_flags : ' --incompatible_disable_native_repo_rules'
63- - bazel : ' 9.x'
82+ - os : ubuntu-latest
83+ bazel : ' 9.x'
6484 disable_workspace : ' true'
6585 extra_flags : ' '
66- - bazel : ' 9.x'
86+ - os : ubuntu-latest
87+ bazel : ' 9.x'
6788 disable_workspace : ' true'
6889 extra_flags : ' --incompatible_disable_native_repo_rules'
90+ # Skip Windows + Bazel 7.x due to protobuf compilation issues on MSVC
91+ # Windows is tested with Bazel 8.x and 9.x which are more current
92+ - os : windows-latest
93+ bazel : ' 8.x'
94+ disable_workspace : ' true'
95+ extra_flags : ' '
96+ - os : windows-latest
97+ bazel : ' 9.x'
98+ disable_workspace : ' true'
99+ extra_flags : ' '
69100 steps :
70101 - name : Setup Java JDK
71102 uses : actions/setup-java@v4
@@ -78,18 +109,39 @@ jobs:
78109 with :
79110 go-version : ^1.17
80111 id : go
81- - name : Setup Bazelisk
112+ - name : Setup Bazelisk (Linux/macOS)
113+ if : runner.os != 'Windows'
82114 run : go install github.com/bazelbuild/bazelisk@latest && export PATH=$PATH:$(go env GOPATH)/bin
115+ - name : Setup Bazelisk (Windows)
116+ if : runner.os == 'Windows'
117+ shell : pwsh
118+ run : |
119+ go install github.com/bazelbuild/bazelisk@latest
120+ $env:PATH = "$env:PATH;$(go env GOPATH)\bin"
121+ echo "$env:USERPROFILE\go\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
83122 - uses : actions/checkout@v4
84123 with :
85124 fetch-depth : 0
86- - name : Run bazel-diff example script
125+ - name : Run bazel-diff example script (Linux)
126+ if : runner.os != 'Windows'
87127 env :
88128 USE_BAZEL_VERSION : ${{ matrix.bazel }}
89129 BAZEL_DIFF_DISABLE_WORKSPACE : ${{ matrix.disable_workspace }}
90130 BAZEL_DIFF_FORCE_CHECKOUT : true
91131 BAZEL_EXTRA_COMMAND_OPTIONS : ${{ matrix.extra_flags }}
92132 run : ./bazel-diff-example.sh "$GITHUB_WORKSPACE" ~/go/bin/bazelisk $(git rev-parse HEAD~1) $(git rev-parse HEAD)
133+ - name : Run bazel-diff example script (Windows)
134+ if : runner.os == 'Windows'
135+ env :
136+ USE_BAZEL_VERSION : ${{ matrix.bazel }}
137+ BAZEL_DIFF_DISABLE_WORKSPACE : ${{ matrix.disable_workspace }}
138+ BAZEL_DIFF_FORCE_CHECKOUT : true
139+ BAZEL_EXTRA_COMMAND_OPTIONS : ${{ matrix.extra_flags }}
140+ shell : pwsh
141+ run : |
142+ $prevRev = git rev-parse HEAD~1
143+ $currRev = git rev-parse HEAD
144+ .\bazel-diff-example.ps1 -WorkspacePath "$env:GITHUB_WORKSPACE" -BazelPath "$env:USERPROFILE\go\bin\bazelisk.exe" -PreviousRevision $prevRev -FinalRevision $currRev
93145 deploy :
94146 needs : [test-jre21]
95147 runs-on : ubuntu-latest
0 commit comments