Skip to content

Commit 43bf6c9

Browse files
committed
Add explicit step to setup python
1 parent b3165d7 commit 43bf6c9

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
@@ -680,7 +680,10 @@ jobs:
680680
ref: ${{ inputs.swift_revision }}
681681
path: ${{ github.workspace }}/SourceCache/swift
682682
show-progress: false
683-
683+
- name: Setup python
684+
uses: ./SourceCache/ci-build/.github/actions/setup-python
685+
with:
686+
repo-root: ${{ github.workspace }}/SourceCache/ci-build
684687
- name: Configure Tools
685688
run: |
686689
$LLVM_EXTERNAL_SWIFT_SOURCE_DIR = cygpath -m ${{ github.workspace }}/SourceCache/swift
@@ -1169,7 +1172,11 @@ jobs:
11691172
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"
11701173
}
11711174
1172-
- uses: actions/setup-python@v5
1175+
- name: Setup python
1176+
uses: ./SourceCache/ci-build/.github/actions/setup-python
1177+
with:
1178+
repo-root: ${{ github.workspace }}/SourceCache/ci-build
1179+
11731180
- uses: jannekem/run-python-script-action@v1
11741181
with:
11751182
script: |
@@ -1682,6 +1689,11 @@ jobs:
16821689
ndk-version: ${{ inputs.ANDROID_NDK_VERSION }}
16831690
local-cache: true
16841691

1692+
- name: Setup python
1693+
uses: ./SourceCache/ci-build/.github/actions/setup-python
1694+
with:
1695+
repo-root: ${{ github.workspace }}/SourceCache/ci-build
1696+
16851697
- name: Configure LLVM
16861698
if: matrix.os != 'Android' || inputs.build_android
16871699
run: |
@@ -3456,7 +3468,11 @@ jobs:
34563468
run: |
34573469
cmake --build ${{ github.workspace }}/BinaryCache/libdispatch --target install
34583470
3459-
- uses: actions/setup-python@v5
3471+
- name: Setup python
3472+
uses: ./SourceCache/ci-build/.github/actions/setup-python
3473+
with:
3474+
repo-root: ${{ github.workspace }}/SourceCache/ci-build
3475+
34603476
- uses: jannekem/run-python-script-action@v1
34613477
if: matrix.os != 'Android' || inputs.build_android
34623478
with:

0 commit comments

Comments
 (0)