-
-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build pre-populated Python distributions
- Loading branch information
Showing
4 changed files
with
82 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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,73 @@ | ||
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" | ||
PYTHONDONTWRITEBYTECODE: "1" | ||
|
||
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: python:alpine | ||
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 | ||
--workdir /home | ||
--env PYTHONDONTWRITEBYTECODE | ||
${{ matrix.job.image }} | ||
sleep infinity | ||
- name: Set up Alpine | ||
if: matrix.job.target == 'x86_64-unknown-linux-musl' | ||
run: >- | ||
docker exec builder | ||
/bin/ash -c "apk update && apk add curl musl-dev gcc" | ||
- 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 | ||
- name: Download distribution | ||
run: >- | ||
docker exec builder | ||
/home/python/bin/python -m pip install --no-compile hatch |
This file contains 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 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 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