actions: reduce cache sizes by only caching necessary path for OS

This commit is contained in:
Jay Lee
2024-02-09 06:23:20 -05:00
committed by GitHub
parent 2bb2684165
commit 933fc19379

View File

@@ -112,15 +112,14 @@ jobs:
id: cache-python-ssl id: cache-python-ssl
with: with:
path: | path: |
bin.tar.xz cache.tar.xz
src/cpython key: gam-${{ matrix.jid }}-20240209
key: gam-${{ matrix.jid }}-20240208b
- name: Untar Cache archive - name: Untar Cache archive
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true' if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: | run: |
tar xvvf bin.tar.xz tar xvvf cache.tar.xz
- name: Use pre-compiled Python for testing - name: Use pre-compiled Python for testing
if: matrix.python != '' if: matrix.python != ''
@@ -840,7 +839,12 @@ jobs:
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit != 'true' if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: | run: |
tar cJvvf bin.tar.xz bin/ if [[ "${RUNNER_OS}" == "Windows" ]]; then
tar_folder="src/cpython/"
else
tar_folder="bin/"
fi
tar cJvvf cache.tar.xz "$tar_folder"
publish: publish:
if: github.event_name == 'push' if: github.event_name == 'push'