From 6c35a892e5bcef01ba1c09e5c2780911a0e99cc4 Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 04:55:11 +0100 Subject: [PATCH 01/27] initial draft of no-gil CI/CD workflow --- .github/workflows/build.yml | 69 +++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3373a0616b66c4..a6a4c61598c0fd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -332,6 +332,75 @@ jobs: working-directory: ${{ env.CPYTHON_BUILDDIR }} run: xvfb-run make test + build_ubuntu: + name: 'Ubuntu' + runs-on: ubuntu-latest + timeout-minutes: 60 + needs: check_source + if: needs.check_source.outputs.run_tests == 'true' + 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 }}-${{ needs.check_source.outputs.config_hash }} + - name: Configure CPython out-of-tree + working-directory: ${{ env.CPYTHON_BUILDDIR }} + run: | + ../cpython-ro-srcdir/configure \ + --config-cache \ + --with-pydebug \ + --with-openssl=$OPENSSL_DIR \ + --disable-gil + - 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 + + build_ubuntu_ssltests: name: 'Ubuntu SSL tests with OpenSSL' runs-on: ubuntu-20.04 From c35d2ced078a784237a9f66c811ec2ccca3c513e Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 06:27:38 +0100 Subject: [PATCH 02/27] Moved to reusable ubuntu workflow. --- .github/workflows/build.yml | 557 ++++++++------------ .github/workflows/reusable-build-ubuntu.yml | 84 +++ 2 files changed, 298 insertions(+), 343 deletions(-) create mode 100644 .github/workflows/reusable-build-ubuntu.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a6a4c61598c0fd..d023049c33a2fc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -188,12 +188,12 @@ jobs: IncludeUwp: 'true' steps: - uses: actions/checkout@v4 - - name: Build CPython - run: .\PCbuild\build.bat -e -d -p Win32 - - name: Display build info - run: .\python.bat -m test.pythoninfo - - name: Tests - run: .\PCbuild\rt.bat -p Win32 -d -q --fast-ci + # - name: Build CPython + # run: .\PCbuild\build.bat -e -d -p Win32 + # - name: Display build info + # run: .\python.bat -m test.pythoninfo + # - name: Tests + # run: .\PCbuild\rt.bat -p Win32 -d -q --fast-ci build_win_amd64: name: 'Windows (x64)' @@ -207,12 +207,12 @@ jobs: - uses: actions/checkout@v4 - name: Register MSVC problem matcher run: echo "::add-matcher::.github/problem-matchers/msvc.json" - - name: Build CPython - run: .\PCbuild\build.bat -e -d -p x64 - - name: Display build info - run: .\python.bat -m test.pythoninfo - - name: Tests - run: .\PCbuild\rt.bat -p x64 -d -q --fast-ci + # - name: Build CPython + # run: .\PCbuild\build.bat -e -d -p x64 + # - name: Display build info + # run: .\python.bat -m test.pythoninfo + # - name: Tests + # run: .\PCbuild\rt.bat -p x64 -d -q --fast-ci build_win_arm64: name: 'Windows (arm64)' @@ -224,10 +224,10 @@ jobs: IncludeUwp: 'true' steps: - uses: actions/checkout@v4 - - name: Register MSVC problem matcher - run: echo "::add-matcher::.github/problem-matchers/msvc.json" - - name: Build CPython - run: .\PCbuild\build.bat -e -d -p arm64 + # - name: Register MSVC problem matcher + # run: echo "::add-matcher::.github/problem-matchers/msvc.json" + # - name: Build CPython + # run: .\PCbuild\build.bat -e -d -p arm64 build_macos: name: 'macOS' @@ -242,164 +242,35 @@ jobs: PYTHONSTRICTEXTENSIONBUILD: 1 steps: - uses: actions/checkout@v4 - - name: Restore config.cache - uses: actions/cache@v3 - with: - path: config.cache - key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.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 \ - --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 + # - name: Restore config.cache + # uses: actions/cache@v3 + # with: + # path: config.cache + # key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.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 \ + # --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 build_ubuntu: name: 'Ubuntu' - runs-on: ubuntu-20.04 - timeout-minutes: 60 - needs: check_source - if: needs.check_source.outputs.run_tests == 'true' - 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 }}-${{ needs.check_source.outputs.config_hash }} - - name: Configure CPython out-of-tree - working-directory: ${{ env.CPYTHON_BUILDDIR }} - run: | - ../cpython-ro-srcdir/configure \ - --config-cache \ - --with-pydebug \ - --with-openssl=$OPENSSL_DIR - - 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 - - build_ubuntu: - name: 'Ubuntu' - runs-on: ubuntu-latest - timeout-minutes: 60 - needs: check_source - if: needs.check_source.outputs.run_tests == 'true' - 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 }}-${{ needs.check_source.outputs.config_hash }} - - name: Configure CPython out-of-tree - working-directory: ${{ env.CPYTHON_BUILDDIR }} - run: | - ../cpython-ro-srcdir/configure \ - --config-cache \ - --with-pydebug \ - --with-openssl=$OPENSSL_DIR \ - --disable-gil - - 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 - + uses: ./.github/workflows/reusable-build-macos.yml + with: + config_hash: ${{ needs.check_source.outputs.config_hash }} + ubuntu_version: "ubuntu-20.04" build_ubuntu_ssltests: name: 'Ubuntu SSL tests with OpenSSL' @@ -418,42 +289,42 @@ jobs: LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib steps: - uses: actions/checkout@v4 - - name: Restore config.cache - uses: actions/cache@v3 - with: - path: config.cache - key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} - - 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: Configure CPython - run: ./configure --config-cache --with-pydebug --with-openssl=$OPENSSL_DIR - - name: Build CPython - run: make -j4 - - name: Display build info - run: make pythoninfo - - name: SSL tests - run: ./python Lib/test/ssltests.py + # - name: Restore config.cache + # uses: actions/cache@v3 + # with: + # path: config.cache + # key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} + # - 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: Configure CPython + # run: ./configure --config-cache --with-pydebug --with-openssl=$OPENSSL_DIR + # - name: Build CPython + # run: make -j4 + # - name: Display build info + # run: make pythoninfo + # - name: SSL tests + # run: ./python Lib/test/ssltests.py test_hypothesis: name: "Hypothesis tests on Ubuntu" @@ -466,102 +337,102 @@ jobs: 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 }}-${{ needs.check_source.outputs.config_hash }} - - name: Configure CPython out-of-tree - working-directory: ${{ env.CPYTHON_BUILDDIR }} - run: | - ../cpython-ro-srcdir/configure \ - --config-cache \ - --with-pydebug \ - --with-openssl=$OPENSSL_DIR - - 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: Setup directory envs for out-of-tree builds - run: | - echo "CPYTHON_BUILDDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-builddir)" >> $GITHUB_ENV - - name: "Create hypothesis venv" - working-directory: ${{ env.CPYTHON_BUILDDIR }} - run: | - VENV_LOC=$(realpath -m .)/hypovenv - VENV_PYTHON=$VENV_LOC/bin/python - echo "HYPOVENV=${VENV_LOC}" >> $GITHUB_ENV - echo "VENV_PYTHON=${VENV_PYTHON}" >> $GITHUB_ENV - ./python -m venv $VENV_LOC && $VENV_PYTHON -m pip install -r ${GITHUB_WORKSPACE}/Tools/requirements-hypothesis.txt - - name: 'Restore Hypothesis database' - id: cache-hypothesis-database - uses: actions/cache@v3 - with: - path: ./hypothesis - key: hypothesis-database-${{ github.head_ref || github.run_id }} - restore-keys: | - - hypothesis-database- - - name: "Run tests" - working-directory: ${{ env.CPYTHON_BUILDDIR }} - run: | - # Most of the excluded tests are slow test suites with no property tests - # - # (GH-104097) test_sysconfig is skipped because it has tests that are - # failing when executed from inside a virtual environment. - ${{ env.VENV_PYTHON }} -m test \ - -W \ - -o \ - -j4 \ - -x test_asyncio \ - -x test_multiprocessing_fork \ - -x test_multiprocessing_forkserver \ - -x test_multiprocessing_spawn \ - -x test_concurrent_futures \ - -x test_socket \ - -x test_subprocess \ - -x test_signal \ - -x test_sysconfig - - uses: actions/upload-artifact@v3 - if: always() - with: - name: hypothesis-example-db - path: .hypothesis/examples/ + # - 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 }}-${{ needs.check_source.outputs.config_hash }} + # - name: Configure CPython out-of-tree + # working-directory: ${{ env.CPYTHON_BUILDDIR }} + # run: | + # ../cpython-ro-srcdir/configure \ + # --config-cache \ + # --with-pydebug \ + # --with-openssl=$OPENSSL_DIR + # - 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: Setup directory envs for out-of-tree builds + # run: | + # echo "CPYTHON_BUILDDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-builddir)" >> $GITHUB_ENV + # - name: "Create hypothesis venv" + # working-directory: ${{ env.CPYTHON_BUILDDIR }} + # run: | + # VENV_LOC=$(realpath -m .)/hypovenv + # VENV_PYTHON=$VENV_LOC/bin/python + # echo "HYPOVENV=${VENV_LOC}" >> $GITHUB_ENV + # echo "VENV_PYTHON=${VENV_PYTHON}" >> $GITHUB_ENV + # ./python -m venv $VENV_LOC && $VENV_PYTHON -m pip install -r ${GITHUB_WORKSPACE}/Tools/requirements-hypothesis.txt + # - name: 'Restore Hypothesis database' + # id: cache-hypothesis-database + # uses: actions/cache@v3 + # with: + # path: ./hypothesis + # key: hypothesis-database-${{ github.head_ref || github.run_id }} + # restore-keys: | + # - hypothesis-database- + # - name: "Run tests" + # working-directory: ${{ env.CPYTHON_BUILDDIR }} + # run: | + # # Most of the excluded tests are slow test suites with no property tests + # # + # # (GH-104097) test_sysconfig is skipped because it has tests that are + # # failing when executed from inside a virtual environment. + # ${{ env.VENV_PYTHON }} -m test \ + # -W \ + # -o \ + # -j4 \ + # -x test_asyncio \ + # -x test_multiprocessing_fork \ + # -x test_multiprocessing_forkserver \ + # -x test_multiprocessing_spawn \ + # -x test_concurrent_futures \ + # -x test_socket \ + # -x test_subprocess \ + # -x test_signal \ + # -x test_sysconfig + # - uses: actions/upload-artifact@v3 + # if: always() + # with: + # name: hypothesis-example-db + # path: .hypothesis/examples/ build_asan: @@ -576,46 +447,46 @@ jobs: ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0 steps: - uses: actions/checkout@v4 - - name: Restore config.cache - uses: actions/cache@v3 - with: - path: config.cache - key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} - - 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: Set up GCC-10 for ASAN - uses: egor-tensin/setup-gcc@v1 - with: - version: 10 - - 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: Configure CPython - run: ./configure --config-cache --with-address-sanitizer --without-pymalloc - - name: Build CPython - run: make -j4 - - name: Display build info - run: make pythoninfo - - name: Tests - run: xvfb-run make test + # - name: Restore config.cache + # uses: actions/cache@v3 + # with: + # path: config.cache + # key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} + # - 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: Set up GCC-10 for ASAN + # uses: egor-tensin/setup-gcc@v1 + # with: + # version: 10 + # - 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: Configure CPython + # run: ./configure --config-cache --with-address-sanitizer --without-pymalloc + # - name: Build CPython + # run: make -j4 + # - name: Display build info + # run: make pythoninfo + # - name: Tests + # run: xvfb-run make test # CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/ cifuzz: diff --git a/.github/workflows/reusable-build-ubuntu.yml b/.github/workflows/reusable-build-ubuntu.yml new file mode 100644 index 00000000000000..55d17569601c44 --- /dev/null +++ b/.github/workflows/reusable-build-ubuntu.yml @@ -0,0 +1,84 @@ +name: Tests + +# gh-84728: "paths-ignore" is not used to skip documentation-only PRs, because +# it prevents to mark a job as mandatory. A PR cannot be merged if a job is +# mandatory but not scheduled because of "paths-ignore". +on: + workflow_call: + inputs: + config_hash: + required: true + type: string + ubuntu_version: + required: true + type: string + +permissions: + contents: read + +jobs: + name: 'Ubuntu reusable' + runs-on: ${{ inputs.ubuntu_version }} + timeout-minutes: 60 + needs: check_source + if: needs.check_source.outputs.run_tests == 'true' + 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: | + ../cpython-ro-srcdir/configure \ + --config-cache \ + --with-pydebug \ + --with-openssl=$OPENSSL_DIR + - 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 From 0ad8938ca67809049f73c805c44c995d7d3eb7ba Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 06:44:20 +0100 Subject: [PATCH 03/27] Disabled additional test --- .github/workflows/build.yml | 102 ++++++++++++++++++------------------ 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d023049c33a2fc..0f16d556cec4b3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -126,57 +126,57 @@ jobs: if: needs.check_source.outputs.run_tests == 'true' steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - name: Restore config.cache - uses: actions/cache@v3 - with: - path: config.cache - key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}-${{ env.pythonLocation }} - - name: Install Dependencies - run: sudo ./.github/workflows/posix-deps-apt.sh - - 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: Check Autoconf and aclocal versions - run: | - grep "Generated by GNU Autoconf 2.71" configure - grep "aclocal 1.16.4" aclocal.m4 - grep -q "runstatedir" configure - grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4 - - name: Configure CPython - run: | - # Build Python with the libpython dynamic library - ./configure --config-cache --with-pydebug --enable-shared - - name: Regenerate autoconf files with container image - run: make regen-configure - - name: Build CPython - run: | - make -j4 regen-all - make regen-stdlib-module-names - - name: Check for changes - run: | - git add -u - changes=$(git status --porcelain) - # Check for changes in regenerated files - if test -n "$changes"; then - echo "Generated files not up to date." - echo "Perhaps you forgot to run make regen-all or build.bat --regen. ;)" - echo "configure files must be regenerated with a specific version of autoconf." - echo "$changes" - echo "" - git diff --staged || true - exit 1 - fi - - name: Check exported libpython symbols - run: make smelly - - name: Check limited ABI symbols - run: make check-limited-abi - - name: Check for unsupported C global variables - if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME - run: make check-c-globals + # - uses: actions/setup-python@v4 + # with: + # python-version: '3.x' + # - name: Restore config.cache + # uses: actions/cache@v3 + # with: + # path: config.cache + # key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}-${{ env.pythonLocation }} + # - name: Install Dependencies + # run: sudo ./.github/workflows/posix-deps-apt.sh + # - 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: Check Autoconf and aclocal versions + # run: | + # grep "Generated by GNU Autoconf 2.71" configure + # grep "aclocal 1.16.4" aclocal.m4 + # grep -q "runstatedir" configure + # grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4 + # - name: Configure CPython + # run: | + # # Build Python with the libpython dynamic library + # ./configure --config-cache --with-pydebug --enable-shared + # - name: Regenerate autoconf files with container image + # run: make regen-configure + # - name: Build CPython + # run: | + # make -j4 regen-all + # make regen-stdlib-module-names + # - name: Check for changes + # run: | + # git add -u + # changes=$(git status --porcelain) + # # Check for changes in regenerated files + # if test -n "$changes"; then + # echo "Generated files not up to date." + # echo "Perhaps you forgot to run make regen-all or build.bat --regen. ;)" + # echo "configure files must be regenerated with a specific version of autoconf." + # echo "$changes" + # echo "" + # git diff --staged || true + # exit 1 + # fi + # - name: Check exported libpython symbols + # run: make smelly + # - name: Check limited ABI symbols + # run: make check-limited-abi + # - name: Check for unsupported C global variables + # if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME + # run: make check-c-globals build_win32: name: 'Windows (x86)' From 05166b65b1c4ac757bce74ce21331f31d5f210bc Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 06:55:20 +0100 Subject: [PATCH 04/27] Fixed workflow reference --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f16d556cec4b3..e58f80c9aea9fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -267,10 +267,10 @@ jobs: build_ubuntu: name: 'Ubuntu' - uses: ./.github/workflows/reusable-build-macos.yml + uses: ./.github/workflows/reusable-build-ubuntu.yml with: config_hash: ${{ needs.check_source.outputs.config_hash }} - ubuntu_version: "ubuntu-20.04" + ubuntu_version: 'ubuntu-20.04' build_ubuntu_ssltests: name: 'Ubuntu SSL tests with OpenSSL' From ce06c53886e8dec5c3c258dad2d0bd88fd58c182 Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 07:00:37 +0100 Subject: [PATCH 05/27] Fixed syntax issue for ubuntu_version. --- .github/workflows/build.yml | 1 + .github/workflows/reusable-build-ubuntu.yml | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e58f80c9aea9fa..cf8151e0f1179a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -271,6 +271,7 @@ jobs: with: config_hash: ${{ needs.check_source.outputs.config_hash }} ubuntu_version: 'ubuntu-20.04' + run_tests: needs.check_source.outputs.run_tests build_ubuntu_ssltests: name: 'Ubuntu SSL tests with OpenSSL' diff --git a/.github/workflows/reusable-build-ubuntu.yml b/.github/workflows/reusable-build-ubuntu.yml index 55d17569601c44..daa5ca98bf750d 100644 --- a/.github/workflows/reusable-build-ubuntu.yml +++ b/.github/workflows/reusable-build-ubuntu.yml @@ -17,11 +17,10 @@ permissions: contents: read jobs: - name: 'Ubuntu reusable' - runs-on: ${{ inputs.ubuntu_version }} + runs-on: inputs.ubuntu_version timeout-minutes: 60 needs: check_source - if: needs.check_source.outputs.run_tests == 'true' + if: inputs.run_tests == 'true' env: OPENSSL_VER: 3.0.11 PYTHONSTRICTEXTENSIONBUILD: 1 From 3d0ab044fb2c8a016a1b9ba95175d0df15874f3e Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 07:01:45 +0100 Subject: [PATCH 06/27] Fixed syntax issue for ubuntu_version. --- .github/workflows/build.yml | 2 +- .github/workflows/reusable-build-ubuntu.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cf8151e0f1179a..9f481ea241c6f4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -270,7 +270,7 @@ jobs: uses: ./.github/workflows/reusable-build-ubuntu.yml with: config_hash: ${{ needs.check_source.outputs.config_hash }} - ubuntu_version: 'ubuntu-20.04' + # ubuntu_version: 'ubuntu-20.04' run_tests: needs.check_source.outputs.run_tests build_ubuntu_ssltests: diff --git a/.github/workflows/reusable-build-ubuntu.yml b/.github/workflows/reusable-build-ubuntu.yml index daa5ca98bf750d..14dfb5b6126ebf 100644 --- a/.github/workflows/reusable-build-ubuntu.yml +++ b/.github/workflows/reusable-build-ubuntu.yml @@ -17,7 +17,7 @@ permissions: contents: read jobs: - runs-on: inputs.ubuntu_version + runs-on: 'ubuntu_20.04' timeout-minutes: 60 needs: check_source if: inputs.run_tests == 'true' From f1f0ff3045240e683ff5c9f7956dee52d268ebd5 Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 07:02:44 +0100 Subject: [PATCH 07/27] Fixed syntax issue for ubuntu_version v3. --- .github/workflows/build.yml | 2 +- .github/workflows/reusable-build-ubuntu.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9f481ea241c6f4..137bee30a319e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -270,7 +270,7 @@ jobs: uses: ./.github/workflows/reusable-build-ubuntu.yml with: config_hash: ${{ needs.check_source.outputs.config_hash }} - # ubuntu_version: 'ubuntu-20.04' + ubuntu_version: ubuntu-20.04 run_tests: needs.check_source.outputs.run_tests build_ubuntu_ssltests: diff --git a/.github/workflows/reusable-build-ubuntu.yml b/.github/workflows/reusable-build-ubuntu.yml index 14dfb5b6126ebf..abe7695c8c5c4e 100644 --- a/.github/workflows/reusable-build-ubuntu.yml +++ b/.github/workflows/reusable-build-ubuntu.yml @@ -17,7 +17,7 @@ permissions: contents: read jobs: - runs-on: 'ubuntu_20.04' + runs-on: ubuntu_20.04 timeout-minutes: 60 needs: check_source if: inputs.run_tests == 'true' From 5fd16f56af9b7999d24b65c553c2f64231b5aef7 Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 07:05:08 +0100 Subject: [PATCH 08/27] Fixed syntax issue for ubuntu_version v4. --- .github/workflows/reusable-build-ubuntu.yml | 129 ++++++++++---------- 1 file changed, 65 insertions(+), 64 deletions(-) diff --git a/.github/workflows/reusable-build-ubuntu.yml b/.github/workflows/reusable-build-ubuntu.yml index abe7695c8c5c4e..0c6cfcea4fc519 100644 --- a/.github/workflows/reusable-build-ubuntu.yml +++ b/.github/workflows/reusable-build-ubuntu.yml @@ -17,67 +17,68 @@ permissions: contents: read jobs: - runs-on: ubuntu_20.04 - timeout-minutes: 60 - needs: check_source - if: inputs.run_tests == 'true' - 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: | - ../cpython-ro-srcdir/configure \ - --config-cache \ - --with-pydebug \ - --with-openssl=$OPENSSL_DIR - - 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 + build_ubuntu_reusable: + runs-on: ${{ inputs.ubuntu_version }} + timeout-minutes: 60 + needs: check_source + if: inputs.run_tests == 'true' + 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: | + ../cpython-ro-srcdir/configure \ + --config-cache \ + --with-pydebug \ + --with-openssl=$OPENSSL_DIR + - 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 From 6f11e3a89ea94363931c9708b673ea06cb858f08 Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 07:07:20 +0100 Subject: [PATCH 09/27] Fixed test run condition. --- .github/workflows/build.yml | 1 + .github/workflows/reusable-build-ubuntu.yml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 137bee30a319e2..96f763a1721af1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -268,6 +268,7 @@ jobs: build_ubuntu: name: 'Ubuntu' uses: ./.github/workflows/reusable-build-ubuntu.yml + if: inputs.run_tests == 'true' with: config_hash: ${{ needs.check_source.outputs.config_hash }} ubuntu_version: ubuntu-20.04 diff --git a/.github/workflows/reusable-build-ubuntu.yml b/.github/workflows/reusable-build-ubuntu.yml index 0c6cfcea4fc519..b5c0577b9558d1 100644 --- a/.github/workflows/reusable-build-ubuntu.yml +++ b/.github/workflows/reusable-build-ubuntu.yml @@ -21,7 +21,6 @@ jobs: runs-on: ${{ inputs.ubuntu_version }} timeout-minutes: 60 needs: check_source - if: inputs.run_tests == 'true' env: OPENSSL_VER: 3.0.11 PYTHONSTRICTEXTENSIONBUILD: 1 From e2d21b077ffc29d8fb6eec6acb127f544eda92aa Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 07:08:24 +0100 Subject: [PATCH 10/27] Fixed test run condition v2 --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 96f763a1721af1..877d7f3296fae5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -268,11 +268,10 @@ jobs: build_ubuntu: name: 'Ubuntu' uses: ./.github/workflows/reusable-build-ubuntu.yml - if: inputs.run_tests == 'true' + if: needs.check_source.outputs.run_tests == 'true' with: config_hash: ${{ needs.check_source.outputs.config_hash }} ubuntu_version: ubuntu-20.04 - run_tests: needs.check_source.outputs.run_tests build_ubuntu_ssltests: name: 'Ubuntu SSL tests with OpenSSL' From badb8187b646bc58dd109ce0b099760f287bb85d Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 07:09:49 +0100 Subject: [PATCH 11/27] Removed needs from reusable workflow --- .github/workflows/reusable-build-ubuntu.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/reusable-build-ubuntu.yml b/.github/workflows/reusable-build-ubuntu.yml index b5c0577b9558d1..6396bde73e9aab 100644 --- a/.github/workflows/reusable-build-ubuntu.yml +++ b/.github/workflows/reusable-build-ubuntu.yml @@ -20,7 +20,6 @@ jobs: build_ubuntu_reusable: runs-on: ${{ inputs.ubuntu_version }} timeout-minutes: 60 - needs: check_source env: OPENSSL_VER: 3.0.11 PYTHONSTRICTEXTENSIONBUILD: 1 From 01af84add93b25c8029df6a89aadf615cc7062b1 Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 07:14:56 +0100 Subject: [PATCH 12/27] Moved needs back to build.yml --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 877d7f3296fae5..cc7c4884516fda 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -267,6 +267,7 @@ jobs: build_ubuntu: name: 'Ubuntu' + needs: check_source uses: ./.github/workflows/reusable-build-ubuntu.yml if: needs.check_source.outputs.run_tests == 'true' with: From 1cb1f77641b47eb672292241b686c57a43dd1a85 Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 07:34:25 +0100 Subject: [PATCH 13/27] Fixed conditional --- .github/workflows/reusable-build-ubuntu.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/reusable-build-ubuntu.yml b/.github/workflows/reusable-build-ubuntu.yml index 6396bde73e9aab..5fe60358c06d5e 100644 --- a/.github/workflows/reusable-build-ubuntu.yml +++ b/.github/workflows/reusable-build-ubuntu.yml @@ -1,8 +1,3 @@ -name: Tests - -# gh-84728: "paths-ignore" is not used to skip documentation-only PRs, because -# it prevents to mark a job as mandatory. A PR cannot be merged if a job is -# mandatory but not scheduled because of "paths-ignore". on: workflow_call: inputs: @@ -13,9 +8,6 @@ on: required: true type: string -permissions: - contents: read - jobs: build_ubuntu_reusable: runs-on: ${{ inputs.ubuntu_version }} From 7949d22ef247a9b684d5b177db78b9fe32e58ff0 Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 07:36:05 +0100 Subject: [PATCH 14/27] Set ubuntu version --- .github/workflows/build.yml | 3 +-- .github/workflows/reusable-build-ubuntu.yml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cc7c4884516fda..6bdaaae9cc111e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -268,11 +268,10 @@ jobs: build_ubuntu: name: 'Ubuntu' needs: check_source - uses: ./.github/workflows/reusable-build-ubuntu.yml if: needs.check_source.outputs.run_tests == 'true' + uses: ./.github/workflows/reusable-build-ubuntu.yml with: config_hash: ${{ needs.check_source.outputs.config_hash }} - ubuntu_version: ubuntu-20.04 build_ubuntu_ssltests: name: 'Ubuntu SSL tests with OpenSSL' diff --git a/.github/workflows/reusable-build-ubuntu.yml b/.github/workflows/reusable-build-ubuntu.yml index 5fe60358c06d5e..2b558905690269 100644 --- a/.github/workflows/reusable-build-ubuntu.yml +++ b/.github/workflows/reusable-build-ubuntu.yml @@ -10,7 +10,7 @@ on: jobs: build_ubuntu_reusable: - runs-on: ${{ inputs.ubuntu_version }} + runs-on: ubuntu-20.04 timeout-minutes: 60 env: OPENSSL_VER: 3.0.11 From 6d05b0859b8dfa09e3d17da1b2f7419da83895d6 Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 07:41:27 +0100 Subject: [PATCH 15/27] Reordered variables --- .github/workflows/reusable-build-ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-ubuntu.yml b/.github/workflows/reusable-build-ubuntu.yml index 2b558905690269..f5ad68e50c20b2 100644 --- a/.github/workflows/reusable-build-ubuntu.yml +++ b/.github/workflows/reusable-build-ubuntu.yml @@ -10,8 +10,8 @@ on: jobs: build_ubuntu_reusable: - runs-on: ubuntu-20.04 timeout-minutes: 60 + runs-on: ubuntu-20.04 env: OPENSSL_VER: 3.0.11 PYTHONSTRICTEXTENSIONBUILD: 1 From f57f1c3e408d5c221184df18bc0fca3447763e0b Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 07:49:51 +0100 Subject: [PATCH 16/27] Remove drequirement for ubuntu_version --- .github/workflows/reusable-build-ubuntu.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/reusable-build-ubuntu.yml b/.github/workflows/reusable-build-ubuntu.yml index f5ad68e50c20b2..675a1800f2ce44 100644 --- a/.github/workflows/reusable-build-ubuntu.yml +++ b/.github/workflows/reusable-build-ubuntu.yml @@ -4,9 +4,6 @@ on: config_hash: required: true type: string - ubuntu_version: - required: true - type: string jobs: build_ubuntu_reusable: From 3e198897d41566c05f84866d79cf5743296b508d Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 07:55:31 +0100 Subject: [PATCH 17/27] Ubuntu build test with GIL disabled - first pass --- .github/workflows/build.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a344f059fff1c..84cb0d360fd65b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -244,6 +244,25 @@ jobs: uses: ./.github/workflows/reusable-build-ubuntu.yml with: config_hash: ${{ needs.check_source.outputs.config_hash }} + options: | + ../cpython-ro-srcdir/configure \ + --config-cache \ + --with-pydebug \ + --with-openssl=$OPENSSL_DIR + + build_ubuntu_nogil: + name: 'Ubuntu GIL disabled' + needs: check_source + if: needs.check_source.outputs.run_tests == 'true' + uses: ./.github/workflows/reusable-build-ubuntu.yml + with: + config_hash: ${{ needs.check_source.outputs.config_hash }} + options: | + ../cpython-ro-srcdir/configure \ + --config-cache \ + --with-pydebug \ + --with-openssl=$OPENSSL_DIR \ + --disable-gil build_ubuntu_ssltests: name: 'Ubuntu SSL tests with OpenSSL' @@ -514,6 +533,7 @@ jobs: - build_win_arm64 - build_macos - build_ubuntu + - build_ubuntu_nogil - build_ubuntu_ssltests - test_hypothesis - build_asan @@ -527,6 +547,7 @@ jobs: with: allowed-failures: >- build_macos, + build_ubuntu_nogil, build_ubuntu_ssltests, build_win32, build_win_arm64, @@ -549,6 +570,7 @@ jobs: build_win_arm64, build_macos, build_ubuntu, + build_ubuntu_nogil, build_ubuntu_ssltests, build_asan, ' From 5cb40bb7c8a128b5dda96c32631d513b6c4d1e3f Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 08:01:31 +0100 Subject: [PATCH 18/27] Added changes to the reusable workflow --- .github/workflows/reusable-build-ubuntu.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-ubuntu.yml b/.github/workflows/reusable-build-ubuntu.yml index 675a1800f2ce44..7ebb7bd2878b4a 100644 --- a/.github/workflows/reusable-build-ubuntu.yml +++ b/.github/workflows/reusable-build-ubuntu.yml @@ -4,6 +4,9 @@ on: config_hash: required: true type: string + options: + required: true + type: string jobs: build_ubuntu_reusable: @@ -52,7 +55,7 @@ jobs: key: ${{ github.job }}-${{ runner.os }}-${{ inputs.config_hash }} - name: Configure CPython out-of-tree working-directory: ${{ env.CPYTHON_BUILDDIR }} - run: | + run: options| ../cpython-ro-srcdir/configure \ --config-cache \ --with-pydebug \ From e61163640fde257fbde0fff7bb0a5c0afa872050 Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 08:06:27 +0100 Subject: [PATCH 19/27] Reenabled all tests, fixed import --- .github/workflows/build.yml | 478 ++++++++++---------- .github/workflows/reusable-build-ubuntu.yml | 6 +- 2 files changed, 240 insertions(+), 244 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 84cb0d360fd65b..212987be6eeae7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -126,57 +126,57 @@ jobs: if: needs.check_source.outputs.run_tests == 'true' steps: - uses: actions/checkout@v4 - # - uses: actions/setup-python@v4 - # with: - # python-version: '3.x' - # - name: Restore config.cache - # uses: actions/cache@v3 - # with: - # path: config.cache - # key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}-${{ env.pythonLocation }} - # - name: Install Dependencies - # run: sudo ./.github/workflows/posix-deps-apt.sh - # - 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: Check Autoconf and aclocal versions - # run: | - # grep "Generated by GNU Autoconf 2.71" configure - # grep "aclocal 1.16.4" aclocal.m4 - # grep -q "runstatedir" configure - # grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4 - # - name: Configure CPython - # run: | - # # Build Python with the libpython dynamic library - # ./configure --config-cache --with-pydebug --enable-shared - # - name: Regenerate autoconf files with container image - # run: make regen-configure - # - name: Build CPython - # run: | - # make -j4 regen-all - # make regen-stdlib-module-names - # - name: Check for changes - # run: | - # git add -u - # changes=$(git status --porcelain) - # # Check for changes in regenerated files - # if test -n "$changes"; then - # echo "Generated files not up to date." - # echo "Perhaps you forgot to run make regen-all or build.bat --regen. ;)" - # echo "configure files must be regenerated with a specific version of autoconf." - # echo "$changes" - # echo "" - # git diff --staged || true - # exit 1 - # fi - # - name: Check exported libpython symbols - # run: make smelly - # - name: Check limited ABI symbols - # run: make check-limited-abi - # - name: Check for unsupported C global variables - # if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME - # run: make check-c-globals + - uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Restore config.cache + uses: actions/cache@v3 + with: + path: config.cache + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}-${{ env.pythonLocation }} + - name: Install Dependencies + run: sudo ./.github/workflows/posix-deps-apt.sh + - 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: Check Autoconf and aclocal versions + run: | + grep "Generated by GNU Autoconf 2.71" configure + grep "aclocal 1.16.4" aclocal.m4 + grep -q "runstatedir" configure + grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4 + - name: Configure CPython + run: | + # Build Python with the libpython dynamic library + ./configure --config-cache --with-pydebug --enable-shared + - name: Regenerate autoconf files with container image + run: make regen-configure + - name: Build CPython + run: | + make -j4 regen-all + make regen-stdlib-module-names + - name: Check for changes + run: | + git add -u + changes=$(git status --porcelain) + # Check for changes in regenerated files + if test -n "$changes"; then + echo "Generated files not up to date." + echo "Perhaps you forgot to run make regen-all or build.bat --regen. ;)" + echo "configure files must be regenerated with a specific version of autoconf." + echo "$changes" + echo "" + git diff --staged || true + exit 1 + fi + - name: Check exported libpython symbols + run: make smelly + - name: Check limited ABI symbols + run: make check-limited-abi + - name: Check for unsupported C global variables + if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME + run: make check-c-globals build_win32: name: 'Windows (x86)' @@ -188,12 +188,12 @@ jobs: IncludeUwp: 'true' steps: - uses: actions/checkout@v4 - # - name: Build CPython - # run: .\PCbuild\build.bat -e -d -p Win32 - # - name: Display build info - # run: .\python.bat -m test.pythoninfo - # - name: Tests - # run: .\PCbuild\rt.bat -p Win32 -d -q --fast-ci + - name: Build CPython + run: .\PCbuild\build.bat -e -d -p Win32 + - name: Display build info + run: .\python.bat -m test.pythoninfo + - name: Tests + run: .\PCbuild\rt.bat -p Win32 -d -q --fast-ci build_win_amd64: name: 'Windows (x64)' @@ -207,12 +207,12 @@ jobs: - uses: actions/checkout@v4 - name: Register MSVC problem matcher run: echo "::add-matcher::.github/problem-matchers/msvc.json" - # - name: Build CPython - # run: .\PCbuild\build.bat -e -d -p x64 - # - name: Display build info - # run: .\python.bat -m test.pythoninfo - # - name: Tests - # run: .\PCbuild\rt.bat -p x64 -d -q --fast-ci + - name: Build CPython + run: .\PCbuild\build.bat -e -d -p x64 + - name: Display build info + run: .\python.bat -m test.pythoninfo + - name: Tests + run: .\PCbuild\rt.bat -p x64 -d -q --fast-ci build_win_arm64: name: 'Windows (arm64)' @@ -224,10 +224,10 @@ jobs: IncludeUwp: 'true' steps: - uses: actions/checkout@v4 - # - name: Register MSVC problem matcher - # run: echo "::add-matcher::.github/problem-matchers/msvc.json" - # - name: Build CPython - # run: .\PCbuild\build.bat -e -d -p arm64 + - name: Register MSVC problem matcher + run: echo "::add-matcher::.github/problem-matchers/msvc.json" + - name: Build CPython + run: .\PCbuild\build.bat -e -d -p arm64 build_macos: name: 'macOS' @@ -281,42 +281,42 @@ jobs: LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib steps: - uses: actions/checkout@v4 - # - name: Restore config.cache - # uses: actions/cache@v3 - # with: - # path: config.cache - # key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} - # - 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: Configure CPython - # run: ./configure --config-cache --with-pydebug --with-openssl=$OPENSSL_DIR - # - name: Build CPython - # run: make -j4 - # - name: Display build info - # run: make pythoninfo - # - name: SSL tests - # run: ./python Lib/test/ssltests.py + - name: Restore config.cache + uses: actions/cache@v3 + with: + path: config.cache + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} + - 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: Configure CPython + run: ./configure --config-cache --with-pydebug --with-openssl=$OPENSSL_DIR + - name: Build CPython + run: make -j4 + - name: Display build info + run: make pythoninfo + - name: SSL tests + run: ./python Lib/test/ssltests.py test_hypothesis: name: "Hypothesis tests on Ubuntu" @@ -329,102 +329,102 @@ jobs: 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 }}-${{ needs.check_source.outputs.config_hash }} - # - name: Configure CPython out-of-tree - # working-directory: ${{ env.CPYTHON_BUILDDIR }} - # run: | - # ../cpython-ro-srcdir/configure \ - # --config-cache \ - # --with-pydebug \ - # --with-openssl=$OPENSSL_DIR - # - 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: Setup directory envs for out-of-tree builds - # run: | - # echo "CPYTHON_BUILDDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-builddir)" >> $GITHUB_ENV - # - name: "Create hypothesis venv" - # working-directory: ${{ env.CPYTHON_BUILDDIR }} - # run: | - # VENV_LOC=$(realpath -m .)/hypovenv - # VENV_PYTHON=$VENV_LOC/bin/python - # echo "HYPOVENV=${VENV_LOC}" >> $GITHUB_ENV - # echo "VENV_PYTHON=${VENV_PYTHON}" >> $GITHUB_ENV - # ./python -m venv $VENV_LOC && $VENV_PYTHON -m pip install -r ${GITHUB_WORKSPACE}/Tools/requirements-hypothesis.txt - # - name: 'Restore Hypothesis database' - # id: cache-hypothesis-database - # uses: actions/cache@v3 - # with: - # path: ./hypothesis - # key: hypothesis-database-${{ github.head_ref || github.run_id }} - # restore-keys: | - # - hypothesis-database- - # - name: "Run tests" - # working-directory: ${{ env.CPYTHON_BUILDDIR }} - # run: | - # # Most of the excluded tests are slow test suites with no property tests - # # - # # (GH-104097) test_sysconfig is skipped because it has tests that are - # # failing when executed from inside a virtual environment. - # ${{ env.VENV_PYTHON }} -m test \ - # -W \ - # -o \ - # -j4 \ - # -x test_asyncio \ - # -x test_multiprocessing_fork \ - # -x test_multiprocessing_forkserver \ - # -x test_multiprocessing_spawn \ - # -x test_concurrent_futures \ - # -x test_socket \ - # -x test_subprocess \ - # -x test_signal \ - # -x test_sysconfig - # - uses: actions/upload-artifact@v3 - # if: always() - # with: - # name: hypothesis-example-db - # path: .hypothesis/examples/ + - 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 }}-${{ needs.check_source.outputs.config_hash }} + - name: Configure CPython out-of-tree + working-directory: ${{ env.CPYTHON_BUILDDIR }} + run: | + ../cpython-ro-srcdir/configure \ + --config-cache \ + --with-pydebug \ + --with-openssl=$OPENSSL_DIR + - 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: Setup directory envs for out-of-tree builds + run: | + echo "CPYTHON_BUILDDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-builddir)" >> $GITHUB_ENV + - name: "Create hypothesis venv" + working-directory: ${{ env.CPYTHON_BUILDDIR }} + run: | + VENV_LOC=$(realpath -m .)/hypovenv + VENV_PYTHON=$VENV_LOC/bin/python + echo "HYPOVENV=${VENV_LOC}" >> $GITHUB_ENV + echo "VENV_PYTHON=${VENV_PYTHON}" >> $GITHUB_ENV + ./python -m venv $VENV_LOC && $VENV_PYTHON -m pip install -r ${GITHUB_WORKSPACE}/Tools/requirements-hypothesis.txt + - name: 'Restore Hypothesis database' + id: cache-hypothesis-database + uses: actions/cache@v3 + with: + path: ./hypothesis + key: hypothesis-database-${{ github.head_ref || github.run_id }} + restore-keys: | + - hypothesis-database- + - name: "Run tests" + working-directory: ${{ env.CPYTHON_BUILDDIR }} + run: | + # Most of the excluded tests are slow test suites with no property tests + # + # (GH-104097) test_sysconfig is skipped because it has tests that are + # failing when executed from inside a virtual environment. + ${{ env.VENV_PYTHON }} -m test \ + -W \ + -o \ + -j4 \ + -x test_asyncio \ + -x test_multiprocessing_fork \ + -x test_multiprocessing_forkserver \ + -x test_multiprocessing_spawn \ + -x test_concurrent_futures \ + -x test_socket \ + -x test_subprocess \ + -x test_signal \ + -x test_sysconfig + - uses: actions/upload-artifact@v3 + if: always() + with: + name: hypothesis-example-db + path: .hypothesis/examples/ build_asan: @@ -439,46 +439,46 @@ jobs: ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0 steps: - uses: actions/checkout@v4 - # - name: Restore config.cache - # uses: actions/cache@v3 - # with: - # path: config.cache - # key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} - # - 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: Set up GCC-10 for ASAN - # uses: egor-tensin/setup-gcc@v1 - # with: - # version: 10 - # - 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: Configure CPython - # run: ./configure --config-cache --with-address-sanitizer --without-pymalloc - # - name: Build CPython - # run: make -j4 - # - name: Display build info - # run: make pythoninfo - # - name: Tests - # run: xvfb-run make test + - name: Restore config.cache + uses: actions/cache@v3 + with: + path: config.cache + key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} + - 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: Set up GCC-10 for ASAN + uses: egor-tensin/setup-gcc@v1 + with: + version: 10 + - 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: Configure CPython + run: ./configure --config-cache --with-address-sanitizer --without-pymalloc + - name: Build CPython + run: make -j4 + - name: Display build info + run: make pythoninfo + - name: Tests + run: xvfb-run make test # CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/ cifuzz: diff --git a/.github/workflows/reusable-build-ubuntu.yml b/.github/workflows/reusable-build-ubuntu.yml index 7ebb7bd2878b4a..cad6a780ed0af1 100644 --- a/.github/workflows/reusable-build-ubuntu.yml +++ b/.github/workflows/reusable-build-ubuntu.yml @@ -55,11 +55,7 @@ jobs: key: ${{ github.job }}-${{ runner.os }}-${{ inputs.config_hash }} - name: Configure CPython out-of-tree working-directory: ${{ env.CPYTHON_BUILDDIR }} - run: options| - ../cpython-ro-srcdir/configure \ - --config-cache \ - --with-pydebug \ - --with-openssl=$OPENSSL_DIR + run: options - name: Build CPython out-of-tree working-directory: ${{ env.CPYTHON_BUILDDIR }} run: make -j4 From 65e38f3849f62ee61a5155278d808da0df16089a Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 08:11:14 +0100 Subject: [PATCH 20/27] Evaluate input variable --- .github/workflows/reusable-build-ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-ubuntu.yml b/.github/workflows/reusable-build-ubuntu.yml index cad6a780ed0af1..8bc41cd6f72c45 100644 --- a/.github/workflows/reusable-build-ubuntu.yml +++ b/.github/workflows/reusable-build-ubuntu.yml @@ -55,7 +55,7 @@ jobs: key: ${{ github.job }}-${{ runner.os }}-${{ inputs.config_hash }} - name: Configure CPython out-of-tree working-directory: ${{ env.CPYTHON_BUILDDIR }} - run: options + run: ${{ options }} - name: Build CPython out-of-tree working-directory: ${{ env.CPYTHON_BUILDDIR }} run: make -j4 From 3225b9bf2696f732421ccc5cd79e726257bdc686 Mon Sep 17 00:00:00 2001 From: Nicholas Ipsen Date: Sun, 29 Oct 2023 08:13:03 +0100 Subject: [PATCH 21/27] Evaluate input variable --- .github/workflows/reusable-build-ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-ubuntu.yml b/.github/workflows/reusable-build-ubuntu.yml index 8bc41cd6f72c45..1a488238af8171 100644 --- a/.github/workflows/reusable-build-ubuntu.yml +++ b/.github/workflows/reusable-build-ubuntu.yml @@ -55,7 +55,7 @@ jobs: key: ${{ github.job }}-${{ runner.os }}-${{ inputs.config_hash }} - name: Configure CPython out-of-tree working-directory: ${{ env.CPYTHON_BUILDDIR }} - run: ${{ options }} + run: ${{ inputs.options }} - name: Build CPython out-of-tree working-directory: ${{ env.CPYTHON_BUILDDIR }} run: make -j4 From 12c9def09257dfae197129c12157a728052a0da1 Mon Sep 17 00:00:00 2001 From: NCLI <45665319+NCLI@users.noreply.github.com> Date: Sun, 29 Oct 2023 07:34:16 +0000 Subject: [PATCH 22/27] Update .github/workflows/build.yml Co-authored-by: Donghee Na --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d29de98fafcb2..3b75f8df6228a5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -259,7 +259,7 @@ jobs: --with-pydebug \ --with-openssl=$OPENSSL_DIR - build_ubuntu_nogil: + build_ubuntu_free_threaded: name: 'Ubuntu GIL disabled' needs: check_source if: needs.check_source.outputs.run_tests == 'true' From 6d36072d9f0b24d11736c7bceb4173838157246d Mon Sep 17 00:00:00 2001 From: NCLI <45665319+NCLI@users.noreply.github.com> Date: Sun, 29 Oct 2023 07:34:25 +0000 Subject: [PATCH 23/27] Update .github/workflows/build.yml Co-authored-by: Donghee Na --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b75f8df6228a5..4ebc6855b98047 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -579,7 +579,7 @@ jobs: build_win_arm64, build_macos, build_ubuntu, - build_ubuntu_nogil, + build_ubuntu_free_threaded, build_ubuntu_ssltests, build_asan, ' From adf483b67927ae25a5fda559a8d985c597ebaeaf Mon Sep 17 00:00:00 2001 From: NCLI <45665319+NCLI@users.noreply.github.com> Date: Sun, 29 Oct 2023 07:34:41 +0000 Subject: [PATCH 24/27] Update .github/workflows/build.yml Co-authored-by: Donghee Na --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ebc6855b98047..57332b4a7dcadb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -260,7 +260,7 @@ jobs: --with-openssl=$OPENSSL_DIR build_ubuntu_free_threaded: - name: 'Ubuntu GIL disabled' + name: 'Ubuntu (free-threaded)' needs: check_source if: needs.check_source.outputs.run_tests == 'true' uses: ./.github/workflows/reusable-build-ubuntu.yml From 8cffab1cfbcd43d8c3d8590c780fdac6b39c65e3 Mon Sep 17 00:00:00 2001 From: NCLI <45665319+NCLI@users.noreply.github.com> Date: Sun, 29 Oct 2023 07:34:49 +0000 Subject: [PATCH 25/27] Update .github/workflows/build.yml Co-authored-by: Donghee Na --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 57332b4a7dcadb..09a7560cc35c7c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -556,7 +556,7 @@ jobs: with: allowed-failures: >- build_macos, - build_ubuntu_nogil, + build_ubuntu_free_threaded, build_ubuntu_ssltests, build_win32, build_win_arm64, From 26ec9b9f5ae6957c1b9f0537d8de17ce42cdf0df Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Sun, 29 Oct 2023 16:38:23 +0900 Subject: [PATCH 26/27] Update .github/workflows/build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 09a7560cc35c7c..70ab4145892c97 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -542,7 +542,7 @@ jobs: - build_win_arm64 - build_macos - build_ubuntu - - build_ubuntu_nogil + - build_ubuntu_free_threaded - build_ubuntu_ssltests - test_hypothesis - build_asan From acdbec2de0fd06c0b6b10741fd4a3d471bb394a2 Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Mon, 30 Oct 2023 00:07:47 +0900 Subject: [PATCH 27/27] Update .github/workflows/build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 70ab4145892c97..ca542d2289762e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -262,7 +262,7 @@ jobs: build_ubuntu_free_threaded: name: 'Ubuntu (free-threaded)' needs: check_source - if: needs.check_source.outputs.run_tests == 'true' + if: needs.check_source.outputs.run_tests == 'true' && contains(github.event.pull_request.labels.*.name, 'topic-free-threaded') uses: ./.github/workflows/reusable-build-ubuntu.yml with: config_hash: ${{ needs.check_source.outputs.config_hash }}