matrix:
  unix_platform:
    - debian10
    - debian11
    - macos
    - macos_arm64
    - ubuntu2004
    - ubuntu2204
  platform:
    - debian10
    - debian11
    - macos
    - macos_arm64
    - ubuntu2004
    - ubuntu2204
    - windows
  bazel: [7.x, 8.x, rolling]
tasks:
  verify_targets_use_boringssl:
    name: Verify boringssl build targets
    platform: ${{ unix_platform }}
    bazel: ${{ bazel }}
    build_flags:
      - '--cxxopt=-std=c++17'
      - '--process_headers_in_dependencies'
      - '--@boost.mysql//:ssl=boringssl'
    build_targets:
      - '@boost.mysql//:boost.mysql'
  verify_targets_use_boringssl_on_windows:
    name: Verify boringssl build targets
    platform: windows
    bazel: ${{ bazel }}
    build_flags:
      - '--cxxopt=/std:c++17'
      - '--process_headers_in_dependencies'
      - '--@boost.mysql//:ssl=boringssl'
    build_targets:
      - '@boost.mysql//:boost.mysql'
  verify_targets_use_openssl:
    name: Verify openssl build targets
    platform: ${{ platform }}
    bazel: ${{ bazel }}
    build_flags:
      - '--process_headers_in_dependencies'
      - '--@boost.mysql//:ssl=openssl'
    build_targets:
      - '@boost.mysql//:boost.mysql'
bcr_example_module:
  module_path: example
  matrix:
    unix_platform:
      - debian10
      - debian11
      - macos
      - macos_arm64
      - ubuntu2004
      - ubuntu2204
    platform:
      - debian10
      - debian11
      - macos
      - macos_arm64
      - ubuntu2004
      - ubuntu2204
      - ubuntu2404
      - windows
    bazel: [7.x, 8.x, rolling]
  tasks:
    run_example_module_on_boringssl:
      name: Run example(boringssl) module
      platform: ${{ unix_platform }}
      bazel: ${{ bazel }}
      build_flags:
        - '--cxxopt=-std=c++17'
        - '--process_headers_in_dependencies'
        - '--@boost.mysql//:ssl=boringssl'
      build_targets:
        - //...
      test_targets:
        - //...
    run_example_module_on_boringssl_windows:
      name: Run example(boringssl) module
      platform: windows
      bazel: ${{ bazel }}
      build_flags:
        - '--cxxopt=/std:c++17'
        - '--process_headers_in_dependencies'
        - '--@boost.mysql//:ssl=boringssl'
      build_targets:
        - //...
      test_targets:
        - //...
    run_example_module_on_openssl:
      name: Run example(openssl) module
      platform: ${{ platform }}
      bazel: ${{ bazel }}
      build_flags:
        - '--process_headers_in_dependencies'
        - '--@boost.mysql//:ssl=openssl'
      build_targets:
        - //...
      test_targets:
        - //...

