regular_conformance.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. name: Run Conformance Tests
  2. # This workflow is a subset of the build.yml. It *only* try to run the
  3. # conformance checks. It is triggered weekly on a cron to catch when new
  4. # conformance tests are added and they don't pass.
  5. #
  6. # Without this workflow the new tests wouldn't be noticed until a PR was made.
  7. #
  8. # This workflow shares the caching logic with build.yml. It should serve to
  9. # update a subset of the caches for when things do land on trunk. If that
  10. # is deemed not worth it in the future, this can be simplify.
  11. # NOTE: If making changes to most of the steps, please also look to update
  12. # build.yml also.
  13. permissions:
  14. contents: read
  15. on:
  16. schedule:
  17. # Every Sunday at 5am.
  18. - cron: '0 5 * * 0'
  19. # Also allow manual triggering from the github UX to revalidate things.
  20. workflow_dispatch:
  21. jobs:
  22. build:
  23. runs-on: ubuntu-latest
  24. strategy:
  25. matrix:
  26. # We "float" the bug fix so we pick up new ones. This helps since the GitHub CI
  27. # is set to ensure the actions pass, thus updates are only needed when the
  28. # "major.minor" pairs changes.
  29. #
  30. # Looking at https://hub.docker.com/_/swift, the version only tags (i.e. - 6.1)
  31. # could use different Ubuntu releases. At the moment they are all the "noble",
  32. # which is also what would be desired, so we don't bother listing explicit ones.
  33. swift:
  34. - "6.2"
  35. container:
  36. image: swift:${{ matrix.swift }}
  37. steps:
  38. - name: Checkout
  39. uses: actions/checkout@v4
  40. with:
  41. submodules: true
  42. - name: Update and install dependencies
  43. # dependencies from https://github.com/protocolbuffers/protobuf/blob/main/src/README.md
  44. run: apt-get update && apt-get install -y make g++ cmake
  45. - name: Build protobuf
  46. working-directory: Sources/protobuf/protobuf
  47. # https://github.com/protocolbuffers/protobuf/blob/main/cmake/README.md#c-version
  48. run: |
  49. mkdir cmake_build
  50. cd cmake_build
  51. cmake \
  52. -DCMAKE_CXX_STANDARD=17 \
  53. -DCMAKE_BUILD_TYPE=Release \
  54. -Dprotobuf_BUILD_TESTS=OFF \
  55. -Dprotobuf_INSTALL=OFF \
  56. -Dprotobuf_BUILD_CONFORMANCE=ON \
  57. -S ..
  58. NUM_CPUS=$(getconf _NPROCESSORS_ONLN)
  59. make -j "${NUM_CPUS}" protoc conformance_test_runner
  60. - name: Test conformance
  61. run: make test-conformance CONFORMANCE_TEST_RUNNER=Sources/protobuf/protobuf/cmake_build/conformance_test_runner