Skip to content

Commit

Permalink
CI: self-hosted runner disable setup-python cache
Browse files Browse the repository at this point in the history
  • Loading branch information
northsea4 committed Feb 22, 2024
1 parent 6cc0b97 commit b0f917a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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数组
Expand All @@ -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' }}
Expand Down

0 comments on commit b0f917a

Please sign in to comment.