Skip to content

Commit e53a599

Browse files
committed
Add explicit step to setup python
1 parent a3cf65c commit e53a599

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

.github/actions/setup-python/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ runs:
1818
steps:
1919
- name: Install the latest version of uv
2020
uses: astral-sh/setup-uv@v5
21+
with:
22+
working-directory: ${{ inputs.repo-root }}
23+
# Explicitly set where the pyproject.toml file is located untill we
24+
# a fix for https://github.com/astral-sh/setup-uv/issues/441
25+
cache-dependency-glob: ${{ inputs.repo-root }}/**/pyproject.toml
26+
2127
# uv misbehaves in the presence of the python 3.9 pythonarm64 Nuget package.
2228
# This is a workaround to remove it if it exists.
2329
- name: Uninstall pythonarm64 if installed

.github/workflows/swift-toolchain.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,10 @@ jobs:
686686
ref: ${{ inputs.swift_revision }}
687687
path: ${{ github.workspace }}/SourceCache/swift
688688
show-progress: false
689-
689+
- name: Setup python
690+
uses: ./SourceCache/ci-build/.github/actions/setup-python
691+
with:
692+
repo-root: ${{ github.workspace }}/SourceCache/ci-build
690693
- name: Configure Tools
691694
run: |
692695
cmake -B ${{ github.workspace }}/BinaryCache/0 `
@@ -1160,7 +1163,11 @@ jobs:
11601163
Copy-Item -Path "${{ github.workspace }}/BinaryCache/Library/cmark-gfm-${{ inputs.swift_cmark_version }}/usr/lib/*.dylib" -Destination "${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/lib/swift/host/compiler"
11611164
}
11621165
1163-
- uses: actions/setup-python@v5
1166+
- name: Setup python
1167+
uses: ./SourceCache/ci-build/.github/actions/setup-python
1168+
with:
1169+
repo-root: ${{ github.workspace }}/SourceCache/ci-build
1170+
11641171
- uses: jannekem/run-python-script-action@v1
11651172
with:
11661173
script: |
@@ -1674,6 +1681,11 @@ jobs:
16741681
ndk-version: ${{ inputs.ANDROID_NDK_VERSION }}
16751682
local-cache: true
16761683

1684+
- name: Setup python
1685+
uses: ./SourceCache/ci-build/.github/actions/setup-python
1686+
with:
1687+
repo-root: ${{ github.workspace }}/SourceCache/ci-build
1688+
16771689
- name: Configure LLVM
16781690
if: matrix.os != 'Android' || inputs.build_android
16791691
run: |
@@ -2551,7 +2563,11 @@ jobs:
25512563
run: |
25522564
cmake --build ${{ github.workspace }}/BinaryCache/libdispatch --target install
25532565
2554-
- uses: actions/setup-python@v5
2566+
- name: Setup python
2567+
uses: ./SourceCache/ci-build/.github/actions/setup-python
2568+
with:
2569+
repo-root: ${{ github.workspace }}/SourceCache/ci-build
2570+
25552571
- uses: jannekem/run-python-script-action@v1
25562572
if: matrix.os != 'Android' || inputs.build_android
25572573
with:

0 commit comments

Comments
 (0)