forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into pythongh-89812-add-lexicalpath
- Loading branch information
Showing
148 changed files
with
2,719 additions
and
4,209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ permissions: | |
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-reusable | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
@@ -37,8 +37,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
outputs: | ||
run-docs: ${{ steps.docs-changes.outputs.run-docs || false }} | ||
run_tests: ${{ steps.check.outputs.run_tests }} | ||
run_hypothesis: ${{ steps.check.outputs.run_hypothesis }} | ||
config_hash: ${{ steps.config_hash.outputs.hash }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Check for source changes | ||
|
@@ -74,6 +76,32 @@ jobs: | |
echo "Run hypothesis tests" | ||
echo "run_hypothesis=true" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Compute hash for config cache key | ||
id: config_hash | ||
run: | | ||
echo "hash=${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}" >> $GITHUB_OUTPUT | ||
- name: Get a list of the changed documentation-related files | ||
if: github.event_name == 'pull_request' | ||
id: changed-docs-files | ||
uses: Ana06/[email protected] | ||
with: | ||
filter: | | ||
Doc/** | ||
Misc/** | ||
.github/workflows/reusable-docs.yml | ||
- name: Check for docs changes | ||
if: >- | ||
github.event_name == 'pull_request' | ||
&& steps.changed-docs-files.outputs.added_modified_renamed != '' | ||
id: docs-changes | ||
run: | | ||
echo "run-docs=true" >> "${GITHUB_OUTPUT}" | ||
check-docs: | ||
name: Docs | ||
needs: check_source | ||
if: fromJSON(needs.check_source.outputs.run-docs) | ||
uses: ./.github/workflows/reusable-docs.yml | ||
|
||
check_generated_files: | ||
name: 'Check if generated files are up to date' | ||
|
@@ -87,7 +115,7 @@ jobs: | |
uses: actions/cache@v3 | ||
with: | ||
path: config.cache | ||
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} | ||
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} | ||
- uses: actions/setup-python@v3 | ||
- name: Install Dependencies | ||
run: sudo ./.github/workflows/posix-deps-apt.sh | ||
|
@@ -189,7 +217,7 @@ jobs: | |
uses: actions/cache@v3 | ||
with: | ||
path: config.cache | ||
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} | ||
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} | ||
- name: Install Homebrew dependencies | ||
run: brew install pkg-config [email protected] xz gdbm tcl-tk | ||
- name: Configure CPython | ||
|
@@ -255,7 +283,7 @@ jobs: | |
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache | ||
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} | ||
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} | ||
- name: Configure CPython out-of-tree | ||
working-directory: ${{ env.CPYTHON_BUILDDIR }} | ||
run: | | ||
|
@@ -297,7 +325,7 @@ jobs: | |
uses: actions/cache@v3 | ||
with: | ||
path: config.cache | ||
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} | ||
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} | ||
- name: Register gcc problem matcher | ||
run: echo "::add-matcher::.github/problem-matchers/gcc.json" | ||
- name: Install Dependencies | ||
|
@@ -376,7 +404,7 @@ jobs: | |
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache | ||
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} | ||
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} | ||
- name: Configure CPython out-of-tree | ||
working-directory: ${{ env.CPYTHON_BUILDDIR }} | ||
run: | | ||
|
@@ -455,7 +483,7 @@ jobs: | |
uses: actions/cache@v3 | ||
with: | ||
path: config.cache | ||
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }} | ||
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }} | ||
- name: Register gcc problem matcher | ||
run: echo "::add-matcher::.github/problem-matchers/gcc.json" | ||
- name: Install Dependencies | ||
|
25 changes: 1 addition & 24 deletions
25
.github/workflows/doc.yml → .github/workflows/reusable-docs.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.