Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BCR presubmit: support specify a test module #1302

Closed
meteorcloudy opened this issue Jan 10, 2022 · 4 comments
Closed

BCR presubmit: support specify a test module #1302

meteorcloudy opened this issue Jan 10, 2022 · 4 comments
Assignees

Comments

@meteorcloudy
Copy link
Member

meteorcloudy commented Jan 10, 2022

Context: https://groups.google.com/a/bazel.build/g/external-deps/c/GcV1cpRd-Ls/m/1UU9Ez_DDQAJ

In the presubmit.yml file, allow BCR modules to specify a test module (with bcr_test_module, module_path and its task configurations) to verify the basic functionalities of the checked-in module. The top level of task configurations are only used to verify the build targets.

#1300 makes the configuration file simpler.

Example (meteorcloudy/bazel-central-registry#7):

matrix:
  platform: ["centos7", "debian10", "macos", "ubuntu2004", "windows"]

tasks:
  verify_targets:
    name: "Verify build targets"
    platform: ${{ platform }}
    build_targets:
    - '@protobuf//:protobuf'
    - '@protobuf//:protobuf_lite'
    - '@protobuf//:protoc'
    - '@protobuf//:test_messages_proto2_proto_cc'

bcr_test_module:
  module_path: "examples"
  matrix:
    platform: ["centos7", "debian10", "macos", "ubuntu2004", "windows"]
  tasks:
    run_test_module:
      name: "Run test module"
      platform: ${{ platform }}
      build_targets:
      - "//..."
@meteorcloudy meteorcloudy self-assigned this Jan 10, 2022
@meteorcloudy
Copy link
Member Author

/cc @fmeum @alexeagle What do you think of this?

@fmeum
Copy link
Contributor

fmeum commented Jan 10, 2022

Looks good to me. I like that this now has the same format as the top-level test config, just one level deeper in.

meteorcloudy added a commit that referenced this issue Jan 11, 2022
BCR modules can now specify task configurations for a test module under
`bcr_test_module`.

Closes: #1302
meteorcloudy added a commit that referenced this issue Jan 11, 2022
BCR modules can now specify task configurations for a test module under
`bcr_test_module`.

Closes: #1302
@meteorcloudy
Copy link
Member Author

This is now implemented, @fmeum feel free to try it out and give us feedback!

@fmeum
Copy link
Contributor

fmeum commented Jan 11, 2022

I am giving it a try in bazelbuild/bazel-central-registry#61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants