| --- |
| aspects_flags: &aspects_flags |
| - "--config=rustfmt" |
| - "--config=clippy" |
| default_linux_targets: &default_linux_targets |
| - "//..." |
| # TODO: Switch manual tag to platform constraint after bazel 4.0. |
| - "//test/versioned_dylib:versioned_dylib_test" |
| default_macos_targets: &default_macos_targets |
| - "--" |
| - "//..." |
| default_windows_targets: &default_windows_targets |
| - "--" # Allows negative patterns; hack for https://github.com/bazelbuild/continuous-integration/pull/245 |
| - "//..." |
| - "-//bindgen/..." |
| - "-//test/proto/..." |
| - "-//tools/rust_analyzer/..." |
| crate_universe_vendor_example_targets: &crate_universe_vendor_example_targets |
| - "//vendor_external:crates_vendor" |
| - "//vendor_local_manifests:crates_vendor" |
| - "//vendor_local_pkgs:crates_vendor" |
| - "//vendor_remote_manifests:crates_vendor_manifests" |
| - "//vendor_remote_pkgs:crates_vendor_pkgs" |
| tasks: |
| ubuntu2004: |
| build_targets: *default_linux_targets |
| test_targets: *default_linux_targets |
| coverage_targets: *default_linux_targets |
| rbe_ubuntu1604: |
| shell_commands: |
| - sed -i 's/^# load("@bazelci_rules/load("@bazelci_rules/' WORKSPACE.bazel |
| - sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel |
| build_targets: |
| - "//..." |
| test_targets: |
| - "--" # Allows negative patterns; hack for https://github.com/bazelbuild/continuous-integration/pull/245 |
| - "//..." |
| - "//test/..." |
| - "-//test/conflicting_deps:conflicting_deps_test" |
| macos: |
| build_targets: *default_macos_targets |
| test_targets: *default_macos_targets |
| coverage_targets: *default_macos_targets |
| build_flags: *aspects_flags |
| windows: |
| build_flags: |
| - "--enable_runfiles" # this is not enabled by default on windows and is necessary for the cargo build scripts |
| - "--config=rustfmt" |
| - "--config=clippy" |
| build_targets: *default_windows_targets |
| test_targets: *default_windows_targets |
| ubuntu2004_with_aspects: |
| name: With Aspects |
| platform: ubuntu2004 |
| build_targets: *default_linux_targets |
| test_targets: *default_linux_targets |
| build_flags: *aspects_flags |
| rbe_ubuntu1604_with_aspects: |
| name: With Aspects |
| platform: rbe_ubuntu1604 |
| shell_commands: |
| - sed -i 's/^# load("@bazelci_rules/load("@bazelci_rules/' WORKSPACE.bazel |
| - sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel |
| build_targets: *default_linux_targets |
| test_targets: |
| - "--" # Allows negative patterns; hack for https://github.com/bazelbuild/continuous-integration/pull/245 |
| - "..." |
| - "//test/..." |
| - "-//test/conflicting_deps:conflicting_deps_test" |
| build_flags: *aspects_flags |
| rbe_ubuntu1604_rolling_with_aspects: |
| name: RBE Rolling Bazel Version With Aspects |
| platform: rbe_ubuntu1604 |
| shell_commands: |
| - sed -i 's/^# load("@bazelci_rules/load("@bazelci_rules/' WORKSPACE.bazel |
| - sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel |
| build_targets: *default_linux_targets |
| test_targets: |
| - "--" # Allows negative patterns; hack for https://github.com/bazelbuild/continuous-integration/pull/245 |
| - "..." |
| - "//test/..." |
| - "-//test/conflicting_deps:conflicting_deps_test" |
| build_flags: *aspects_flags |
| soft_fail: yes |
| bazel: "rolling" |
| macos_with_aspects: |
| name: With Aspects |
| platform: macos |
| build_targets: *default_macos_targets |
| test_targets: *default_macos_targets |
| build_flags: *aspects_flags |
| macos_rolling_with_aspects: |
| name: "Macos Rolling Bazel Version With Aspects" |
| platform: macos |
| build_targets: *default_macos_targets |
| test_targets: *default_macos_targets |
| build_flags: *aspects_flags |
| soft_fail: yes |
| bazel: "rolling" |
| windows_with_aspects: |
| name: With Aspects |
| platform: windows |
| build_flags: |
| - "--enable_runfiles" # this is not enabled by default on windows and is necessary for the cargo build scripts |
| - "--config=rustfmt" |
| - "--config=clippy" |
| build_targets: *default_windows_targets |
| test_targets: *default_windows_targets |
| windows_rolling_with_aspects: |
| name: "Windows Rolling Bazel Version With Aspects" |
| platform: windows |
| build_flags: |
| - "--enable_runfiles" # this is not enabled by default on windows and is necessary for the cargo build scripts |
| - "--config=rustfmt" |
| - "--config=clippy" |
| build_targets: *default_windows_targets |
| test_targets: *default_windows_targets |
| soft_fail: yes |
| bazel: "rolling" |
| ubuntu2004_clang: |
| name: With Clang |
| platform: ubuntu2004 |
| build_flags: |
| - "--config=rustfmt" |
| - "--config=clippy" |
| - "--repo_env=CC=clang" |
| build_targets: *default_linux_targets |
| test_targets: *default_linux_targets |
| ubuntu2004_clang_lld: |
| name: With Clang and LLD |
| platform: ubuntu2004 |
| shell_commands: |
| - "sudo apt -y update && sudo apt -y install lld" |
| build_flags: |
| - "--config=rustfmt" |
| - "--config=clippy" |
| - "--repo_env=CC=clang" |
| - "--linkopt=-fuse-ld=lld" |
| build_targets: *default_linux_targets |
| test_targets: *default_linux_targets |
| ubuntu2004_rolling_clang: |
| name: Rolling Bazel Version With Clang |
| platform: ubuntu2004 |
| build_flags: |
| - "--config=rustfmt" |
| - "--config=clippy" |
| - "--repo_env=CC=clang" |
| build_targets: *default_linux_targets |
| test_targets: *default_linux_targets |
| soft_fail: yes |
| bazel: "rolling" |
| ubuntu1804: |
| name: "Min Bazel Version" |
| bazel: "5.0.0" |
| platform: ubuntu1804 |
| build_targets: *default_linux_targets |
| test_targets: *default_linux_targets |
| ubuntu1804_with_aspects: |
| name: "Min Bazel Version With Aspects" |
| bazel: "5.0.0" |
| platform: ubuntu1804 |
| build_targets: *default_linux_targets |
| test_targets: *default_linux_targets |
| build_flags: *aspects_flags |
| ubuntu2004_rolling_with_aspects: |
| name: "Rolling Bazel Version With Aspects" |
| bazel: "rolling" |
| platform: ubuntu2004 |
| soft_fail: yes |
| build_targets: *default_linux_targets |
| test_targets: *default_linux_targets |
| build_flags: *aspects_flags |
| linux_docs: |
| name: Docs |
| platform: ubuntu2004 |
| working_directory: docs |
| build_targets: |
| - //... |
| run_targets: |
| - "//:test_docs" |
| clippy_failure: |
| name: Negative Clippy Tests |
| platform: ubuntu2004 |
| run_targets: |
| - "//test/clippy:clippy_failure_test" |
| rustfmt_failure: |
| name: Negative Rustfmt Tests |
| platform: ubuntu2004 |
| run_targets: |
| - "//test/rustfmt:test_runner" |
| rust_analyzer_tests: |
| name: Rust-Analyzer Tests |
| platform: ubuntu2004 |
| run_targets: |
| - "//test/rust_analyzer:rust_analyzer_test" |
| ubuntu2004_examples: |
| name: Examples |
| platform: ubuntu2004 |
| working_directory: examples |
| build_targets: |
| - "//..." |
| test_targets: |
| - "//..." |
| build_flags: *aspects_flags |
| ubuntu2004_examples_clang: |
| name: Examples with Clang |
| platform: ubuntu2004 |
| working_directory: examples |
| build_flags: |
| - "--repo_env=CC=clang" |
| build_targets: |
| - "//..." |
| test_targets: |
| - "//..." |
| build_flags: *aspects_flags |
| ubuntu2004_examples_clang_lld: |
| name: Examples with Clang and LLD |
| platform: ubuntu2004 |
| shell_commands: |
| - "sudo apt -y update && sudo apt -y install lld" |
| working_directory: examples |
| build_flags: |
| - "--repo_env=CC=clang" |
| - "--linkopt=-fuse-ld=lld" |
| build_targets: |
| - "//..." |
| test_targets: |
| - "//..." |
| build_flags: *aspects_flags |
| ubuntu2004_examples_rolling: |
| name: "Examples with Rolling Bazel Version" |
| platform: ubuntu2004 |
| working_directory: examples |
| build_targets: |
| - "//..." |
| test_targets: |
| - "//..." |
| build_flags: *aspects_flags |
| soft_fail: yes |
| rbe_ubuntu1604_examples: |
| name: Examples |
| platform: rbe_ubuntu1604 |
| working_directory: examples |
| rbe_examples_targets: &rbe_examples_targets |
| - "--" # Allows negative patterns; hack for https://github.com/bazelbuild/continuous-integration/pull/245 |
| - "//..." |
| # TODO: This requires an updated `rules_foreign_cc` |
| - "-//sys/..." |
| # See https://github.com/bazelbuild/bazel/issues/9987 |
| - "-//ffi/rust_calling_c:matrix_dylib_test" |
| # The bindgen rules currently do not work on RBE |
| # see: https://github.com/bazelbuild/rules_rust/issues/919 |
| - "-//bindgen/..." |
| shell_commands: |
| - sed -i 's/^# load("@bazelci_rules/load("@bazelci_rules/' WORKSPACE.bazel |
| - sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel |
| build_targets: *rbe_examples_targets |
| test_targets: *rbe_examples_targets |
| build_flags: *aspects_flags |
| macos_examples: |
| name: Examples |
| platform: macos |
| working_directory: examples |
| build_targets: |
| - "//..." |
| test_targets: |
| - "--" # Allows negative patterns; hack for https://github.com/bazelbuild/continuous-integration/pull/245 |
| - "//..." |
| build_flags: *aspects_flags |
| windows_examples: |
| name: Examples |
| platform: windows |
| working_directory: examples |
| build_flags: |
| - "--enable_runfiles" # this is not enabled by default on windows and is necessary for the cargo build scripts |
| - "--config=rustfmt" |
| - "--config=clippy" |
| windows_targets: &windows_targets |
| - "--" # Allows negative patterns; hack for https://github.com/bazelbuild/continuous-integration/pull/245 |
| - "//..." |
| # The bindgen rules currently do not work on windows |
| # see: https://github.com/bazelbuild/rules_rust/issues/919 |
| - "-//bindgen/..." |
| # The proto rules do not work on windows |
| - "-//proto/..." |
| # The wasm rules do not work on windows |
| - "-//wasm/..." |
| build_targets: *windows_targets |
| test_targets: *windows_targets |
| crate_universe_examples_ubuntu2004: |
| name: Crate Universe Examples |
| platform: ubuntu2004 |
| working_directory: examples/crate_universe |
| run_targets: *crate_universe_vendor_example_targets |
| build_targets: |
| - "//..." |
| test_targets: |
| - "//..." |
| build_flags: *aspects_flags |
| crate_universe_rbe_ubuntu1604: |
| name: Crate Universe Examples |
| platform: rbe_ubuntu1604 |
| working_directory: examples/crate_universe |
| shell_commands: |
| - sed -i 's/^# load("@bazelci_rules/load("@bazelci_rules/' WORKSPACE.bazel |
| - sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel |
| run_targets: *crate_universe_vendor_example_targets |
| build_targets: |
| - "//..." |
| test_targets: |
| - "//..." |
| build_flags: *aspects_flags |
| crate_universe_examples_macos: |
| name: Crate Universe Examples |
| platform: macos |
| working_directory: examples/crate_universe |
| run_targets: *crate_universe_vendor_example_targets |
| build_targets: |
| - "//..." |
| test_targets: |
| - "//..." |
| build_flags: *aspects_flags |
| crate_universe_examples_windows: |
| name: Crate Universe Examples |
| platform: windows |
| working_directory: examples/crate_universe |
| batch_commands: |
| - echo startup --windows_enable_symlinks >> user.bazelrc |
| - echo build --enable_runfiles >> user.bazelrc # this is not enabled by default on windows and is necessary for the cargo build scripts |
| run_targets: *crate_universe_vendor_example_targets |
| build_flags: *aspects_flags |
| build_targets: |
| - "//..." |
| # TODO: Temporarily disable this windows build as it recently started |
| # failing. This is likely an issue with the windows workers in CI. |
| - "-//vendor_local_pkgs/..." |
| - "-//vendor_remote_pkgs/..." |
| - "-//no_cargo_manifests/..." |
| test_targets: |
| - "//..." |
| # TODO: Temporarily disable this windows build as it recently started |
| # failing. This is likely an issue with the windows workers in CI. |
| - "-//vendor_local_pkgs/..." |
| - "-//vendor_remote_pkgs/..." |
| - "-//no_cargo_manifests/..." |
| buildifier: |
| version: latest |
| warnings: "all" |