@@ -28,7 +28,7 @@ permissions:
2828 contents : read
2929
3030concurrency :
31- group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
31+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-reusable
3232 cancel-in-progress : true
3333
3434jobs :
3737 runs-on : ubuntu-latest
3838 timeout-minutes : 10
3939 outputs :
40+ run-docs : ${{ steps.docs-changes.outputs.run-docs || false }}
4041 run_tests : ${{ steps.check.outputs.run_tests }}
4142 run_hypothesis : ${{ steps.check.outputs.run_hypothesis }}
43+ config_hash : ${{ steps.config_hash.outputs.hash }}
4244 steps :
4345 - uses : actions/checkout@v3
4446 - name : Check for source changes
7476 echo "Run hypothesis tests"
7577 echo "run_hypothesis=true" >> $GITHUB_OUTPUT
7678 fi
79+ - name : Compute hash for config cache key
80+ id : config_hash
81+ run : |
82+ echo "hash=${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}" >> $GITHUB_OUTPUT
83+ - name : Get a list of the changed documentation-related files
84+ if : github.event_name == 'pull_request'
85+ id : changed-docs-files
86+ 87+ with :
88+ filter : |
89+ Doc/**
90+ # Temporarily skip paths with spaces
91+ # (i.e. "C API", "Core and Builtins")
92+ # to avoid "Error: One of your files includes a space".
93+ # Pending https://github.com/python/core-workflow/issues/186
94+ # Misc/**
95+ Misc/NEWS.d/next/Build/**
96+ Misc/NEWS.d/next/Documentation/**
97+ Misc/NEWS.d/next/IDLE/**
98+ Misc/NEWS.d/next/Library/**
99+ Misc/NEWS.d/next/Security/**
100+ Misc/NEWS.d/next/Tests/**
101+ Misc/NEWS.d/next/Tools-Demos/**
102+ Misc/NEWS.d/next/Windows/**
103+ Misc/NEWS.d/next/macOS/**
104+ .github/workflows/reusable-docs.yml
105+ - name : Check for docs changes
106+ if : >-
107+ github.event_name == 'pull_request'
108+ && steps.changed-docs-files.outputs.added_modified_renamed != ''
109+ id : docs-changes
110+ run : |
111+ echo "run-docs=true" >> "${GITHUB_OUTPUT}"
112+
113+ check-docs :
114+ name : Docs
115+ needs : check_source
116+ if : fromJSON(needs.check_source.outputs.run-docs)
117+ uses : ./.github/workflows/reusable-docs.yml
77118
78119 check_generated_files :
79120 name : ' Check if generated files are up to date'
@@ -87,18 +128,18 @@ jobs:
87128 uses : actions/cache@v3
88129 with :
89130 path : config.cache
90- key : ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}
131+ key : ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
91132 - uses : actions/setup-python@v3
92133 - name : Install Dependencies
93134 run : sudo ./.github/workflows/posix-deps-apt.sh
94135 - name : Add ccache to PATH
95136 run : echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
96137 - name : Configure ccache action
97138 uses :
hendrikmuhs/[email protected] 98- - name : Check Autoconf version 2.69 and aclocal 1.16.3
139+ - name : Check Autoconf and aclocal versions
99140 run : |
100- grep "Generated by GNU Autoconf 2.69 " configure
101- grep "aclocal 1.16.3 " aclocal.m4
141+ grep "Generated by GNU Autoconf 2.71 " configure
142+ grep "aclocal 1.16.4 " aclocal.m4
102143 grep -q "runstatedir" configure
103144 grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
104145 - name : Configure CPython
@@ -189,14 +230,13 @@ jobs:
189230 uses : actions/cache@v3
190231 with :
191232 path : config.cache
192- key : ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}
233+ key : ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
193234 - name : Install Homebrew dependencies
194235 run :
brew install pkg-config [email protected] xz gdbm tcl-tk 195236 - name : Configure CPython
196237 run : |
197- CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \
198- LDFLAGS="-L$(brew --prefix gdbm)/lib -I$(brew --prefix xz)/lib" \
199- PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \
238+ GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \
239+ GDBM_LIBS="-L$(brew --prefix gdbm)/lib -lgdbm" \
200240 ./configure \
201241 --config-cache \
202242 --with-pydebug \
@@ -216,7 +256,7 @@ jobs:
216256 needs : check_source
217257 if : needs.check_source.outputs.run_tests == 'true'
218258 env :
219- OPENSSL_VER : 1.1.1t
259+ OPENSSL_VER : 1.1.1u
220260 PYTHONSTRICTEXTENSIONBUILD : 1
221261 steps :
222262 - uses : actions/checkout@v3
@@ -255,7 +295,7 @@ jobs:
255295 uses : actions/cache@v3
256296 with :
257297 path : ${{ env.CPYTHON_BUILDDIR }}/config.cache
258- key : ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}
298+ key : ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
259299 - name : Configure CPython out-of-tree
260300 working-directory : ${{ env.CPYTHON_BUILDDIR }}
261301 run : |
@@ -285,7 +325,7 @@ jobs:
285325 strategy :
286326 fail-fast : false
287327 matrix :
288- openssl_ver : [1.1.1t , 3.0.8 , 3.1.0-beta1 ]
328+ openssl_ver : [1.1.1u , 3.0.9 , 3.1.1 ]
289329 env :
290330 OPENSSL_VER : ${{ matrix.openssl_ver }}
291331 MULTISSL_DIR : ${{ github.workspace }}/multissl
@@ -297,7 +337,7 @@ jobs:
297337 uses : actions/cache@v3
298338 with :
299339 path : config.cache
300- key : ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}
340+ key : ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
301341 - name : Register gcc problem matcher
302342 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
303343 - name : Install Dependencies
@@ -337,7 +377,7 @@ jobs:
337377 needs : check_source
338378 if : needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
339379 env :
340- OPENSSL_VER : 1.1.1t
380+ OPENSSL_VER : 1.1.1u
341381 PYTHONSTRICTEXTENSIONBUILD : 1
342382 steps :
343383 - uses : actions/checkout@v3
@@ -376,7 +416,7 @@ jobs:
376416 uses : actions/cache@v3
377417 with :
378418 path : ${{ env.CPYTHON_BUILDDIR }}/config.cache
379- key : ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}
419+ key : ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
380420 - name : Configure CPython out-of-tree
381421 working-directory : ${{ env.CPYTHON_BUILDDIR }}
382422 run : |
@@ -446,7 +486,7 @@ jobs:
446486 needs : check_source
447487 if : needs.check_source.outputs.run_tests == 'true'
448488 env :
449- OPENSSL_VER : 1.1.1t
489+ OPENSSL_VER : 1.1.1u
450490 PYTHONSTRICTEXTENSIONBUILD : 1
451491 ASAN_OPTIONS : detect_leaks=0:allocator_may_return_null=1:handle_segv=0
452492 steps :
@@ -455,7 +495,7 @@ jobs:
455495 uses : actions/cache@v3
456496 with :
457497 path : config.cache
458- key : ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}
498+ key : ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
459499 - name : Register gcc problem matcher
460500 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
461501 - name : Install Dependencies
0 commit comments