Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-136728: Refactor build.yml CI config and multissltests.py#136729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
a104f8a3fcbe0d5d8ec9a991c6b27b5149966381274e0a8ca1a90e0c1fcb49fdd969fb1edce1c33431206536fabf783cc3c8b80f525c294b20aeb3a450e836c2202a7cbe0cb7cc48bf050ecd6bfc2f0fe9af7a2057937a84ee6929e8e044ed4dc3dd1e17ccd7c44f3784b7e693509fa57342890305aff0594a463cf6758f86d90458d46f96579c5b48611f74b9a480659ede34ea3fd78888d101de22e71d3d4cf9b3f2d80a1c63089d92ac154362895d1e78f57d56991af21eaf5e11fa9976c2b772611900e24b83a728e584fcdbd61ee04823abbf15225635836b2813ccc76f3ca1f2ac3bfe5dfa9a4250efbad6c3febba713684ddaa9aa4f37f57d6cb245db6b0e1479c03acef834de23ad9c50aedf2f7e3a5a7aa8a43d04899b8469fe3396ab3793c4429fc5215977f6c16a2d9f4e3422ca071fb8e0ed00d39ffaa26045d13335513ae17e5ad7b76b9a6c661fc72a9712dc118f3c59315f47409ce5928a2deea61f2ad908a17ed864c598ef6f92a0417dab9825832f7a03bb136f6d8b538c28abdbe0be7c542d6d05e552c39b9d27434c63c56f9e12283f6ef3b8826c53af196095746116d70e6bfe4dc99f76668fcb95bfac54d4f9a8d01569275240a6c37a572d904ace4112d363bd6f77e64d212977dae107efb4e6cdd750b371119a1d745b60841b748d9c123554f1ed005406b2faa3dc790c44bc7b0a3728735dafe79c9b774bb3ca51227b6ff7d1cedf3553498e55d70a5c04a4fb6a31b866a1c8565ddda1eedaeb3e4a34b2827de51a56a3d0439499a3263fbfc3d8d228d955f11f5eb67d3d036c9f7b4c07e5ecf3e069aefaa56f546200249c3b0a8cf5c4dcea2d24aeb3403e2f15aeb54a1d2dfeefbe68a01f9af9f783fd6d41b234a15ddcdb23f6d54b6a39a2bcfa9ca49da4086d7ba101006d6c7edc696f3361e0366b85223666bca38499d3a81932127e0fb278952591178e868fe7f5ffae2f0160ce6bae9aa8578d718c15f75d73c303e6457d1282ef515ae40e22b68523b93779633f95620a5b9265381b9d13ca9548526b5f28aa2dbd10a6f3759d2bd83a5743c76587f50a5f82f115466414c3File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Diff view
Diff view
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -243,78 +243,32 @@ jobs: | ||
| free-threading: ${{matrix.free-threading }} | ||
| os: ${{matrix.os }} | ||
| build-ubuntu-ssltests-openssl: | ||
| name: 'Ubuntu SSL tests with OpenSSL' | ||
| runs-on: ${{matrix.os }} | ||
| build-ubuntu-ssltests: | ||
| name: 'Ubuntu SSL tests' | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 60 | ||
| needs: build-context | ||
| if: needs.build-context.outputs.run-ubuntu == 'true' | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-24.04] | ||
| # Keep 1.1.1w in our list despite it being upstream EOL and otherwise | ||
| # unsupported as it most resembles other 1.1.1-work-a-like ssl APIs | ||
| # supported by important vendors such as AWS-LC. | ||
| openssl_ver: [1.1.1w, 3.0.18, 3.2.6, 3.3.5, 3.4.3, 3.5.4] | ||
| include: | ||
| # Keep 1.1.1w in our list despite it being upstream EOL and otherwise | ||
| # unsupported as it most resembles other 1.1.1-work-a-like ssl APIs | ||
| # supported by important vendors such as AWS-LC. | ||
| -{ssl: openssl, ssl_ver: 1.1.1w } | ||
| -{ssl: openssl, ssl_ver: 3.0.18 } | ||
| -{ssl: openssl, ssl_ver: 3.2.6 } | ||
| -{ssl: openssl, ssl_ver: 3.3.5 } | ||
| -{ssl: openssl, ssl_ver: 3.4.3 } | ||
| -{ssl: openssl, ssl_ver: 3.5.4 } | ||
| -{ssl: awslc, ssl_ver: 1.55.0 } | ||
| # See Tools/ssl/make_ssl_data.py for notes on adding a new version | ||
| env: | ||
| OPENSSL_VER: ${{matrix.openssl_ver }} | ||
| MULTISSL_DIR: ${{github.workspace }}/multissl | ||
| OPENSSL_DIR: ${{github.workspace }}/multissl/openssl/${{matrix.openssl_ver }} | ||
| LD_LIBRARY_PATH: ${{github.workspace }}/multissl/openssl/${{matrix.openssl_ver }}/lib | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Runner image version | ||
| run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV" | ||
| - 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@v4 | ||
| with: | ||
| path: ./multissl/openssl/${{env.OPENSSL_VER }} | ||
| key: ${{matrix.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 CPython | ||
| run: ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --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 | ||
| build-ubuntu-ssltests-awslc: | ||
| name: 'Ubuntu SSL tests with AWS-LC' | ||
| runs-on: ${{matrix.os }} | ||
| timeout-minutes: 60 | ||
| needs: build-context | ||
| if: needs.build-context.outputs.run-ubuntu == 'true' | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-24.04] | ||
| awslc_ver: [1.55.0] | ||
| env: | ||
| AWSLC_VER: ${{matrix.awslc_ver}} | ||
| SSL_VER: ${{matrix.ssl_ver }} | ||
| MULTISSL_DIR: ${{github.workspace }}/multissl | ||
| OPENSSL_DIR: ${{github.workspace }}/multissl/aws-lc/${{matrix.awslc_ver }} | ||
| LD_LIBRARY_PATH: ${{github.workspace }}/multissl/aws-lc/${{matrix.awslc_ver }}/lib | ||
| SSL_DIR: ${{github.workspace }}/multissl/${{matrix.ssl }}/${{matrix.ssl_ver }} | ||
| LD_LIBRARY_PATH: ${{github.workspace }}/multissl/${{matrix.ssl }}/${{matrix.ssl_ver }}/lib | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| @@ -328,39 +282,35 @@ jobs: | ||
| - name: Configure SSL lib env vars | ||
| run: | | ||
| echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV" | ||
| echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/aws-lc/${AWSLC_VER}" >> "$GITHUB_ENV" | ||
| echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/aws-lc/${AWSLC_VER}/lib" >> "$GITHUB_ENV" | ||
| - name: 'Restore AWS-LC build' | ||
| id: cache-aws-lc | ||
| echo "SSL_DIR=${GITHUB_WORKSPACE}/multissl/${{matrix.ssl }}/${SSL_VER}" >> "$GITHUB_ENV" | ||
| echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/${{matrix.ssl }}/${SSL_VER}/lib" >> "$GITHUB_ENV" | ||
| - name: 'Restore SSL build' | ||
| id: cache-ssl | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ./multissl/aws-lc/${{matrix.awslc_ver }} | ||
| key: ${{matrix.os }}-multissl-aws-lc-${{matrix.awslc_ver }} | ||
| - name: Install AWS-LC | ||
| if: steps.cache-aws-lc.outputs.cache-hit != 'true' | ||
| path: ./multissl/${{env.SSL }}/${{env.SSL_VER }} | ||
| key: ${{env.IMAGE_OS_VERSION }}-multissl-${{env.SSL }}-${{env.SSL_VER }} | ||
| - name: Install SSL | ||
| if: steps.cache-ssl.outputs.cache-hit != 'true' | ||
| run: | | ||
| python3 Tools/ssl/multissltests.py \ | ||
| --steps=library \ | ||
| --base-directory "$MULTISSL_DIR" \ | ||
| --awslc ${{matrix.awslc_ver }} \ | ||
| --system Linux | ||
| python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --system Linux --ssl ${{matrix.ssl }} --ssl-versions ${{matrix.ssl_ver }} | ||
hugovk marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading. Please reload this page. | ||
| - name: Add ccache to PATH | ||
| run: | | ||
| echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" | ||
| - name: Configure CPython | ||
| run: | | ||
| ./configure CFLAGS="-fdiagnostics-format=json" \ | ||
| --config-cache \ | ||
| --enable-slower-safety \ | ||
| --with-pydebug \ | ||
| --with-openssl="$OPENSSL_DIR" \ | ||
| --with-builtin-hashlib-hashes=blake2 \ | ||
| --with-ssl-default-suites=openssl | ||
| CMD=(./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$SSL_DIR") | ||
| if [ "${{matrix.ssl }}" = "openssl" ]; then | ||
| "${CMD[@]}" | ||
| else | ||
| "${CMD[@]}" --with-builtin-hashlib-hashes=blake2 --with-ssl-default-suites=openssl | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we populate a variable called "CONFIGURE_FLAGS" instead and use a switch/case so that we exactly match the SSL libname. It will become easier in the future if we add BoringSSL or LibreSSL tests. Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At this point I'd almost suggest using a small Python script to calculate flags. We should avoid complex shell logic in workflow files as much as possible, I don't want to read a bash switch-case in YAML! An if-statement is simpler to understand here for me, though the Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh yeah, a small Python script is also fine; here what matters to me is to be able to easily add a new library without having 3km long of options. As for | ||
| fi | ||
| - name: Build CPython | ||
| run: make -j | ||
| run: make -j4 | ||
picnixz marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading. Please reload this page. | ||
| - name: Display build info | ||
| run: make pythoninfo | ||
| - name: Verify python is linked to AWS-LC | ||
| if: matrix.ssl == 'aws-lc' | ||
Comment on lines 312 to +313 Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should, if possible, do it for OpenSSL as well. | ||
| run: ./python -c 'import ssl; print(ssl.OPENSSL_VERSION)' | grep AWS-LC | ||
| - name: SSL tests | ||
| run: ./python Lib/test/ssltests.py | ||
| @@ -446,7 +396,7 @@ jobs: | ||
| 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 | ||
| run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --ssl 'openssl' --ssl-versions "$OPENSSL_VER" --system Linux | ||
| - name: Add ccache to PATH | ||
| run: | | ||
| echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" | ||
| @@ -564,7 +514,7 @@ jobs: | ||
| key: ${{matrix.os }}-multissl-openssl-${{env.OPENSSL_VER }} | ||
| - name: Install OpenSSL | ||
| if: steps.cache-openssl.outputs.cache-hit != 'true' | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With | ||
| run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux | ||
| run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --ssl 'openssl' --ssl-versions "$OPENSSL_VER" --system Linux | ||
| - name: Add ccache to PATH | ||
| run: | | ||
| echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" | ||
| @@ -689,9 +639,7 @@ jobs: | ||
| - build-windows-msi | ||
| - build-macos | ||
| - build-ubuntu | ||
| - build-ubuntu-ssltests-awslc | ||
| - build-ubuntu-ssltests-openssl | ||
| - build-android | ||
| - build-ubuntu-ssltests | ||
| - build-ios | ||
| - build-wasi | ||
| - test-hypothesis | ||
| @@ -706,9 +654,9 @@ jobs: | ||
| uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe | ||
| with: | ||
| allowed-failures: >- | ||
| build-android, | ||
| build-windows-msi, | ||
| build-ubuntu-ssltests-awslc, | ||
| build-ubuntu-ssltests-openssl, | ||
| build-ubuntu-ssltests, | ||
| test-hypothesis, | ||
| cifuzz, | ||
| allowed-skips: >- | ||
| @@ -728,8 +676,8 @@ jobs: | ||
| !fromJSON(needs.build-context.outputs.run-ubuntu) | ||
| && ' | ||
| build-ubuntu, | ||
| build-ubuntu-ssltests-awslc, | ||
| build-ubuntu-ssltests-openssl, | ||
| build-ubuntu-ssltests, | ||
| build-wasi, | ||
| test-hypothesis, | ||
| build-asan, | ||
| build-san, | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.