Skip to content

Commit

Permalink
[#57173] CI: Add lint Bazel files job
Browse files Browse the repository at this point in the history
Signed-off-by: Eryk Szpotanski <[email protected]>
  • Loading branch information
eszpotanski committed Apr 12, 2024
1 parent b35a2d8 commit 1520013
Showing 1 changed file with 8 additions and 31 deletions.
39 changes: 8 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,19 @@ on:
pull_request:

jobs:
build-stage-target:
name: Build sample stage targets
lint:
name: Lint Bazel files
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
STAGE_TARGET:
- tag_array_64x184_generate_abstract
- L1MetadataArray_test_generate_abstract
- regfile_128x65_floorplan
env:
DEBIAN_FRONTEND: "noninteractive"
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
swap-storage: false
- name: Print info
- name: Download buildifier
run: |
echo "USER: "$(whoami)
echo "PWD: "$(pwd)
ls -la
echo "HOME: "$HOME
docker --version
wget https://github.com/bazelbuild/buildtools/releases/download/v6.4.0/buildifier-linux-amd64 -O /usr/local/bin/buildifier
chmod +x /usr/local/bin/buildifier
buildifier -version
- name: Checkout bazel-orfs
uses: actions/checkout@v4
- name: load docker image
- name: Check Bazel files
run: |
bazel run --subcommands --verbose_failures --sandbox_debug @bazel-orfs//:orfs_env
- name: query target
run: |
bazel query ${{ matrix.STAGE_TARGET }}
bazel query ${{ matrix.STAGE_TARGET }} --output=build
- name: build target
run: |
bazel build --subcommands --verbose_failures --sandbox_debug ${{ matrix.STAGE_TARGET }}
buildifier -lint warn -r .

0 comments on commit 1520013

Please sign in to comment.