bcr_test_module:
  module_path: Examples/bzlmod
  matrix:
    bazel:
      - 7.x
  tasks:
    verify_targets_linux:
      name: Verify Targets (Linux)
      platform: ubuntu2004
      bazel: ${{ bazel }}
      environment:
        CC: "clang"
        SWIFT_VERSION: "5.9.2"
        SWIFT_HOME: "$HOME/swift-5.9.2"
        PATH: "$PATH:$HOME/swift-5.9.2/usr/bin"
      shell_commands:
        - "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME"
        - "mkdir $SWIFT_HOME"
        - "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2004/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu20.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME"
      build_flags:
        - "--action_env=PATH"
      build_targets:
        - "//..."
    verify_targets_macos:
      name: Verify Targets (macOS)
      platform: macos
      bazel: ${{ bazel }}
      build_targets:
        - "//..."
      build_flags:
        - "--repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1"
