From 0493558713b569f1bdd510b13fad1f7bc3bc8463 Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Thu, 9 May 2024 09:08:27 -0400 Subject: [PATCH] Build pre-populated Python distributions --- .github/workflows/build-distributions.yml | 59 +++++++++++++++++++++++ .github/workflows/build-hatch.yml | 6 +-- .github/workflows/docs-dev.yml | 6 +-- .github/workflows/test.yml | 6 +-- 4 files changed, 68 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/build-distributions.yml diff --git a/.github/workflows/build-distributions.yml b/.github/workflows/build-distributions.yml new file mode 100644 index 000000000..f3d464efd --- /dev/null +++ b/.github/workflows/build-distributions.yml @@ -0,0 +1,59 @@ +name: build distributions + +on: + push: + branches: + - master + pull_request: + branches: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +defaults: + run: + shell: bash + +env: + PYTHON_VERSION: "3.12.3" + DIST_VERSION: "20240415" + DIST_URL: "https://github.com/indygreg/python-build-standalone/releases/download" + +jobs: + binaries: + name: ${{ matrix.job.target }} + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + job: + - image: quay.io/pypa/manylinux2014_x86_64 + target: x86_64-unknown-linux-gnu + - image: alpine:3.19 + target: x86_64-unknown-linux-musl + - image: quay.io/pypa/manylinux2014_aarch64 + target: aarch64-unknown-linux-gnu + emulation: arm64 + - image: quay.io/pypa/manylinux2014_ppc64le + target: powerpc64le-unknown-linux-gnu + emulation: ppc64le + + steps: + - name: Set up QEMU + if: ${{ matrix.job.emulation }} + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker container + run: >- + docker run --rm -d + --name builder + ${{ matrix.job.image }} + sleep infinity + + - name: Download distribution + run: >- + docker exec builder + curl -LO + ${{ env.DIST_URL }}/${{ env.DIST_VERSION }}/cpython-${{ env.PYTHON_VERSION }}+${{ env.DIST_VERSION }}-${{ matrix.job.target }}-install_only.tar.gz diff --git a/.github/workflows/build-hatch.yml b/.github/workflows/build-hatch.yml index 2033494a8..9225edc1b 100644 --- a/.github/workflows/build-hatch.yml +++ b/.github/workflows/build-hatch.yml @@ -6,9 +6,9 @@ on: - hatch-v* branches: - master - pull_request: - branches: - - master + # pull_request: + # branches: + # - master concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} diff --git a/.github/workflows/docs-dev.yml b/.github/workflows/docs-dev.yml index ca8671893..6d4929ea2 100644 --- a/.github/workflows/docs-dev.yml +++ b/.github/workflows/docs-dev.yml @@ -4,9 +4,9 @@ on: push: branches: - master - pull_request: - branches: - - master + # pull_request: + # branches: + # - master concurrency: group: docs-deploy diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e85b47c7e..d0ce96d3f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,9 +4,9 @@ on: push: branches: - master - pull_request: - branches: - - master + # pull_request: + # branches: + # - master concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}