|
| 1 | +# Download release artifacts from GitHub Actions |
| 2 | +release-download-distributions token commit: |
| 3 | + mkdir -p dist |
| 4 | + cargo run --release -- fetch-release-distributions --token {{token}} --commit {{commit}} --dest dist |
| 5 | + |
| 6 | +# Perform local builds for macOS |
| 7 | +release-build-macos tag: |
| 8 | + #!/bin/bash |
| 9 | + set -exo pipefail |
| 10 | + |
| 11 | + export PATH=~/.pyenv/shims:$PATH |
| 12 | + |
| 13 | + rm -rf build dist |
| 14 | + git checkout {{tag}} |
| 15 | + ./build-macos.py --python cpython-3.8 --optimizations pgo |
| 16 | + ./build-macos.py --python cpython-3.8 --optimizations pgo+lto |
| 17 | + ./build-macos.py --python cpython-3.9 --optimizations pgo |
| 18 | + ./build-macos.py --python cpython-3.9 --optimizations pgo+lto |
| 19 | + ./build-macos.py --python cpython-3.10 --optimizations pgo |
| 20 | + ./build-macos.py --python cpython-3.10 --optimizations pgo+lto |
| 21 | + |
| 22 | +# Trigger builds of aarch64-apple-darwin release artifacts. |
| 23 | +release-build-macos-remote tag: |
| 24 | + ssh macmini just --working-directory /Users/gps/src/python-build-standalone --justfile /Users/gps/src/python-build-standalone/Justfile release-build-macos tag={{tag}} |
| 25 | + mkdir -p dist |
| 26 | + scp 'macmini:~/src/python-build-standalone/dist/*.zst' dist/ |
| 27 | + cargo run --release -- convert-install-only dist/cpython-*-aarch64-apple-darwin-pgo+lto*.zst |
| 28 | + |
| 29 | +# Upload release artifacts to a GitHub release. |
| 30 | +release-upload-distributions token datetime tag: |
| 31 | + cargo run --release -- upload-release-distributions --token {{token}} --datetime {{datetime}} --tag {{tag}} --dist dist |
| 32 | + |
| 33 | +# Perform a release. |
| 34 | +release token commit tag: |
| 35 | + #!/bin/bash |
| 36 | + set -eo pipefail |
| 37 | + |
| 38 | + rm -rf dist |
| 39 | + just release-download-distributions {{token}} {{commit}} |
| 40 | + just release-build-macos-remote {{tag}} |
| 41 | + datetime=$(ls dist/cpython-3.10.*-x86_64-unknown-linux-gnu-install_only-*.tar.gz | awk -F- '{print $8}' | awk -F. '{print $1}') |
| 42 | + just release-upload-distributions {{token}} ${datetime} {{tag}} |
0 commit comments