Skip to content

Commit

Permalink
Try to fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
pjreiniger committed Jul 7, 2024
1 parent 886c22f commit 301a29b
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 19 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
fail-fast: false
matrix:
include:
- { os: windows-latest, architecture: x64, config: "" }
- { os: windows-latest, architecture: x64, config: "--enable_bzlmod" }
- { os: macos-latest, architecture: x64, config: "" }
- { os: macos-latest, architecture: x64, config: "--enable_bzlmod" }
- { os: ubuntu-latest, architecture: x64, config: "" }
- { os: ubuntu-latest, architecture: x64, config: "--enable_bzlmod" }
- { os: windows-latest, architecture: x64, config: "--noenable_bzlmod" }
- { os: windows-latest, architecture: x64, config: "--enable_bzlmod" }
- { os: macos-latest, architecture: x64, config: "--noenable_bzlmod" }
- { os: macos-latest, architecture: x64, config: "--enable_bzlmod" }
- { os: ubuntu-latest, architecture: x64, config: "--noenable_bzlmod" }
- { os: ubuntu-latest, architecture: x64, config: "--enable_bzlmod" }
name: "Build - ${{ matrix.os }} ${{ matrix.architecture }} ${{ matrix.config }}"
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: bazelbuild/setup-bazelisk@v3
- run: bazel run @unpinned_maven//:pin
- run: bazel run @unpinned_maven//:pin --noenable_bzlmod
- run: git diff HEAD
- uses: actions/upload-artifact@v4
with:
Expand Down
70 changes: 58 additions & 12 deletions .github/workflows/lint_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,40 +29,86 @@ jobs:
sudo apt-get install -y clang-format-14
- name: Install wpiformat
run: pip3 install wpiformat

- name: Run wpiformat
run: wpiformat -clang 14

# Check the diff
- name: Check Output
run: git --no-pager diff --exit-code HEAD
- name: Generate diff
run: git diff HEAD > wpiformat-fixes.patch
if: ${{ failure() }}
- uses: actions/upload-artifact@v4
with:
name: wpiformat fixes
path: wpiformat-fixes.patch
if: ${{ failure() }}

buildifier:
- name: Set up Go 1.15.x
uses: actions/setup-go@v5
with:
go-version: 1.15.x
id: go

- name: Install Buildifier
run: |
cd $(mktemp -d)
GO111MODULE=on go get github.com/bazelbuild/buildtools/[email protected]
- name: Install Unused Deps
run: |
cd $(mktemp -d)
GO111MODULE=on go get github.com/bazelbuild/buildtools/[email protected]
# Run formatters
- name: Run wpiformat
run: wpiformat -clang 14
- name: Run buildifier
run: buildifier --lint=fix -r .

# Check the diff
- name: Check Output
run: git --no-pager diff --exit-code HEAD
- name: Generate diff
run: git diff HEAD > buildifier-fixes.patch
if: ${{ failure() }}
- uses: actions/upload-artifact@v4
with:
name: buildifier fixes
path: buildifier-fixes.patch
if: ${{ failure() }}

spotless:
# Run formatters
- name: Run Spotless
run: ./gradlew spotlessApply
- name: Run unused deps
run: unused_deps //...

# Check the diff
- name: Check Output
run: git --no-pager diff --exit-code HEAD
- name: Generate diff
run: git diff HEAD > spotless-fixes.patch
if: ${{ failure() }}
- uses: actions/upload-artifact@v4
with:
name: spotless fixes
path: spotless-fixes.patch
if: ${{ failure() }}

unused_deps:
- name: Set up Go 1.15.x
uses: actions/setup-go@v5
with:
go-version: 1.15.x
id: go
- name: Install Unused Deps
run: |
cd $(mktemp -d)
GO111MODULE=on go get github.com/bazelbuild/buildtools/[email protected]
# Check the diff
- name: Check Output
run: git --no-pager diff --exit-code HEAD
- name: Generate diff
run: git diff HEAD > wpiformat-fixes.patch
run: git diff HEAD > unused-deps-fixes.patch
if: ${{ failure() }}
- uses: actions/upload-artifact@v4
with:
name: wpiformat fixes
path: wpiformat-fixes.patch
name: unused deps fixes
path: unused-deps-fixes.patch
if: ${{ failure() }}

0 comments on commit 301a29b

Please sign in to comment.