- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 33.3k
 
GH-139596: Cease caching config.cache & ccache in GH Actions #139623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            AA-Turner
  wants to merge
  2
  commits into
  python:main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
AA-Turner:del-config.cache-cache
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            2 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      
    File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or 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 | 
|---|---|---|
| 
          
            
          
           | 
    @@ -109,20 +109,10 @@ jobs: | |
| python-version: '3.x' | ||
| - name: Runner image version | ||
| run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV" | ||
| - name: Restore config.cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: config.cache | ||
| # Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python | ||
| key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}-${{ env.pythonLocation }} | ||
| - 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" | ||
| - name: Configure ccache action | ||
| uses: hendrikmuhs/[email protected] | ||
| with: | ||
| save: false | ||
| - name: Configure CPython | ||
| run: | | ||
| # Build Python with the libpython dynamic library | ||
| 
          
            
          
           | 
    @@ -286,11 +276,6 @@ jobs: | |
| persist-credentials: false | ||
| - name: Runner image version | ||
| run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV" | ||
| - name: Restore config.cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: config.cache | ||
| key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }} | ||
| - name: Register gcc problem matcher | ||
| run: echo "::add-matcher::.github/problem-matchers/gcc.json" | ||
| - name: Install dependencies | ||
| 
        
          
        
         | 
    @@ -312,10 +297,6 @@ jobs: | |
| - name: Add ccache to PATH | ||
| run: | | ||
| echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" | ||
| - name: Configure ccache action | ||
| uses: hendrikmuhs/[email protected] | ||
| with: | ||
| save: false | ||
| - name: Configure CPython | ||
| run: ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$OPENSSL_DIR" | ||
| - name: Build CPython | ||
| 
          
            
          
           | 
    @@ -347,11 +328,6 @@ jobs: | |
| persist-credentials: false | ||
| - name: Runner image version | ||
| run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV" | ||
| - name: Restore config.cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: config.cache | ||
| key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }} | ||
| - name: Register gcc problem matcher | ||
| run: echo "::add-matcher::.github/problem-matchers/gcc.json" | ||
| - name: Install dependencies | ||
| 
        
          
        
         | 
    @@ -378,10 +354,6 @@ jobs: | |
| - name: Add ccache to PATH | ||
| run: | | ||
| echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" | ||
| - name: Configure ccache action | ||
| uses: hendrikmuhs/[email protected] | ||
| with: | ||
| save: false | ||
| - name: Configure CPython | ||
| run: | | ||
| ./configure CFLAGS="-fdiagnostics-format=json" \ | ||
| 
          
            
          
           | 
    @@ -465,10 +437,6 @@ jobs: | |
| - name: Add ccache to PATH | ||
| run: | | ||
| echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" | ||
| - name: Configure ccache action | ||
| uses: hendrikmuhs/[email protected] | ||
| with: | ||
| save: false | ||
| - name: Setup directory envs for out-of-tree builds | ||
| run: | | ||
| echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV" | ||
| 
        
          
        
         | 
    @@ -479,11 +447,6 @@ jobs: | |
| run: sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR" | ||
| - name: Runner image version | ||
| run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV" | ||
| - name: Restore config.cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ env.CPYTHON_BUILDDIR }}/config.cache | ||
| key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }} | ||
| - name: Configure CPython out-of-tree | ||
| working-directory: ${{ env.CPYTHON_BUILDDIR }} | ||
| run: | | ||
| 
          
            
          
           | 
    @@ -567,11 +530,6 @@ jobs: | |
| persist-credentials: false | ||
| - name: Runner image version | ||
| run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV" | ||
| - name: Restore config.cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: config.cache | ||
| key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }} | ||
| - name: Register gcc problem matcher | ||
| run: echo "::add-matcher::.github/problem-matchers/gcc.json" | ||
| - name: Install dependencies | ||
| 
        
          
        
         | 
    @@ -597,11 +555,6 @@ jobs: | |
| - name: Add ccache to PATH | ||
| run: | | ||
| echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" | ||
| - name: Configure ccache action | ||
| uses: hendrikmuhs/[email protected] | ||
| with: | ||
| save: ${{ github.event_name == 'push' }} | ||
| max-size: "200M" | ||
| - name: Configure CPython | ||
| run: ./configure --config-cache --with-address-sanitizer --without-pymalloc | ||
| - name: Build CPython | ||
| 
          
            
          
           | 
    @@ -648,11 +601,6 @@ jobs: | |
| persist-credentials: false | ||
| - name: Runner image version | ||
| run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV" | ||
| - name: Restore config.cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: config.cache | ||
| key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }} | ||
| - name: Register gcc problem matcher | ||
| run: echo "::add-matcher::.github/problem-matchers/gcc.json" | ||
| - name: Set build dir | ||
| 
          
            
          
           | 
    ||
  
    
      This file contains hidden or 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 | 
|---|---|---|
| 
          
            
          
           | 
    @@ -36,11 +36,6 @@ jobs: | |
| persist-credentials: false | ||
| - name: Runner image version | ||
| run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV" | ||
| - name: Restore config.cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: config.cache | ||
| key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.config_hash }} | ||
| - name: Install Homebrew dependencies | ||
| run: | | ||
| brew install pkg-config [email protected] xz gdbm tcl-tk@8 make | ||
| 
          
            
          
           | 
    ||
  
    
      This file contains hidden or 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 | 
|---|---|---|
| 
          
            
          
           | 
    @@ -34,11 +34,6 @@ jobs: | |
| persist-credentials: false | ||
| - name: Runner image version | ||
| run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV" | ||
| - name: Restore config.cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: config.cache | ||
| key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.sanitizer }}-${{ inputs.config_hash }} | ||
| - name: Install dependencies | ||
| run: | | ||
| sudo ./.github/workflows/posix-deps-apt.sh | ||
| 
          
            
          
           | 
    @@ -77,11 +72,6 @@ jobs: | |
| - name: Add ccache to PATH | ||
| run: | | ||
| echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" | ||
| - name: Configure ccache action | ||
| uses: hendrikmuhs/[email protected] | ||
| with: | ||
| save: ${{ github.event_name == 'push' }} | ||
| max-size: "200M" | ||
| - name: Configure CPython | ||
| run: >- | ||
| ./configure | ||
| 
          
            
          
           | 
    ||
  
    
      This file contains hidden or 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 | 
|---|---|---|
| 
          
            
          
           | 
    @@ -64,11 +64,6 @@ jobs: | |
| - name: Add ccache to PATH | ||
| run: | | ||
| echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" | ||
| - name: Configure ccache action | ||
| uses: hendrikmuhs/[email protected] | ||
| with: | ||
| save: ${{ github.event_name == 'push' }} | ||
| max-size: "200M" | ||
| - name: Setup directory envs for out-of-tree builds | ||
| run: | | ||
| echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV" | ||
| 
        
          
        
         | 
    @@ -79,11 +74,6 @@ jobs: | |
| run: sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR" | ||
| - name: Runner image version | ||
| run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV" | ||
| - name: Restore config.cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ env.CPYTHON_BUILDDIR }}/config.cache | ||
| key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.config_hash }} | ||
| - name: Configure CPython out-of-tree | ||
| working-directory: ${{ env.CPYTHON_BUILDDIR }} | ||
| # `test_unpickle_module_race` writes to the source directory, which is | ||
| 
          
            
          
           | 
    ||
  
    
      This file contains hidden or 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 | 
|---|---|---|
| 
          
            
          
           | 
    @@ -42,11 +42,6 @@ jobs: | |
| mkdir "${WASI_SDK_PATH}" && \ | ||
| curl -s -S --location "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-x86_64-linux.tar.gz" | \ | ||
| tar --strip-components 1 --directory "${WASI_SDK_PATH}" --extract --gunzip | ||
| - name: "Configure ccache action" | ||
| uses: hendrikmuhs/[email protected] | ||
| with: | ||
| save: ${{ github.event_name == 'push' }} | ||
| max-size: "200M" | ||
| - name: "Add ccache to PATH" | ||
| run: echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" | ||
| - name: "Install Python" | ||
| 
        
          
        
         | 
    @@ -55,24 +50,10 @@ jobs: | |
| python-version: '3.x' | ||
| - name: "Runner image version" | ||
| run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV" | ||
| - name: "Restore Python build config.cache" | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ env.CROSS_BUILD_PYTHON }}/config.cache | ||
| # Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python. | ||
| # Include the hash of `Tools/wasm/wasi.py` as it may change the environment variables. | ||
| # (Make sure to keep the key in sync with the other config.cache step below.) | ||
| key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi.py') }}-${{ env.pythonLocation }} | ||
| - name: "Configure build Python" | ||
| run: python3 Tools/wasm/wasi.py configure-build-python -- --config-cache --with-pydebug | ||
| - name: "Make build Python" | ||
| run: python3 Tools/wasm/wasi.py make-build-python | ||
| - name: "Restore host config.cache" | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ env.CROSS_BUILD_WASI }}/config.cache | ||
| # Should be kept in sync with the other config.cache step above. | ||
| key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi.py') }}-${{ env.pythonLocation }} | ||
| - name: "Configure host" | ||
| # `--with-pydebug` inferred from configure-build-python | ||
| run: python3 Tools/wasm/wasi.py configure-host -- --config-cache | ||
| 
          
            
          
           | 
    ||
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also remove
config-hashfrom reusable-context.yml?