forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into HEAD
- Loading branch information
Showing
136 changed files
with
18,692 additions
and
1,249 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
config_hash: | ||
required: true | ||
type: string | ||
free-threaded: | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
build_macos: | ||
name: 'build and test' | ||
runs-on: macos-latest | ||
timeout-minutes: 60 | ||
env: | ||
HOMEBREW_NO_ANALYTICS: 1 | ||
HOMEBREW_NO_AUTO_UPDATE: 1 | ||
HOMEBREW_NO_INSTALL_CLEANUP: 1 | ||
PYTHONSTRICTEXTENSIONBUILD: 1 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Restore config.cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: config.cache | ||
key: ${{ github.job }}-${{ runner.os }}-${{ inputs.config_hash }} | ||
- name: Install Homebrew dependencies | ||
run: brew install pkg-config openssl@3.0 xz gdbm tcl-tk | ||
- name: Configure CPython | ||
run: | | ||
GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \ | ||
GDBM_LIBS="-L$(brew --prefix gdbm)/lib -lgdbm" \ | ||
./configure \ | ||
--config-cache \ | ||
--with-pydebug \ | ||
${{ inputs.free-threaded && '--disable-gil' || '' }} \ | ||
--prefix=/opt/python-dev \ | ||
--with-openssl="$(brew --prefix openssl@3.0)" | ||
- name: Build CPython | ||
run: make -j4 | ||
- name: Display build info | ||
run: make pythoninfo | ||
- name: Tests | ||
run: make test |
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,71 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
config_hash: | ||
required: true | ||
type: string | ||
options: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build_ubuntu_reusable: | ||
name: 'build and test' | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-20.04 | ||
env: | ||
OPENSSL_VER: 3.0.11 | ||
PYTHONSTRICTEXTENSIONBUILD: 1 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Register gcc problem matcher | ||
run: echo "::add-matcher::.github/problem-matchers/gcc.json" | ||
- name: Install dependencies | ||
run: sudo ./.github/workflows/posix-deps-apt.sh | ||
- name: Configure OpenSSL env vars | ||
run: | | ||
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV | ||
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV | ||
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV | ||
- name: 'Restore OpenSSL build' | ||
id: cache-openssl | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./multissl/openssl/${{ env.OPENSSL_VER }} | ||
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }} | ||
- name: Install OpenSSL | ||
if: steps.cache-openssl.outputs.cache-hit != 'true' | ||
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux | ||
- name: Add ccache to PATH | ||
run: | | ||
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV | ||
- name: Configure ccache action | ||
uses: hendrikmuhs/ccache-action@v1.2 | ||
- name: Setup directory envs for out-of-tree builds | ||
run: | | ||
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV | ||
echo "CPYTHON_BUILDDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-builddir)" >> $GITHUB_ENV | ||
- name: Create directories for read-only out-of-tree builds | ||
run: mkdir -p $CPYTHON_RO_SRCDIR $CPYTHON_BUILDDIR | ||
- name: Bind mount sources read-only | ||
run: sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR | ||
- name: Restore config.cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache | ||
key: ${{ github.job }}-${{ runner.os }}-${{ inputs.config_hash }} | ||
- name: Configure CPython out-of-tree | ||
working-directory: ${{ env.CPYTHON_BUILDDIR }} | ||
run: ${{ inputs.options }} | ||
- name: Build CPython out-of-tree | ||
working-directory: ${{ env.CPYTHON_BUILDDIR }} | ||
run: make -j4 | ||
- name: Display build info | ||
working-directory: ${{ env.CPYTHON_BUILDDIR }} | ||
run: make pythoninfo | ||
- name: Remount sources writable for tests | ||
# some tests write to srcdir, lack of pyc files slows down testing | ||
run: sudo mount $CPYTHON_RO_SRCDIR -oremount,rw | ||
- name: Tests | ||
working-directory: ${{ env.CPYTHON_BUILDDIR }} | ||
run: xvfb-run make test |
Oops, something went wrong.