mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[bazel][ci] Add CI action to generate pregen patch (#8816)
There were complaints about no patch files being created from CI when the examples pre-gen fails for people who don't build with bazel. This adds a new action step to run just the non-robotpy pregen. I also added an argument to the diff tests to make it a unified diff, which might make it easier to hand fix.
This commit is contained in:
29
.github/workflows/bazel.yml
vendored
29
.github/workflows/bazel.yml
vendored
@@ -136,6 +136,35 @@ jobs:
|
||||
path: "*-bazel-lint-fixes.patch"
|
||||
if: ${{ failure() }}
|
||||
|
||||
non_robotpy_pregeneration:
|
||||
name: "Non-RobotPy Pregen"
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with: { fetch-depth: 0 }
|
||||
|
||||
- id: Setup_bazel_remote
|
||||
uses: ./.github/actions/setup-bazel-remote
|
||||
with:
|
||||
username: ${{ secrets.BAZEL_CACHE_USERNAME }}
|
||||
password: ${{ secrets.BAZEL_CACHE_PASSWORD }}
|
||||
|
||||
- name: Run Non-RobotPy pregeneration
|
||||
run: bazel run //:write_pregenerated_files
|
||||
|
||||
- name: Check Output
|
||||
run: git --no-pager diff --exit-code HEAD
|
||||
|
||||
- name: Generate diff
|
||||
run: git diff HEAD > non-robotpy-pregeneration.patch
|
||||
if: ${{ failure() }}
|
||||
|
||||
- uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: non-robotpy-pregeneration-fixes
|
||||
path: non-robotpy-pregeneration.patch
|
||||
if: ${{ failure() }}
|
||||
|
||||
robotpy_pregeneration:
|
||||
name: "Robotpy Pregeneration"
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
Reference in New Issue
Block a user