diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index 6f22609..f66b49c 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml @@ -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: @@ -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: diff --git a/.github/workflows/lint_format.yml b/.github/workflows/lint_format.yml index 726e96f..6bf5e02 100644 --- a/.github/workflows/lint_format.yml +++ b/.github/workflows/lint_format.yml @@ -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/buildifier@4.0.1 - - name: Install Unused Deps - run: | - cd $(mktemp -d) - GO111MODULE=on go get github.com/bazelbuild/buildtools/unused_deps@4.0.1 - - # 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/unused_deps@4.0.1 + # 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() }}