name: Test, build and pre-release weekly
on:
  workflow_dispatch:
  schedule:
    - cron: '32 1 * * 1'

jobs:
  compiler_tests:
    uses: ./.github/workflows/compiler_tests.yml
  
  simulator_tests:
    uses: ./.github/workflows/simulator_tests.yml
  
  python2_tests:
    uses: ./.github/workflows/python2_tests.yml
  
  ios_swift_tests:
    uses: ./.github/workflows/ios_swift_tests.yml
  
  platformio_tests:
    uses: ./.github/workflows/platformio_tests.yml
  
  bazel_tests:
    uses: ./.github/workflows/bazel.yml

  cifuzz:
    uses: ./.github/workflows/cifuzz.yml
  
  binary_packages:
    needs: [compiler_tests, simulator_tests, python2_tests, ios_swift_tests, platformio_tests, cifuzz]
    uses: ./.github/workflows/binary_packages.yml

  pypi_publish:
    needs: binary_packages
    uses: ./.github/workflows/pypi_publish.yml
    secrets:
      PYPI_API_KEY: ${{ secrets.PYPI_API_KEY }}

