...

Text file src/github.com/bazelbuild/bazel-gazelle/.bazelci/presubmit.yml

Documentation: github.com/bazelbuild/bazel-gazelle/.bazelci

     1---
     2matrix:
     3  platform:
     4    - ubuntu2204
     5    - macos
     6  bazel: [6.x, 7.x]
     7tasks:
     8  ubuntu2204:
     9    name: Ubuntu 22.04 with WORKSPACE
    10    platform: ubuntu2204
    11    bazel: 7.1.1
    12    build_flags:
    13    - "--noexperimental_enable_bzlmod"
    14    test_flags:
    15    - "--noexperimental_enable_bzlmod"
    16    build_targets:
    17    - "..."
    18    run_targets:
    19    # Run Gazelle on repo to verify BUILD files are up-to-date. The output shouldn't differ
    20    # between platforms, so we only run it from one.
    21    - "//:gazelle_ci"
    22    test_targets:
    23    - "..."
    24  ubuntu2204_bzlmod:
    25    name: Ubuntu 22.04 with Bzlmod
    26    platform: ubuntu2204
    27    bazel: 7.1.1
    28    build_targets:
    29    - "..."
    30    run_targets:
    31    # Run Gazelle on repo to verify BUILD files are up-to-date. The output shouldn't differ
    32    # between platforms, so we only run it from one.
    33    - "//:gazelle_ci"
    34    test_targets:
    35    - "..."
    36    - "-//internal:bazel_test"
    37    - "-//cmd/gazelle:gazelle_test"
    38  bcr_tests:
    39    name: BCR test module
    40    platform: ${{ platform }}
    41    bazel: ${{ bazel }}
    42    working_directory: tests/bcr
    43    shell_commands:
    44    # Regenerate the BUILD files for the test module using Gazelle.
    45    # Also verify -repo_config are generated correctly in gazelle.bash
    46    - rm pkg/BUILD.bazel proto/BUILD.bazel
    47    - bazel run //:gazelle -- update pkg proto
    48    - bazel run //:gazelle -- pkg proto
    49    build_targets:
    50    - "//..."
    51    - "//:gazelle"
    52    test_targets:
    53    # Specify these targets explicitly to verify that Gazelle generates them correctly.
    54    - "//pkg:pkg_test"
    55    - "//proto:proto_test"
    56    - "//..."
    57    - "@test_dep//..."
    58  bcr_test_windows:
    59    name: BCR test on Windows
    60    platform: windows
    61    bazel: ${{ bazel }}
    62    working_directory: tests/bcr
    63    shell_commands:
    64    # Regenerate the BUILD file for the test module using Gazelle.
    65    # Also verify -repo_config are generated correctly in gazelle.bash
    66    - rm pkg/BUILD.bazel
    67    - bazel run //:gazelle -- update pkg
    68    - bazel run //:gazelle -- pkg
    69    build_flags:
    70    # Since go_sdk is platform-dependent, the lockfile will differ between
    71    # platforms. We will skip the check on windows.
    72    - "--lockfile_mode=update"
    73    test_flags:
    74    # See above.
    75    - "--lockfile_mode=update"
    76    build_targets:
    77    - "//..."
    78    - "//:gazelle"
    79    test_targets:
    80    # Specify this target explicitly to verify that Gazelle generated it correctly.
    81    - "//pkg:pkg_test"
    82    - "//..."
    83    - "@test_dep//..."
    84  macos_arm64_bzlmod:
    85    name: Mac OS Arm 64 with Bzlmod
    86    platform: macos_arm64
    87    bazel: 7.1.1
    88    build_targets:
    89    - "..."
    90    test_targets:
    91    - "..."
    92    - "-//internal:bazel_test"
    93    - "-//cmd/gazelle:gazelle_test"
    94  macos_arm64:
    95    name: Mac OS Arm 64 with WORKSPACE
    96    platform: macos_arm64
    97    bazel: 7.1.1
    98    build_flags:
    99    - "--noexperimental_enable_bzlmod"
   100    test_flags:
   101    - "--noexperimental_enable_bzlmod"
   102    build_targets:
   103    - "..."
   104    test_targets:
   105    - "..."
   106  macos_bzlmod:
   107    name: Mac OS with Bzlmod
   108    platform: macos
   109    bazel: 7.1.1
   110    build_targets:
   111    - "..."
   112    test_targets:
   113    - "..."
   114    - "-//internal:bazel_test"
   115    - "-//cmd/gazelle:gazelle_test"
   116  macos:
   117    name: Mac OS with WORKSPACE
   118    platform: macos
   119    bazel: 7.1.1
   120    build_flags:
   121    - "--noexperimental_enable_bzlmod"
   122    test_flags:
   123    - "--noexperimental_enable_bzlmod"
   124    build_targets:
   125    - "..."
   126    test_targets:
   127    - "..."
   128  windows_bzlmod:
   129    name: Windows with Bzlmod
   130    platform: windows
   131    bazel: 7.1.1
   132    build_targets:
   133    - "--"
   134    - "..."
   135    - "-//cmd/autogazelle/..."
   136    test_targets:
   137    - "--"
   138    - "..."
   139    - "-//cmd/gazelle:gazelle_test"
   140    # autogazelle is only supported on UNIX-like platforms.
   141    # It requires UNIX domain sockets.
   142    - "-//cmd/autogazelle/..."
   143    # Stardoc produces different line-endings on windows,
   144    # so the documentation it generates doesn't match the checked in files
   145    - "-//docs:all"
   146    # Fails to execute, apparently due to command-line length limit.
   147    - "-//internal:bazel_test"
   148    # gazelle prints file paths with backward slashes on windows,
   149    # which doesn't match the golden files generated on *nix.
   150    - "-//tests:fix_mode_print0"
   151    - "-//tests:fix_mode_strict"
   152  windows:
   153    name: Windows with WORKSPACE
   154    platform: windows
   155    bazel: 7.1.1
   156    build_flags:
   157    - "--noexperimental_enable_bzlmod"
   158    test_flags:
   159    - "--noexperimental_enable_bzlmod"
   160    build_targets:
   161    - "--"
   162    - "..."
   163    - "-//cmd/autogazelle/..."
   164    test_targets:
   165    - "--"
   166    - "..."
   167    # autogazelle is only supported on UNIX-like platforms.
   168    # It requires UNIX domain sockets.
   169    - "-//cmd/autogazelle/..."
   170    # Stardoc produces different line-endings on windows,
   171    # so the documentation it generates doesn't match the checked in files
   172    - "-//docs:all"
   173    # Fails to execute, apparently due to command-line length limit.
   174    - "-//internal:bazel_test"
   175    # gazelle prints file paths with backward slashes on windows,
   176    # which doesn't match the golden files generated on *nix.
   177    - "-//tests:fix_mode_print0"
   178    - "-//tests:fix_mode_strict"
   179  incompatible:
   180    name: Ubuntu 22.04 with WORKSPACE and --config=incompatible
   181    platform: ubuntu2204
   182    bazel: 7.1.1
   183    build_flags:
   184      - "--noexperimental_enable_bzlmod"
   185      - "--config=incompatible"
   186    build_targets:
   187      - "..."
   188    run_targets:
   189      - "//:gazelle_ci"
   190    test_flags:
   191      - "--noexperimental_enable_bzlmod"
   192      - "--config=incompatible"
   193    test_targets:
   194      - "..."

View as plain text