-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore(crc32c): set up release scripts #18400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
7978918
protect against sdist-only release or crc32c
daniel-sanche 27f5722
temporarily disable releases
daniel-sanche aaf5381
update build scripts
daniel-sanche e826215
use shared versions list
daniel-sanche 9441778
restored release configs
daniel-sanche 2eb1931
reverted requirements file
daniel-sanche 05c0b9d
added final wheel check
daniel-sanche 46c7b58
address PR comments
daniel-sanche 8b9c74a
remove unneeded venv
daniel-sanche c0e6979
address kokoro build issues
daniel-sanche 4c42105
removed release pinned dependencies
daniel-sanche 355fcbd
change directory in windows
daniel-sanche 92a0287
fixed versions
daniel-sanche 678d58e
address apple silicon build issues
daniel-sanche 1883d6c
address CI issues
daniel-sanche 49d95f1
use python installs instead of brew
daniel-sanche File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| # Build logs will be here | ||
| action { | ||
| define_artifacts { | ||
| regex: "**/*sponge_log.xml" | ||
| } | ||
| } | ||
|
|
||
| # Store built wheels for audit/SBOM/dry-run inspection | ||
| action { | ||
| define_artifacts { | ||
| regex: "github/google-cloud-python/packages/google-crc32c/wheels/*.whl" | ||
| strip_prefix: "github/google-cloud-python/packages/google-crc32c" | ||
| } | ||
| } | ||
|
|
||
| # Fetch the token needed for reporting release status to GitHub | ||
| before_action { | ||
| fetch_keystore { | ||
| keystore_resource { | ||
| keystore_config_id: 73713 | ||
| keyname: "yoshi-automation-github-key" | ||
| } | ||
| } | ||
| } | ||
|
|
||
| # Fetch PyPI password | ||
| before_action { | ||
| fetch_keystore { | ||
| keystore_resource { | ||
| keystore_config_id: 73713 | ||
| keyname: "google-cloud-pypi-token-keystore-3" | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| env_vars: { | ||
| key: "PACKAGE" | ||
| value: "crc32c" | ||
| } | ||
|
|
||
| build_file: "google-cloud-python/.kokoro/release/crc32c/release-manylinux-wheel.sh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| # Build logs will be here | ||
| action { | ||
| define_artifacts { | ||
| regex: "**/*sponge_log.xml" | ||
| } | ||
| } | ||
|
|
||
| # Store built wheels for audit/SBOM/dry-run inspection | ||
| action { | ||
| define_artifacts { | ||
| regex: "github/google-cloud-python/packages/google-crc32c/wheels/*.whl" | ||
| strip_prefix: "github/google-cloud-python/packages/google-crc32c" | ||
| } | ||
| } | ||
|
|
||
| # Fetch the token needed for reporting release status to GitHub | ||
| before_action { | ||
| fetch_keystore { | ||
| keystore_resource { | ||
| keystore_config_id: 73713 | ||
| keyname: "yoshi-automation-github-key" | ||
| } | ||
| } | ||
| } | ||
|
|
||
| # Fetch PyPI password | ||
| before_action { | ||
| fetch_keystore { | ||
| keystore_resource { | ||
| keystore_config_id: 73713 | ||
| keyname: "google-cloud-pypi-token-keystore-3" | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| env_vars: { | ||
| key: "PACKAGE" | ||
| value: "crc32c" | ||
| } | ||
|
|
||
| build_file: "google-cloud-python/.kokoro/release/crc32c/release-osx-wheel.sh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| env_vars: { | ||
| key: "PACKAGE" | ||
| value: "crc32c" | ||
| } | ||
|
|
||
| build_file: "google-cloud-python/.kokoro/release/crc32c/release-osx-wheel.sh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #!/bin/bash | ||
| # Copyright 2026 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| set -eo pipefail | ||
|
|
||
| cd github/google-cloud-python/packages/google-crc32c | ||
|
|
||
| export PUBLISH_WHEELS="${PUBLISH_WHEELS:-true}" | ||
|
|
||
| # Build and publish ManyLinux wheels | ||
| ./scripts/manylinux/build.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| #!/bin/bash | ||
| # Copyright 2026 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| set -eo pipefail | ||
|
|
||
| export REPO_ROOT=$(pwd)/github/google-cloud-python/packages/google-crc32c | ||
| cd "${REPO_ROOT}" | ||
|
|
||
| export PUBLISH_WHEELS="${PUBLISH_WHEELS:-true}" | ||
|
|
||
| # Build and publish OSX wheels | ||
| ./scripts/osx/build.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| @rem Copyright 2019 Google LLC. All rights reserved. | ||
| @rem | ||
| @rem Licensed under the Apache License, Version 2.0 (the "License"); | ||
| @rem you may not use this file except in compliance with the License. | ||
| @rem You may obtain a copy of the License at | ||
| @rem | ||
| @rem http://www.apache.org/licenses/LICENSE-2.0 | ||
| @rem | ||
| @rem Unless required by applicable law or agreed to in writing, software | ||
| @rem distributed under the License is distributed on an "AS IS" BASIS, | ||
| @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| @rem See the License for the specific language governing permissions and | ||
| @rem limitations under the License. | ||
|
|
||
| @echo "Starting Windows release" | ||
|
|
||
| cd /d %~dp0..\..\..\packages\google-crc32c || goto :error | ||
|
|
||
| if "%PUBLISH_WHEELS%"=="" set PUBLISH_WHEELS=true | ||
|
|
||
| @echo "Build and Test Wheels" | ||
| call scripts\windows\build.bat || goto :error | ||
|
|
||
| @echo "Ensure that we have the latest versions of Twine, Wheel, Setuptools, and pkginfo." | ||
| call py -3 -m pip install --upgrade twine wheel setuptools pkginfo || goto :error | ||
|
|
||
| @echo "Build the source distribution (sdist) and validate with twine check" | ||
| call py -3 setup.py sdist || goto :error | ||
| call py -3 -m twine check dist/* wheels/google_crc32c* || goto :error | ||
|
|
||
| if "%PUBLISH_WHEELS%"=="true" ( | ||
| @echo "Start the releasetool reporter" | ||
| call py -3 -m pip install gcp-releasetool || goto :error | ||
| if not exist C:\temp mkdir C:\temp | ||
| call py -3 -m releasetool publish-reporter-script > C:\temp\publisher-script || goto :error | ||
|
|
||
| @echo "Disable buffering, so that the logs stream through." | ||
| set PYTHONUNBUFFERED=1 | ||
|
|
||
| @echo "## RELEASE WORKFLOW SUCCESSFUL ##" | ||
| @echo "## Uploading Wheels and sdist ##" | ||
|
|
||
| set /p TWINE_PASSWORD=<%KOKORO_KEYSTORE_DIR%/73713_google-cloud-pypi-token-keystore-3 | ||
| call py -3 -m twine upload --skip-existing --username __token__ --password "%TWINE_PASSWORD%" dist/* wheels/google_crc32c* || goto :error | ||
| dir wheels | ||
| dir dist | ||
| ) else ( | ||
| @echo "PUBLISH_WHEELS is '%PUBLISH_WHEELS%'. Skipping PyPI upload after sdist and wheel validation." | ||
| ) | ||
|
|
||
| goto :EOF | ||
|
|
||
| :error | ||
| exit /b 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| # Build logs will be here | ||
| action { | ||
| define_artifacts { | ||
| regex: "**/*sponge_log.xml" | ||
| } | ||
| } | ||
|
|
||
| # Store built wheels and sdist for audit/SBOM/dry-run inspection | ||
| action { | ||
| define_artifacts { | ||
| regex: "github/google-cloud-python/packages/google-crc32c/wheels/*.whl" | ||
| strip_prefix: "github/google-cloud-python/packages/google-crc32c" | ||
| } | ||
| } | ||
| action { | ||
| define_artifacts { | ||
| regex: "github/google-cloud-python/packages/google-crc32c/dist/*.tar.gz" | ||
| strip_prefix: "github/google-cloud-python/packages/google-crc32c" | ||
| } | ||
| } | ||
|
|
||
| # Fetch the token needed for reporting release status to GitHub | ||
| before_action { | ||
| fetch_keystore { | ||
| keystore_resource { | ||
| keystore_config_id: 73713 | ||
| keyname: "yoshi-automation-github-key" | ||
| } | ||
| } | ||
| } | ||
|
|
||
| # Fetch PyPI password | ||
| before_action { | ||
| fetch_keystore { | ||
| keystore_resource { | ||
| keystore_config_id: 73713 | ||
| keyname: "google-cloud-pypi-token-keystore-3" | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| env_vars: { | ||
| key: "PACKAGE" | ||
| value: "crc32c" | ||
| } | ||
|
|
||
| build_file: "google-cloud-python/.kokoro/release/crc32c/release-windows-wheel.bat" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.