From b0f917aac5674aaacd5aa2e8c9dd5e224a9e8c4f Mon Sep 17 00:00:00 2001 From: northsea4 Date: Wed, 21 Feb 2024 23:04:07 +0800 Subject: [PATCH] CI: self-hosted runner disable setup-python cache --- .github/workflows/release.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aebdb0f..d2ced90 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,7 @@ jobs: SELF_HOSTED_MACOS_ARM64_RUNNER=${{ secrets.SELF_HOSTED_MACOS_ARM64_RUNNER }}} if [ -n "$SELF_HOSTED_MACOS_ARM64_RUNNER" ]; then # setup-python没有aarch64的python3.9,这里指定python3.10 - items+=('{"build":"macos", "os": ["self-hosted", "macOS", "ARM64"], "arch": "aarch64", "python": "3.10"}') + items+=('{"build":"macos", "os": ["self-hosted", "macOS", "ARM64"], "arch": "aarch64", "python": "3.10", "python_cache": "none"}') fi # 合并items到json数组 @@ -63,11 +63,18 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Set up Python + - name: Set up Python - cache pip + if : ${{ matrix.python_cache != 'none' }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python || env.PYTHON_VERSION }} + cache: ${{ matrix.python_cache || 'pip' }} + + - name: Set up Python - no cache + if : ${{ matrix.python_cache == 'none' }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python || env.PYTHON_VERSION }} - cache: pip - name: Install libraries - macOS if: ${{ matrix.build == 'macos' }}