name: Run Conformance Tests # This workflow is a subset of the build.yml. It *only* try to run the # conformance checks. It is triggered weekly on a cron to catch when new # conformance tests are added and they don't pass. # # Without this workflow the new tests wouldn't be noticed until a PR was made. # # This workflow shares the caching logic with build.yml. It should serve to # update a subset of the caches for when things do land on trunk. If that # is deemed not worth it in the future, this can be simplify. # NOTE: If making changes to most of the steps, please also look to update # build.yml also. permissions: contents: read on: schedule: # Every Sunday at 5am. - cron: '0 5 * * 0' # Also allow manual triggering from the github UX to revalidate things. workflow_dispatch: jobs: build: runs-on: ubuntu-latest strategy: matrix: # We "float" the bug fix so we pick up new ones. This helps since the GitHub CI # is set to ensure the actions pass, thus updates are only needed when the # "major.minor" pairs changes. # # Looking at https://hub.docker.com/_/swift, the version only tags (i.e. - 6.1) # could use different Ubuntu releases. At the moment they are all the "noble", # which is also what would be desired, so we don't bother listing explicit ones. swift: - "6.2" container: image: swift:${{ matrix.swift }} steps: - name: Checkout uses: actions/checkout@v4 with: submodules: true - name: Update and install dependencies # dependencies from https://github.com/protocolbuffers/protobuf/blob/main/src/README.md run: apt-get update && apt-get install -y make g++ cmake - name: Build protobuf working-directory: Sources/protobuf/protobuf # https://github.com/protocolbuffers/protobuf/blob/main/cmake/README.md#c-version run: | mkdir cmake_build cd cmake_build cmake \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_BUILD_TYPE=Release \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_INSTALL=OFF \ -Dprotobuf_BUILD_CONFORMANCE=ON \ -S .. NUM_CPUS=$(getconf _NPROCESSORS_ONLN) make -j "${NUM_CPUS}" protoc conformance_test_runner - name: Test conformance run: make test-conformance CONFORMANCE_TEST_RUNNER=Sources/protobuf/protobuf/cmake_build/conformance_test_runner