Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "monthly"
cooldown:
default-days: 14
groups:
python:
patterns:
- "*"
- package-ecosystem: "cargo"
directory: "/"
schedule:
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,19 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
- name: Set up uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
python-version: "3.12"
enable-cache: false

- name: "Run checks"
run: |
python ./check.py
./check.py

- name: "Run unit tests"
run: |
uv run python -m unittest tests/test_mirror.py

- name: "Run mirror integration test"
run: |
uv run python -m unittest tests/test_mirror_integration.py
16 changes: 9 additions & 7 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@e06108dd0aef18192324c70427afc47652e63a82 # v7.5.0
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
enable-cache: false

Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@e06108dd0aef18192324c70427afc47652e63a82 # v7.5.0
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
enable-cache: false

Expand Down Expand Up @@ -221,7 +221,7 @@ jobs:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@e06108dd0aef18192324c70427afc47652e63a82 # v7.5.0
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
enable-cache: false

Expand Down Expand Up @@ -312,24 +312,26 @@ jobs:
with:
name: cpython-${{ matrix.python }}-${{ matrix.target_triple }}-${{ matrix.build_options }}
path: dist/*
compression-level: '0'

- name: Validate Distribution
if: ${{ ! matrix.dry-run }}
run: |
chmod +x build/pythonbuild

build/pythonbuild validate-distribution dist/*.tar.zst

if [ "${MATRIX_RUN}" == "true" ]; then
if [ "${MATRIX_LIBC}" == "musl" ]; then
sudo apt install musl-dev

# GitHub's setup-python action sets `LD_LIBRARY_PATH` which overrides `RPATH`
# as used in the musl builds.
unset LD_LIBRARY_PATH
fi
EXTRA_ARGS="--run"

./test-distribution.py dist/*.tar.zst
fi

build/pythonbuild validate-distribution ${EXTRA_ARGS} dist/*.tar.zst
env:
MATRIX_RUN: ${{ matrix.run }}
MATRIX_LIBC: ${{ matrix.libc }}
15 changes: 8 additions & 7 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: macos

on:
push:
branches: [main]
branches: [ main ]
pull_request:

concurrency:
Expand All @@ -12,7 +12,7 @@ concurrency:
env:
FORCE_COLOR: 1

permissions: {}
permissions: { }

jobs:
crate-build:
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@e06108dd0aef18192324c70427afc47652e63a82 # v7.5.0
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
enable-cache: false

Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@e06108dd0aef18192324c70427afc47652e63a82 # v7.5.0
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
enable-cache: false

Expand Down Expand Up @@ -162,6 +162,7 @@ jobs:
with:
name: cpython-${{ matrix.python }}-${{ matrix.target_triple }}-${{ matrix.build_options }}
path: dist/*
compression-level: '0'

- name: Checkout macOS SDKs for validation
if: ${{ ! matrix.dry-run }}
Expand All @@ -177,10 +178,10 @@ jobs:
run: |
chmod +x build/pythonbuild

build/pythonbuild validate-distribution --macos-sdks-path macosx-sdks dist/*.tar.zst

if [ "${MATRIX_RUN}" == "true" ]; then
EXTRA_ARGS="--run"
./test-distribution.py dist/*.tar.zst
fi

build/pythonbuild validate-distribution --macos-sdks-path macosx-sdks ${EXTRA_ARGS} dist/*.tar.zst
env:
MATRIX_RUN: ${{ matrix.run }}
2 changes: 1 addition & 1 deletion .github/workflows/publish-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
persist-credentials: false

- name: "Install uv"
uses: astral-sh/setup-uv@e06108dd0aef18192324c70427afc47652e63a82 # v7.5.0
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0

- name: "Download SHA256SUMS"
env:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
repo: casey/just
version: 1.42.4

- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0

# Perform a release in dry-run mode.
- run: just release-dry-run ${GH_TOKEN} ${GITHUB_EVENT_INPUTS_SHA} ${GITHUB_EVENT_INPUTS_TAG}
if: ${{ github.event.inputs.dry-run == 'true' }}
Expand Down Expand Up @@ -97,3 +99,37 @@ jobs:
subject-path: |
dist/*.tar.gz
dist/*.tar.zst
<<<<<<< HEAD
=======

- name: Publish to Astral mirror
env:
AWS_ACCESS_KEY_ID: ${{ secrets.MIRROR_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.MIRROR_R2_SECRET_ACCESS_KEY }}
AWS_ENDPOINT_URL: https://${{ secrets.MIRROR_R2_CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com
AWS_DEFAULT_REGION: auto
R2_BUCKET: ${{ secrets.MIRROR_R2_BUCKET_NAME }}
PROJECT: python-build-standalone
VERSION: ${{ github.event.inputs.tag }}
DRY_RUN: ${{ github.event.inputs.dry-run }}
run: |
if [ "${DRY_RUN}" = 'true' ]; then
just release-upload-mirror-dry-run \
${R2_BUCKET} \
github/${PROJECT}/releases/download/${VERSION}/ \
${VERSION}
else
just release-upload-mirror \
${R2_BUCKET} \
github/${PROJECT}/releases/download/${VERSION}/ \
${VERSION}
fi

publish-versions:
needs: release
if: ${{ github.event.inputs.dry-run == 'false' }}
uses: ./.github/workflows/publish-versions.yml
with:
tag: ${{ github.event.inputs.tag }}
secrets: inherit
>>>>>>> refs/tags/20260408
16 changes: 9 additions & 7 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: windows

on:
push:
branches: [main]
branches: [ main ]
pull_request:

concurrency:
Expand All @@ -12,7 +12,7 @@ concurrency:
env:
FORCE_COLOR: 1

permissions: {}
permissions: { }

jobs:
crate-build:
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@e06108dd0aef18192324c70427afc47652e63a82 # v7.5.0
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
enable-cache: false

Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
packages: autoconf automake libtool

- name: Set up uv
uses: astral-sh/setup-uv@e06108dd0aef18192324c70427afc47652e63a82 # v7.5.0
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
enable-cache: false

Expand All @@ -150,7 +150,7 @@ jobs:
# don't get compiled properly.
- name: Bootstrap Python environment
run: |
uv run build.py --help
uv run --no-dev build.py --help

- name: Build
if: ${{ ! matrix.dry-run }}
Expand All @@ -161,7 +161,7 @@ jobs:
) ELSE (
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\%MATRIX_VCVARS%"
)
uv run build.py --python cpython-%MATRIX_PYTHON% --sh c:\cygwin\bin\sh.exe --options %MATRIX_BUILD_OPTIONS% --vs %MATRIX_VS_VERSION%
uv run --no-dev build.py --python cpython-%MATRIX_PYTHON% --sh c:\cygwin\bin\sh.exe --options %MATRIX_BUILD_OPTIONS% --vs %MATRIX_VS_VERSION%
env:
MATRIX_VCVARS: ${{ matrix.vcvars }}
MATRIX_PYTHON: ${{ matrix.python }}
Expand All @@ -179,9 +179,11 @@ jobs:
with:
name: cpython-${{ matrix.python }}-${{ matrix.vcvars }}-${{ matrix.build_options }}
path: dist/*
compression-level: '0'

- name: Validate Distribution
if: ${{ ! matrix.dry-run }}
run: |
$Dists = Resolve-Path -Path "dist/*.tar.zst" -Relative
.\pythonbuild.exe validate-distribution --run $Dists
.\pythonbuild.exe validate-distribution $Dists
uv run --no-dev test-distribution.py $Dists
Loading
Loading