summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorItamar Ostricher <itamarost@gmail.com>2023-05-27 18:40:43 (GMT)
committerGitHub <noreply@github.com>2023-05-27 18:40:43 (GMT)
commitd1a7d66fcb147bfb792264abd37720828b9ec437 (patch)
tree40d268ce4fe4433787afe2d06e6d68547095708e /.github
parentb9e2d8076981b471952355b86f90064ce3941032 (diff)
downloadcpython-d1a7d66fcb147bfb792264abd37720828b9ec437.zip
cpython-d1a7d66fcb147bfb792264abd37720828b9ec437.tar.gz
cpython-d1a7d66fcb147bfb792264abd37720828b9ec437.tar.bz2
[3.11] CI: Precompute hash for config cache key in check_source job (GH-105008) (#105024)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml15
1 files changed, 10 insertions, 5 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 9c0ad23..20df092 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -37,6 +37,7 @@ jobs:
outputs:
run_tests: ${{ steps.check.outputs.run_tests }}
run_ssl_tests: ${{ steps.check.outputs.run_ssl_tests }}
+ config_hash: ${{ steps.config_hash.outputs.hash }}
steps:
- uses: actions/checkout@v3
- name: Check for source changes
@@ -63,6 +64,10 @@ jobs:
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo "run_tests=true" >> $GITHUB_OUTPUT || true
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qE '(ssl|hashlib|hmac|^.github)' && echo "run_ssl_tests=true" >> $GITHUB_OUTPUT || true
fi
+ - name: Compute hash for config cache key
+ id: config_hash
+ run: |
+ echo "hash=${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}" >> $GITHUB_OUTPUT
check_abi:
name: 'Check if the ABI has changed'
@@ -106,7 +111,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
@@ -205,7 +210,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 openssl@1.1 xz gdbm tcl-tk
- name: Configure CPython
@@ -271,7 +276,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: |
@@ -313,7 +318,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
@@ -362,7 +367,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