62 lines · yaml
1name: Bazel Checks2 3permissions:4 contents: read5 6on:7 push:8 paths:9 - '.github/workflows/bazel-checks.yml'10 - 'utils/bazel/**'11 branches:12 - main13 pull_request:14 paths:15 - '.github/workflows/bazel-checks.yml'16 - 'utils/bazel/**'17 18jobs:19 buildifier:20 name: "Buildifier"21 runs-on: ubuntu-24.0422 if: github.repository == 'llvm/llvm-project'23 steps:24 - name: Fetch LLVM sources25 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.026 - name: Setup Buildifier27 run: |28 sudo curl -L https://github.com/bazelbuild/buildtools/releases/download/v8.2.1/buildifier-linux-amd64 -o /usr/bin/buildifier --fail29 sudo chmod +x /usr/bin/buildifier30 - name: Run Buildifier31 run: |32 buildifier --mode=check $(find ./utils/bazel -name *BUILD*)33 34 bazel-build:35 name: "Bazel Build/Test"36 # Only run on US Central workers so we only have to keep one cache warm as37 # the cache buckets are per cluster.38 runs-on:39 group: llvm-premerge-cluster-us-central40 labels: llvm-premerge-linux-runners41 if: github.repository == 'llvm/llvm-project'42 steps:43 - name: Fetch LLVM sources44 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.045 # TODO(boomanaiden154): We should use a purpose built container for this. Move46 # over when we have fixed the issues with using custom containers with Github47 # ARC in GKE.48 - name: Setup System Dependencies49 run: |50 sudo apt-get update51 sudo apt-get install -y libmpfr-dev libpfm4-dev m4 libedit-dev52 sudo curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-amd64.deb --fail > /tmp/bazelisk.deb53 sudo apt-get install -y /tmp/bazelisk.deb54 rm /tmp/bazelisk.deb55 - name: Build/Test56 working-directory: utils/bazel57 run: |58 bazelisk test --config=ci --sandbox_base="" \59 --remote_cache=https://storage.googleapis.com/$CACHE_GCS_BUCKET-bazel \60 --google_default_credentials \61 @llvm-project//... //...62