From 87535993428aac027e93e7a55f29564859c3b009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Fri, 13 Oct 2023 02:33:04 +0100 Subject: [PATCH 1/6] GH-110793: add Github action job that runs tests after installing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- .github/workflows/build.yml | 69 +++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 81e85e630bb001..03888485d2700a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -334,6 +334,73 @@ jobs: working-directory: ${{ env.CPYTHON_BUILDDIR }} run: xvfb-run make test + build_ubuntu_installed: + name: 'Ubuntu (installed)' + 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: Install CPython to the system + working-directory: ${{ env.CPYTHON_BUILDDIR }} + run: sudo make install + - name: Tests + working-directory: ${{ env.CPYTHON_BUILDDIR }} + run: xvfb-run /usr/local/bin/python3 -m test + build_ubuntu_ssltests: name: 'Ubuntu SSL tests with OpenSSL' runs-on: ubuntu-20.04 @@ -603,6 +670,7 @@ jobs: - build_win_arm64 - build_macos - build_ubuntu + - build_ubuntu_installed - build_ubuntu_ssltests - test_hypothesis - build_asan @@ -638,6 +706,7 @@ jobs: build_win_arm64, build_macos, build_ubuntu, + build_ubuntu_installed, build_ubuntu_ssltests, build_asan, ' From 096ad48db57646d3e5b86adf3450ac2e6921dca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Fri, 13 Oct 2023 03:21:50 +0100 Subject: [PATCH 2/6] debug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 03888485d2700a..d6c68a70d71b00 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -397,6 +397,8 @@ jobs: - name: Install CPython to the system working-directory: ${{ env.CPYTHON_BUILDDIR }} run: sudo make install + - run: env + - run: ldd /usr/local/bin/python3 - name: Tests working-directory: ${{ env.CPYTHON_BUILDDIR }} run: xvfb-run /usr/local/bin/python3 -m test From d7c4fc381c62354379a235de4b87c09b3f4caeaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Fri, 13 Oct 2023 04:03:28 +0100 Subject: [PATCH 3/6] debug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- .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 d6c68a70d71b00..2db06c4ee1b985 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -394,11 +394,11 @@ jobs: - name: Display build info working-directory: ${{ env.CPYTHON_BUILDDIR }} run: make pythoninfo + - run: env + - run: ldd /usr/local/bin/python3 - name: Install CPython to the system working-directory: ${{ env.CPYTHON_BUILDDIR }} run: sudo make install - - run: env - - run: ldd /usr/local/bin/python3 - name: Tests working-directory: ${{ env.CPYTHON_BUILDDIR }} run: xvfb-run /usr/local/bin/python3 -m test From c37986007d1ce6cb7250d6d30e2bee8e6cbf2516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Fri, 13 Oct 2023 07:08:31 +0100 Subject: [PATCH 4/6] debug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- .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 2db06c4ee1b985..bf65ee5bebda39 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -395,7 +395,7 @@ jobs: working-directory: ${{ env.CPYTHON_BUILDDIR }} run: make pythoninfo - run: env - - run: ldd /usr/local/bin/python3 + - run: ldd ${{ env.CPYTHON_BUILDDIR }}/python - name: Install CPython to the system working-directory: ${{ env.CPYTHON_BUILDDIR }} run: sudo make install From 7cdc98f72619e63514560bf8c367a1727c9e8ad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Fri, 13 Oct 2023 08:31:31 +0100 Subject: [PATCH 5/6] try --with-openssl-rpath MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- .github/workflows/build.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf65ee5bebda39..807d646c7416d8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -387,15 +387,14 @@ jobs: ../cpython-ro-srcdir/configure \ --config-cache \ --with-pydebug \ - --with-openssl=$OPENSSL_DIR + --with-openssl=$OPENSSL_DIR \ + --with-openssl-rpath - 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 - - run: env - - run: ldd ${{ env.CPYTHON_BUILDDIR }}/python - name: Install CPython to the system working-directory: ${{ env.CPYTHON_BUILDDIR }} run: sudo make install From 0775658db7a26eedf2b1ce51836abe17e0dcd26e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Fri, 13 Oct 2023 08:59:23 +0100 Subject: [PATCH 6/6] don't cd into the builddir when running the tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 807d646c7416d8..fe154dcbc3e825 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -399,7 +399,6 @@ jobs: working-directory: ${{ env.CPYTHON_BUILDDIR }} run: sudo make install - name: Tests - working-directory: ${{ env.CPYTHON_BUILDDIR }} run: xvfb-run /usr/local/bin/python3 -m test build_ubuntu_ssltests: