@ -119,3 +119,31 @@ jobs:
mv `which python3` /tmp &&
! which python3 &&
bazel test $BAZEL_FLAGS --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 //upb/python/... -- -//upb/python/dist:source_wheel
build_wheels:
name : Build Wheels
runs-on : ubuntu-latest
if : ${{ github.event_name == 'pull_request' }}
steps:
- name : Checkout pending changes
uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
ref : ${{ inputs.safe-checkout }}
- name : Build Wheels
uses : protocolbuffers/protobuf-ci/bazel-docker@v2
with:
image : us-docker.pkg.dev/protobuf-build/release-containers/linux/apple@sha256:bb1d14738449916d489c1cbb062508c4dca5bd265ea3e67a2628ae40912b9b00
credentials : ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache : upb-bazel-python
bazel : build --crosstool_top=//toolchain:clang_suite --//toolchain:release=true --symlink_prefix=/ -c dbg //upb/python/dist //upb/python/dist:test_wheel //upb/python/dist:source_wheel
- name : Move Wheels
run : mkdir wheels && find _build/out \( -name 'protobuf*.whl' -o -name 'protobuf-*.tar.gz' \) -exec mv '{}' wheels ';'
- uses : actions/upload-artifact@v3
with:
name : python-wheels
path : wheels/
- uses : actions/upload-artifact@v3
with:
name : requirements
# Tests shouldn't have access to the whole upb repo, upload the one file we need
path : upb/python/requirements.txt