Bump version to 0.2.20 #130
Workflow file for this run
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
| # Build uv on all platforms. | |
| # | |
| # Generates both wheels (for PyPI) and archived binaries (for GitHub releases). | |
| # | |
| # Assumed to run as a subworkflow of .github/workflows/release.yml; specifically, as a local | |
| # artifacts job within `cargo-dist`. | |
| name: "Build binaries" | |
| on: | |
| workflow_call: | |
| inputs: | |
| plan: | |
| required: true | |
| type: string | |
| pull_request: | |
| paths: | |
| # When we change pyproject.toml, we want to ensure that the maturin builds still work. | |
| - pyproject.toml | |
| # And when we change this workflow itself... | |
| - .github/workflows/build-binaries.yml | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_NET_RETRY: 10 | |
| CARGO_TERM_COLOR: always | |
| RUSTUP_MAX_RETRIES: 10 | |
| jobs: | |
| sdist: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Build sdist | |
| uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4 | |
| with: | |
| command: sdist | |
| args: --out dist | |
| - name: "Upload sdist" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: wheels-sdist | |
| path: dist | |
| windows: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| platform: | |
| - target: x86_64-pc-windows-msvc | |
| arch: x64 | |
| - target: i686-pc-windows-msvc | |
| arch: x86 | |
| - target: aarch64-pc-windows-msvc | |
| arch: x64 # not relevant here | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: "Build wheels" | |
| uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --locked --out dist --features self-update | |
| sccache: 'true' | |
| - name: "Upload wheels" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: wheels-windows-${{ matrix.platform.target }} | |
| path: dist | |
| - name: "Archive binary" | |
| shell: bash | |
| run: | | |
| ARCHIVE_FILE=prek-${{ matrix.platform.target }}.zip | |
| 7z a $ARCHIVE_FILE ./target/${{ matrix.platform.target }}/release/prek.exe | |
| sha256sum $ARCHIVE_FILE > $ARCHIVE_FILE.sha256 | |
| - name: "Upload binary" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: artifacts-${{ matrix.platform.target }} | |
| path: | | |
| *.zip | |
| *.sha256 | |
| macos: | |
| runs-on: ${{ matrix.platform.runner }} | |
| strategy: | |
| matrix: | |
| platform: | |
| - runner: macos-15 | |
| target: x86_64-apple-darwin | |
| - runner: macos-15 | |
| target: aarch64-apple-darwin | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: "Build wheels" | |
| uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --locked --out dist --features self-update | |
| sccache: 'true' | |
| - name: "Upload wheels" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: wheels-macos-${{ matrix.platform.target }} | |
| path: dist | |
| - name: "Archive binary" | |
| run: | | |
| TARGET=${{ matrix.platform.target }} | |
| ARCHIVE_NAME=prek-$TARGET | |
| ARCHIVE_FILE=$ARCHIVE_NAME.tar.gz | |
| mkdir -p $ARCHIVE_NAME | |
| cp target/$TARGET/release/prek $ARCHIVE_NAME/prek | |
| tar czvf $ARCHIVE_FILE $ARCHIVE_NAME | |
| shasum -a 256 $ARCHIVE_FILE > $ARCHIVE_FILE.sha256 | |
| - name: "Upload binary" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: artifacts-${{ matrix.platform.target }} | |
| path: | | |
| *.tar.gz | |
| *.sha256 | |
| linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - { target: "i686-unknown-linux-gnu", cc: "gcc -m32" } | |
| - { target: "x86_64-unknown-linux-gnu", cc: "gcc" } | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: "Build wheels" | |
| uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4 | |
| with: | |
| target: ${{ matrix.target }} | |
| # Generally, we try to build in a target docker container. In this case however, a | |
| # 32-bit compiler runs out of memory (4GB memory limit for 32-bit), so we cross compile | |
| # from 64-bit version of the container, breaking the pattern from other builds. | |
| container: quay.io/pypa/manylinux2014 | |
| args: --release --locked --out dist --features self-update | |
| # See: https://github.com/sfackler/rust-openssl/issues/2036#issuecomment-1724324145 | |
| before-script-linux: | | |
| # Install the 32-bit cross target on 64-bit (noop if we're already on 64-bit) | |
| rustup target add ${{ matrix.target }} | |
| # If we're running on rhel centos, install needed packages. | |
| if command -v yum &> /dev/null; then | |
| yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic | |
| # If we're running on i686 we need to symlink libatomic | |
| # in order to build openssl with -latomic flag. | |
| if [[ ! -d "/usr/lib64" ]]; then | |
| ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so | |
| else | |
| # Support cross-compiling from 64-bit to 32-bit | |
| yum install -y glibc-devel.i686 libstdc++-devel.i686 | |
| fi | |
| else | |
| # If we're running on debian-based system. | |
| apt update -y && apt-get install -y libssl-dev openssl pkg-config | |
| fi | |
| sccache: 'true' | |
| manylinux: auto | |
| env: | |
| CC: ${{ matrix.cc }} | |
| - name: "Upload wheels" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: wheels-linux-${{ matrix.target }} | |
| path: dist | |
| - name: "Archive binary" | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| TARGET=${{ matrix.target }} | |
| ARCHIVE_NAME=prek-$TARGET | |
| ARCHIVE_FILE=$ARCHIVE_NAME.tar.gz | |
| mkdir -p $ARCHIVE_NAME | |
| cp target/$TARGET/release/prek $ARCHIVE_NAME/prek | |
| tar czvf $ARCHIVE_FILE $ARCHIVE_NAME | |
| shasum -a 256 $ARCHIVE_FILE > $ARCHIVE_FILE.sha256 | |
| - name: "Upload binary" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: artifacts-${{ matrix.target }} | |
| path: | | |
| *.tar.gz | |
| *.sha256 | |
| linux-arm: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| matrix: | |
| platform: | |
| - target: aarch64-unknown-linux-gnu | |
| arch: aarch64 | |
| # see https://github.com/astral-sh/ruff/issues/3791 | |
| # and https://github.com/gnzlbg/jemallocator/issues/170#issuecomment-1503228963 | |
| maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=16 | |
| - target: armv7-unknown-linux-gnueabihf | |
| arch: armv7 | |
| - target: arm-unknown-linux-musleabihf | |
| arch: arm | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: "Build wheels" | |
| uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| # On `aarch64`, use `manylinux: 2_28`; otherwise, use `manylinux: auto`. | |
| manylinux: ${{ matrix.platform.arch == 'aarch64' && '2_28' || 'auto' }} | |
| docker-options: ${{ matrix.platform.maturin_docker_options }} | |
| args: --release --locked --out dist --features self-update | |
| - name: "Upload wheels" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: wheels-linux-${{ matrix.platform.target }} | |
| path: dist | |
| - name: "Archive binary" | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| TARGET=${{ matrix.platform.target }} | |
| ARCHIVE_NAME=prek-$TARGET | |
| ARCHIVE_FILE=$ARCHIVE_NAME.tar.gz | |
| mkdir -p $ARCHIVE_NAME | |
| cp target/$TARGET/release/prek $ARCHIVE_NAME/prek | |
| tar czvf $ARCHIVE_FILE $ARCHIVE_NAME | |
| shasum -a 256 $ARCHIVE_FILE > $ARCHIVE_FILE.sha256 | |
| - name: "Upload binary" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: artifacts-${{ matrix.platform.target }} | |
| path: | | |
| *.tar.gz | |
| *.sha256 | |
| linux-s390x: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| matrix: | |
| platform: | |
| - target: s390x-unknown-linux-gnu | |
| arch: s390x | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: "Build wheels" | |
| uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| manylinux: auto | |
| args: --release --locked --out dist --features self-update | |
| rust-toolchain: ${{ matrix.platform.toolchain || null }} | |
| env: | |
| CFLAGS_s390x_unknown_linux_gnu: -march=z10 | |
| - name: "Upload wheels" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: wheels-linux-${{ matrix.platform.target }} | |
| path: dist | |
| - name: "Archive binary" | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| TARGET=${{ matrix.platform.target }} | |
| ARCHIVE_NAME=prek-$TARGET | |
| ARCHIVE_FILE=$ARCHIVE_NAME.tar.gz | |
| mkdir -p $ARCHIVE_NAME | |
| cp target/$TARGET/release/prek $ARCHIVE_NAME/prek | |
| tar czvf $ARCHIVE_FILE $ARCHIVE_NAME | |
| shasum -a 256 $ARCHIVE_FILE > $ARCHIVE_FILE.sha256 | |
| - name: "Upload binary" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: artifacts-${{ matrix.platform.target }} | |
| path: | | |
| *.tar.gz | |
| *.sha256 | |
| linux-powerpc: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| matrix: | |
| platform: | |
| - target: powerpc64le-unknown-linux-gnu | |
| arch: ppc64le | |
| # see https://github.com/astral-sh/uv/issues/6528 | |
| maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=16 | |
| - target: powerpc64-unknown-linux-gnu | |
| arch: ppc64 | |
| # see https://github.com/astral-sh/uv/issues/6528 | |
| maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=16 | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: "Build wheels" | |
| uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| manylinux: auto | |
| docker-options: ${{ matrix.platform.maturin_docker_options }} | |
| args: --release --locked --out dist --features self-update | |
| before-script-linux: | | |
| if command -v yum &> /dev/null; then | |
| yum update -y | |
| yum -y install epel-release | |
| yum repolist | |
| yum install -y gcc-powerpc64-linux-gnu | |
| fi | |
| - name: "Upload wheels" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: wheels-linux-${{ matrix.platform.target }} | |
| path: dist | |
| - name: "Archive binary" | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| TARGET=${{ matrix.platform.target }} | |
| ARCHIVE_NAME=prek-$TARGET | |
| ARCHIVE_FILE=$ARCHIVE_NAME.tar.gz | |
| mkdir -p $ARCHIVE_NAME | |
| cp target/$TARGET/release/prek $ARCHIVE_NAME/prek | |
| tar czvf $ARCHIVE_FILE $ARCHIVE_NAME | |
| shasum -a 256 $ARCHIVE_FILE > $ARCHIVE_FILE.sha256 | |
| - name: "Upload binary" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: artifacts-${{ matrix.platform.target }} | |
| path: | | |
| *.tar.gz | |
| *.sha256 | |
| linux-riscv64: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| matrix: | |
| platform: | |
| - target: riscv64gc-unknown-linux-gnu | |
| arch: riscv64 | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: "Build wheels" | |
| uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| manylinux: auto | |
| args: --release --locked --out dist --features self-update | |
| - name: "Upload wheels" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: wheels-linux-${{ matrix.platform.target }} | |
| path: dist | |
| - name: "Archive binary" | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| TARGET=${{ matrix.platform.target }} | |
| ARCHIVE_NAME=prek-$TARGET | |
| ARCHIVE_FILE=$ARCHIVE_NAME.tar.gz | |
| mkdir -p $ARCHIVE_NAME | |
| cp target/$TARGET/release/prek $ARCHIVE_NAME/prek | |
| tar czvf $ARCHIVE_FILE $ARCHIVE_NAME | |
| shasum -a 256 $ARCHIVE_FILE > $ARCHIVE_FILE.sha256 | |
| - name: "Upload binary" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: artifacts-${{ matrix.platform.target }} | |
| path: | | |
| *.tar.gz | |
| *.sha256 | |
| musllinux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target: | |
| - x86_64-unknown-linux-musl | |
| - i686-unknown-linux-musl | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: "Build wheels" | |
| uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4 | |
| with: | |
| target: ${{ matrix.target }} | |
| manylinux: musllinux_1_1 | |
| args: --release --locked --out dist --features self-update | |
| - name: "Upload wheels" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: wheels-linux-${{ matrix.target }} | |
| path: dist | |
| - name: "Archive binary" | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| TARGET=${{ matrix.target }} | |
| ARCHIVE_NAME=prek-$TARGET | |
| ARCHIVE_FILE=$ARCHIVE_NAME.tar.gz | |
| mkdir -p $ARCHIVE_NAME | |
| cp target/$TARGET/release/prek $ARCHIVE_NAME/prek | |
| tar czvf $ARCHIVE_FILE $ARCHIVE_NAME | |
| shasum -a 256 $ARCHIVE_FILE > $ARCHIVE_FILE.sha256 | |
| - name: "Upload binary" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: artifacts-${{ matrix.target }} | |
| path: | | |
| *.tar.gz | |
| *.sha256 | |
| musllinux-cross: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| platform: | |
| - target: aarch64-unknown-linux-musl | |
| arch: aarch64 | |
| maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=16 | |
| - target: armv7-unknown-linux-musleabihf | |
| arch: armv7 | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: "Build wheels" | |
| uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| manylinux: musllinux_1_1 | |
| args: --release --locked --out dist --features self-update ${{ matrix.platform.arch == 'aarch64' && '--compatibility 2_17' || ''}} | |
| docker-options: ${{ matrix.platform.maturin_docker_options }} | |
| rust-toolchain: ${{ matrix.platform.toolchain || null }} | |
| - name: "Upload wheels" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: wheels-linux-${{ matrix.platform.target }} | |
| path: dist | |
| - name: "Archive binary" | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| TARGET=${{ matrix.platform.target }} | |
| ARCHIVE_NAME=prek-$TARGET | |
| ARCHIVE_FILE=$ARCHIVE_NAME.tar.gz | |
| mkdir -p $ARCHIVE_NAME | |
| cp target/$TARGET/release/prek $ARCHIVE_NAME/prek | |
| tar czvf $ARCHIVE_FILE $ARCHIVE_NAME | |
| shasum -a 256 $ARCHIVE_FILE > $ARCHIVE_FILE.sha256 | |
| - name: "Upload binary" | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: artifacts-${{ matrix.platform.target }} | |
| path: | | |
| *.tar.gz | |
| *.sha256 |