|
|
@ -1,23 +1,15 @@ |
|
|
|
name: Tests |
|
|
|
|
|
|
|
# bpo-40548: "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_dispatch: |
|
|
|
push: |
|
|
|
branches: |
|
|
|
- master |
|
|
|
- 3.10 |
|
|
|
- 3.9 |
|
|
|
- 3.8 |
|
|
|
- 3.7 |
|
|
|
- 'main' |
|
|
|
- '3.*' |
|
|
|
pull_request: |
|
|
|
branches: |
|
|
|
- master |
|
|
|
- 3.10 |
|
|
|
- 3.9 |
|
|
|
- 3.8 |
|
|
|
- 3.7 |
|
|
|
- 'main' |
|
|
|
- '3.*' |
|
|
|
|
|
|
|
permissions: |
|
|
|
contents: read |
|
|
@ -26,10 +18,14 @@ concurrency: |
|
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
|
|
|
cancel-in-progress: true |
|
|
|
|
|
|
|
env: |
|
|
|
FORCE_COLOR: 1 |
|
|
|
|
|
|
|
jobs: |
|
|
|
check_source: |
|
|
|
name: 'Check for source changes' |
|
|
|
runs-on: ubuntu-latest |
|
|
|
timeout-minutes: 10 |
|
|
|
outputs: |
|
|
|
run_tests: ${{ steps.check.outputs.run_tests }} |
|
|
|
run_ssl_tests: ${{ steps.check.outputs.run_ssl_tests }} |
|
|
@ -62,13 +58,15 @@ jobs: |
|
|
|
|
|
|
|
check_abi: |
|
|
|
name: 'Check if the ABI has changed' |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
runs-on: ubuntu-22.04 # 24.04 causes spurious errors |
|
|
|
needs: check_source |
|
|
|
if: needs.check_source.outputs.run_tests == 'true' |
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v4 |
|
|
|
- uses: actions/setup-python@v4 |
|
|
|
- name: Install Dependencies |
|
|
|
with: |
|
|
|
persist-credentials: false |
|
|
|
- uses: actions/setup-python@v5 |
|
|
|
- name: Install dependencies |
|
|
|
run: | |
|
|
|
sudo ./.github/workflows/posix-deps-apt.sh |
|
|
|
sudo apt-get install -yq abigail-tools |
|
|
@ -83,25 +81,30 @@ jobs: |
|
|
|
run: | |
|
|
|
if ! make check-abidump; then |
|
|
|
echo "Generated ABI file is not up to date." |
|
|
|
echo "Please, add the release manager of this branch as a reviewer of this PR." |
|
|
|
echo "Please add the release manager of this branch as a reviewer of this PR." |
|
|
|
echo "" |
|
|
|
echo "To learn more about this check, please visit: https://devguide.python.org/setup/?highlight=abi#regenerate-the-abi-dump" |
|
|
|
echo "To learn more about this check: https://devguide.python.org/setup/#regenerate-the-abi-dump" |
|
|
|
echo "" |
|
|
|
exit 1 |
|
|
|
fi |
|
|
|
|
|
|
|
check_generated_files: |
|
|
|
name: 'Check if generated files are up to date' |
|
|
|
runs-on: ubuntu-latest |
|
|
|
# Don't use ubuntu-latest but a specific version to make the job |
|
|
|
# reproducible: to get the same tools versions (autoconf, aclocal, ...) |
|
|
|
runs-on: ubuntu-22.04 |
|
|
|
timeout-minutes: 60 |
|
|
|
needs: check_source |
|
|
|
if: needs.check_source.outputs.run_tests == 'true' |
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v4 |
|
|
|
- uses: actions/setup-python@v4 |
|
|
|
- name: Install Dependencies |
|
|
|
with: |
|
|
|
persist-credentials: false |
|
|
|
- uses: actions/setup-python@v5 |
|
|
|
- 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 |
|
|
|
run: echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" |
|
|
|
- name: Configure ccache action |
|
|
|
uses: hendrikmuhs/ccache-action@v1 |
|
|
|
- name: Check Autoconf version 2.69 and aclocal 1.16.3 |
|
|
@ -208,7 +211,7 @@ jobs: |
|
|
|
|
|
|
|
build_ubuntu: |
|
|
|
name: 'Ubuntu' |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
runs-on: ubuntu-24.04 |
|
|
|
needs: check_source |
|
|
|
if: needs.check_source.outputs.run_tests == 'true' |
|
|
|
env: |
|
|
@ -218,13 +221,13 @@ jobs: |
|
|
|
- uses: actions/checkout@v4 |
|
|
|
- name: Register gcc problem matcher |
|
|
|
run: echo "::add-matcher::.github/problem-matchers/gcc.json" |
|
|
|
- name: Install Dependencies |
|
|
|
- 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 |
|
|
|
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 |
|
|
@ -236,7 +239,7 @@ jobs: |
|
|
|
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 |
|
|
|
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" |
|
|
|
- name: Configure ccache action |
|
|
|
uses: hendrikmuhs/ccache-action@v1 |
|
|
|
- name: Configure CPython |
|
|
@ -250,7 +253,8 @@ jobs: |
|
|
|
|
|
|
|
build_ubuntu_ssltests: |
|
|
|
name: 'Ubuntu SSL tests with OpenSSL' |
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
runs-on: ubuntu-24.04 |
|
|
|
timeout-minutes: 60 |
|
|
|
needs: check_source |
|
|
|
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_ssl_tests == 'true' |
|
|
|
strategy: |
|
|
@ -264,15 +268,17 @@ jobs: |
|
|
|
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib |
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v4 |
|
|
|
with: |
|
|
|
persist-credentials: false |
|
|
|
- name: Register gcc problem matcher |
|
|
|
run: echo "::add-matcher::.github/problem-matchers/gcc.json" |
|
|
|
- name: Install Dependencies |
|
|
|
- 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 |
|
|
|
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 |
|
|
@ -284,7 +290,7 @@ jobs: |
|
|
|
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 |
|
|
|
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" |
|
|
|
- name: Configure ccache action |
|
|
|
uses: hendrikmuhs/ccache-action@v1.2 |
|
|
|
- name: Configure CPython |
|
|
|