Require Bazel 8+ #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main, grafana-foundation-sdk] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| bazel: ["latest"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Bazel | |
| uses: bazel-contrib/setup-bazel@0.14.0 | |
| with: | |
| bazelisk-version: "1.27.0" | |
| disk-cache: ${{ github.workflow }}-linux-${{ matrix.bazel }} | |
| repository-cache: ${{ github.workflow }} | |
| - name: Build | |
| run: bazel build //... | |
| env: | |
| USE_BAZEL_VERSION: ${{ matrix.bazel }} | |
| - name: Test | |
| run: bazel test //... --test_tag_filters=-docker | |
| env: | |
| USE_BAZEL_VERSION: ${{ matrix.bazel }} | |
| - name: Test Docker targets | |
| run: bazel test //test:grafana_docker_test //test:grafana_with_plugins_docker_test | |
| env: | |
| USE_BAZEL_VERSION: ${{ matrix.bazel }} | |
| build-macos: | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| bazel: ["latest"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Bazel | |
| uses: bazel-contrib/setup-bazel@0.14.0 | |
| with: | |
| bazelisk-version: "1.27.0" | |
| disk-cache: ${{ github.workflow }}-macos-${{ matrix.bazel }} | |
| repository-cache: ${{ github.workflow }} | |
| # On macOS, only build non-OCI targets (Grafana OCI image is linux/amd64 only) | |
| - name: Build (excluding OCI targets) | |
| run: bazel build //grafana/... //test:json_dashboards //test:py_dashboards | |
| env: | |
| USE_BAZEL_VERSION: ${{ matrix.bazel }} | |
| - name: Test (excluding docker tests) | |
| run: bazel test //test:json_no_uid_test //test:json_existing_uid_test //test:py_dash_test //grafana:requirements.test | |
| env: | |
| USE_BAZEL_VERSION: ${{ matrix.bazel }} |