|  | 
| 40 | 40 |     if: fromJSON(needs.check_source.outputs.run-docs) | 
| 41 | 41 |     uses: ./.github/workflows/reusable-docs.yml | 
| 42 | 42 | 
 | 
|  | 43 | +  check_autoconf_regen: | 
|  | 44 | +    name: 'Check if Autoconf files are up to date' | 
|  | 45 | +    # Don't use ubuntu-latest but a specific version to make the job | 
|  | 46 | +    # reproducible: to get the same tools versions (autoconf, aclocal, ...) | 
|  | 47 | +    runs-on: ubuntu-24.04 | 
|  | 48 | +    container: | 
|  | 49 | +      image: ghcr.io/python/autoconf:2024.10.11.11293396815 | 
|  | 50 | +    timeout-minutes: 60 | 
|  | 51 | +    needs: check_source | 
|  | 52 | +    if: needs.check_source.outputs.run_tests == 'true' | 
|  | 53 | +    steps: | 
|  | 54 | +      - name: Install Git | 
|  | 55 | +        run: | | 
|  | 56 | +          apt install git -yq | 
|  | 57 | +          git config --global --add safe.directory "$GITHUB_WORKSPACE" | 
|  | 58 | +      - uses: actions/checkout@v4 | 
|  | 59 | +        with: | 
|  | 60 | +          fetch-depth: 1 | 
|  | 61 | +      - name: Runner image version | 
|  | 62 | +        run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV | 
|  | 63 | +      - name: Check Autoconf and aclocal versions | 
|  | 64 | +        run: | | 
|  | 65 | +          grep "Generated by GNU Autoconf 2.71" configure | 
|  | 66 | +          grep "aclocal 1.16.5" aclocal.m4 | 
|  | 67 | +          grep -q "runstatedir" configure | 
|  | 68 | +          grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4 | 
|  | 69 | +      - name: Regenerate autoconf files | 
|  | 70 | +        # Same command used by Tools/build/regen-configure.sh ($AUTORECONF) | 
|  | 71 | +        run: autoreconf -ivf -Werror | 
|  | 72 | +      - name: Check for changes | 
|  | 73 | +        run: | | 
|  | 74 | +          git add -u | 
|  | 75 | +          changes=$(git status --porcelain) | 
|  | 76 | +          # Check for changes in regenerated files | 
|  | 77 | +          if test -n "$changes"; then | 
|  | 78 | +            echo "Generated files not up to date." | 
|  | 79 | +            echo "Perhaps you forgot to run make regen-all or build.bat --regen. ;)" | 
|  | 80 | +            echo "configure files must be regenerated with a specific version of autoconf." | 
|  | 81 | +            echo "$changes" | 
|  | 82 | +            echo "" | 
|  | 83 | +            git diff --staged || true | 
|  | 84 | +            exit 1 | 
|  | 85 | +          fi | 
|  | 86 | +
 | 
| 43 | 87 |   check_generated_files: | 
| 44 | 88 |     name: 'Check if generated files are up to date' | 
| 45 | 89 |     # Don't use ubuntu-latest but a specific version to make the job | 
| @@ -69,19 +113,10 @@ jobs: | 
| 69 | 113 |         uses: hendrikmuhs/[email protected] | 
| 70 | 114 |         with: | 
| 71 | 115 |           save: false | 
| 72 |  | -      - name: Check Autoconf and aclocal versions | 
| 73 |  | -        run: | | 
| 74 |  | -          grep "Generated by GNU Autoconf 2.71" configure | 
| 75 |  | -          grep "aclocal 1.16.5" aclocal.m4 | 
| 76 |  | -          grep -q "runstatedir" configure | 
| 77 |  | -          grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4 | 
| 78 | 116 |       - name: Configure CPython | 
| 79 | 117 |         run: | | 
| 80 | 118 |           # Build Python with the libpython dynamic library | 
| 81 | 119 |           ./configure --config-cache --with-pydebug --enable-shared | 
| 82 |  | -      - name: Regenerate autoconf files | 
| 83 |  | -        # Same command used by Tools/build/regen-configure.sh ($AUTORECONF) | 
| 84 |  | -        run: autoreconf -ivf -Werror | 
| 85 | 120 |       - name: Build CPython | 
| 86 | 121 |         run: | | 
| 87 | 122 |           make -j4 regen-all | 
| @@ -195,14 +230,15 @@ jobs: | 
| 195 | 230 | 
 | 
| 196 | 231 |   build_ubuntu_ssltests: | 
| 197 | 232 |     name: 'Ubuntu SSL tests with OpenSSL' | 
| 198 |  | -    runs-on: ubuntu-22.04 | 
|  | 233 | +    runs-on: ${{ matrix.os }} | 
| 199 | 234 |     timeout-minutes: 60 | 
| 200 | 235 |     needs: check_source | 
| 201 | 236 |     if: needs.check_source.outputs.run_tests == 'true' | 
| 202 | 237 |     strategy: | 
| 203 | 238 |       fail-fast: false | 
| 204 | 239 |       matrix: | 
| 205 |  | -        openssl_ver: [1.1.1w, 3.0.13, 3.1.5, 3.2.1] | 
|  | 240 | +        os: [ubuntu-22.04] | 
|  | 241 | +        openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2] | 
| 206 | 242 |     env: | 
| 207 | 243 |       OPENSSL_VER: ${{ matrix.openssl_ver }} | 
| 208 | 244 |       MULTISSL_DIR: ${{ github.workspace }}/multissl | 
| @@ -231,7 +267,7 @@ jobs: | 
| 231 | 267 |       uses: actions/cache@v4 | 
| 232 | 268 |       with: | 
| 233 | 269 |         path: ./multissl/openssl/${{ env.OPENSSL_VER }} | 
| 234 |  | -        key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }} | 
|  | 270 | +        key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }} | 
| 235 | 271 |     - name: Install OpenSSL | 
| 236 | 272 |       if: steps.cache-openssl.outputs.cache-hit != 'true' | 
| 237 | 273 |       run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux | 
| @@ -266,7 +302,7 @@ jobs: | 
| 266 | 302 |     needs: check_source | 
| 267 | 303 |     if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true' | 
| 268 | 304 |     env: | 
| 269 |  | -      OPENSSL_VER: 3.0.13 | 
|  | 305 | +      OPENSSL_VER: 3.0.15 | 
| 270 | 306 |       PYTHONSTRICTEXTENSIONBUILD: 1 | 
| 271 | 307 |     steps: | 
| 272 | 308 |     - uses: actions/checkout@v4 | 
| @@ -380,7 +416,7 @@ jobs: | 
| 380 | 416 |     needs: check_source | 
| 381 | 417 |     if: needs.check_source.outputs.run_tests == 'true' | 
| 382 | 418 |     env: | 
| 383 |  | -      OPENSSL_VER: 3.0.13 | 
|  | 419 | +      OPENSSL_VER: 3.0.15 | 
| 384 | 420 |       PYTHONSTRICTEXTENSIONBUILD: 1 | 
| 385 | 421 |       ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0 | 
| 386 | 422 |     steps: | 
| @@ -410,7 +446,7 @@ jobs: | 
| 410 | 446 |       uses: actions/cache@v4 | 
| 411 | 447 |       with: | 
| 412 | 448 |         path: ./multissl/openssl/${{ env.OPENSSL_VER }} | 
| 413 |  | -        key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }} | 
|  | 449 | +        key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }} | 
| 414 | 450 |     - name: Install OpenSSL | 
| 415 | 451 |       if: steps.cache-openssl.outputs.cache-hit != 'true' | 
| 416 | 452 |       run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux | 
| @@ -500,6 +536,7 @@ jobs: | 
| 500 | 536 |     needs: | 
| 501 | 537 |     - check_source  # Transitive dependency, needed to access `run_tests` value | 
| 502 | 538 |     - check-docs | 
|  | 539 | +    - check_autoconf_regen | 
| 503 | 540 |     - check_generated_files | 
| 504 | 541 |     - build_macos | 
| 505 | 542 |     - build_ubuntu | 
| @@ -535,6 +572,7 @@ jobs: | 
| 535 | 572 |           ${{ | 
| 536 | 573 |             needs.check_source.outputs.run_tests != 'true' | 
| 537 | 574 |             && ' | 
|  | 575 | +            check_autoconf_regen, | 
| 538 | 576 |             check_generated_files, | 
| 539 | 577 |             build_macos, | 
| 540 | 578 |             build_ubuntu, | 
|  | 
0 commit comments