diff --git a/.cirun.yml b/.cirun.yml index 7bb48a39..b7d621a9 100644 --- a/.cirun.yml +++ b/.cirun.yml @@ -19,7 +19,7 @@ runners: - name: win11-23h2-pro-arm64-16 cloud: azure instance_type: Standard_D16plds_v5 - machine_image: "/subscriptions/88c2ce23-b441-4d79-8f1c-50d9bc95ed08/resourceGroups/Win-CI/providers/Microsoft.Compute/galleries/base_images/images/win11-23h2-pro-arm64/versions/2025.06.12" + machine_image: "/subscriptions/88c2ce23-b441-4d79-8f1c-50d9bc95ed08/resourceGroups/Win-CI/providers/Microsoft.Compute/galleries/base_images/images/win11-23h2-pro-arm64/versions/2025.06.27" labels: - cirun-win11-23h2-pro-arm64-16 extra_config: @@ -30,7 +30,7 @@ runners: - name: win11-23h2-pro-arm64-64 cloud: azure instance_type: Standard_D64plds_v5 - machine_image: "/subscriptions/88c2ce23-b441-4d79-8f1c-50d9bc95ed08/resourceGroups/Win-CI/providers/Microsoft.Compute/galleries/base_images/images/win11-23h2-pro-arm64/versions/2025.06.12" + machine_image: "/subscriptions/88c2ce23-b441-4d79-8f1c-50d9bc95ed08/resourceGroups/Win-CI/providers/Microsoft.Compute/galleries/base_images/images/win11-23h2-pro-arm64/versions/2025.06.27" labels: - cirun-win11-23h2-pro-arm64-64 extra_config: @@ -41,7 +41,7 @@ runners: - name: win11-23h2-pro-x64-16 cloud: azure instance_type: Standard_F16s_v2 - machine_image: "/subscriptions/88c2ce23-b441-4d79-8f1c-50d9bc95ed08/resourceGroups/Win-CI/providers/Microsoft.Compute/galleries/base_images/images/win11-23h2-pro-x64/versions/2025.06.12" + machine_image: "/subscriptions/88c2ce23-b441-4d79-8f1c-50d9bc95ed08/resourceGroups/Win-CI/providers/Microsoft.Compute/galleries/base_images/images/win11-23h2-pro-x64/versions/2025.06.27" labels: - cirun-win11-23h2-pro-x64-16 extra_config: @@ -52,7 +52,7 @@ runners: - name: win11-23h2-pro-x64-64 cloud: azure instance_type: Standard_D64ads_v5 - machine_image: "/subscriptions/88c2ce23-b441-4d79-8f1c-50d9bc95ed08/resourceGroups/Win-CI/providers/Microsoft.Compute/galleries/base_images/images/win11-23h2-pro-x64/versions/2025.06.12" + machine_image: "/subscriptions/88c2ce23-b441-4d79-8f1c-50d9bc95ed08/resourceGroups/Win-CI/providers/Microsoft.Compute/galleries/base_images/images/win11-23h2-pro-x64/versions/2025.06.27" labels: - cirun-win11-23h2-pro-x64-64 extra_config: diff --git a/.github/actions/setup-python/action.yml b/.github/actions/setup-python/action.yml deleted file mode 100644 index 840229e8..00000000 --- a/.github/actions/setup-python/action.yml +++ /dev/null @@ -1,96 +0,0 @@ -name: 'Python setup' -description: 'Configures Python for the current workflow job using UV' - -inputs: - dependency-groups: - description: | - 'The names of the dependency group configurations to use within pyproject.toml. - Group names are separated by spaces (or use the | syntax in GHA). - Special handling for dependency-group "all" to install all dependencies.' - required: false - repo-root: - description: 'The root directory of the arc repository checkout.' - required: true - default: ${{ github.workspace }} - -runs: - using: 'composite' - steps: - - name: Install the latest version of uv - uses: astral-sh/setup-uv@v5 - # uv misbehaves in the presence of the python 3.9 pythonarm64 Nuget package. - # This is a workaround to remove it if it exists. - - name: Uninstall pythonarm64 if installed - if: runner.os == 'Windows' && runner.arch == 'ARM64' - shell: pwsh - run: | - if (Get-Package -Name "pythonarm64" -ErrorAction SilentlyContinue) { - Uninstall-Package -Name "pythonarm64" - } - - - name: Download python interpreter, install the venv and dependencies - shell: pwsh - working-directory: ${{ inputs.repo-root }} - run: | - Write-Host "::group::Running uv sync" - - if (-not "${{ inputs.dependency-groups }}") { - uv sync --no-default-groups - } - elseif ("${{ inputs.dependency-groups }}" -eq "all") { - uv sync --all-groups - } - else { - $groups = "${{ inputs.dependency-groups }}" -split ' ' - foreach ($group in $groups) { - if ($group) { - uv sync --no-default-groups --group $group - } - } - } - - Write-Host "::endgroup::" - - - name: Activate venv (posix) - if: runner.os != 'Windows' - shell: bash - working-directory: ${{ inputs.repo-root }} - run: | - # Activate the virtual environment - source .venv/bin/activate - - # Make the virtual environment variable persist to other steps - echo "VIRTUAL_ENV=${VIRTUAL_ENV}" >> $GITHUB_ENV - echo "${VIRTUAL_ENV}/bin" >> $GITHUB_PATH - - - name: Activate venv (Windows) - if: runner.os == 'Windows' - shell: pwsh - working-directory: ${{ inputs.repo-root }} - run: | - # The python3 exe is not created on windows for some reason so we need to create it - Copy-Item .\.venv\Scripts\python.exe .\.venv\Scripts\python3.exe - - # Activate the virtual environment - .\.venv\Scripts\activate - - # Make the virtual environment variable persist to other steps - Write-Host "Virtual Env After: $Env:VIRTUAL_ENV" - "VIRTUAL_ENV=$Env:VIRTUAL_ENV" | Out-File -FilePath $Env:GITHUB_ENV -Append - "$Env:VIRTUAL_ENV\Scripts" | Out-File -FilePath $Env:GITHUB_PATH -Append - - - name: Set Up UV Environment Options - shell: pwsh - run: | - # UV_NO_SYNC is the equivalent of the --no-sync flag in uv - # It is used to prevent `uv run` from syncing all dependencies - "UV_NO_SYNC=1" | Out-File -FilePath $env:GITHUB_ENV -Append - - - name: Check python versions - shell: pwsh - run: | - Write-Host "python -- version: $(python --version) -- location: $(Get-Command python | Select-Object -ExpandProperty Source)" - Write-Host "python3 -- version: $(python3 --version) -- location: $(Get-Command python3 | Select-Object -ExpandProperty Source)" - - - diff --git a/.github/workflows/release-swift-toolchain-binary-sizes.yml b/.github/workflows/release-swift-toolchain-binary-sizes.yml index 67c0ba65..1715638d 100644 --- a/.github/workflows/release-swift-toolchain-binary-sizes.yml +++ b/.github/workflows/release-swift-toolchain-binary-sizes.yml @@ -151,10 +151,12 @@ jobs: $SwiftInstallRoot=$(Resolve-Path -LiteralPath $SwiftPath\..\..\..\..\..) echo "SWIFT_INSTALL_ROOT=${SwiftInstallRoot}" | Out-File -FilePath $env:GITHUB_ENV -Append - - name: Setup python - uses: ./.github/actions/setup-python + - uses: actions/setup-python@v5 with: - dependency-groups: 'bloaty' + python-version: '3.11' + cache: 'pip' + + - run: pip install -r requirements.txt - name: Setup VS Dev Env uses: compnerd/gha-setup-vsdevenv@f1ba60d553a3216ce1b89abe0201213536bc7557 # main diff --git a/.github/workflows/swift-toolchain.yml b/.github/workflows/swift-toolchain.yml index c958ad77..48a066c3 100644 --- a/.github/workflows/swift-toolchain.yml +++ b/.github/workflows/swift-toolchain.yml @@ -687,6 +687,10 @@ jobs: path: ${{ github.workspace }}/SourceCache/swift show-progress: false + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Configure Tools run: | cmake -B ${{ github.workspace }}/BinaryCache/0 ` @@ -1175,6 +1179,9 @@ jobs: } - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - uses: jannekem/run-python-script-action@v1 with: script: | @@ -1688,6 +1695,10 @@ jobs: ndk-version: ${{ inputs.ANDROID_NDK_VERSION }} local-cache: true + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Configure LLVM if: matrix.os != 'Android' || inputs.build_android run: | @@ -2566,6 +2577,9 @@ jobs: cmake --build ${{ github.workspace }}/BinaryCache/libdispatch --target install - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - uses: jannekem/run-python-script-action@v1 if: matrix.os != 'Android' || inputs.build_android with: diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 6bbc9898..00000000 --- a/pyproject.toml +++ /dev/null @@ -1,18 +0,0 @@ -# If you are making changes in this file you will likely want one of these commands to clear venv and rebuild it -# deactivate; uv cache clean; rm -rf .venv; uv sync; source .venv/bin/activate -# uv cache clean; rm -rf .venv; uv sync; source .venv/bin/activate - -[project] -name = "swift-build" -version = "1.0.0" -description = "Python package to support the swift-build repository" -readme = "README.md" -requires-python = ">=3.11,<3.12" -dependencies = [] - - -[dependency-groups] -bloaty = [ - "google-cloud-bigquery>=3.30.0", - "pandas>=2.2.0", -] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..efd224dc --- /dev/null +++ b/requirements.txt @@ -0,0 +1,23 @@ +altgraph @ file:///AppleInternal/Library/BuildRoots/bd680bd8-563b-11ef-bf16-8a553ba56670/Library/Caches/com.apple.xbs/Sources/python3/altgraph-0.17.2-py2.py3-none-any.whl +boto3==1.38.1 +botocore==1.38.1 +certifi==2025.1.31 +cffi==1.17.1 +charset-normalizer==3.4.1 +cryptography==45.0.4 +Deprecated==1.2.18 +future @ file:///AppleInternal/Library/BuildRoots/bd680bd8-563b-11ef-bf16-8a553ba56670/Library/Caches/com.apple.xbs/Sources/python3/future-0.18.2-py3-none-any.whl +idna==3.10 +jmespath==1.0.1 +macholib @ file:///AppleInternal/Library/BuildRoots/bd680bd8-563b-11ef-bf16-8a553ba56670/Library/Caches/com.apple.xbs/Sources/python3/macholib-1.15.2-py2.py3-none-any.whl +pycparser==2.22 +PyGithub==2.6.1 +PyJWT==2.10.1 +PyNaCl==1.5.0 +python-dateutil==2.9.0.post0 +requests==2.32.3 +s3transfer==0.12.0 +six @ file:///AppleInternal/Library/BuildRoots/bd680bd8-563b-11ef-bf16-8a553ba56670/Library/Caches/com.apple.xbs/Sources/python3/six-1.15.0-py2.py3-none-any.whl +typing_extensions==4.14.0 +urllib3==1.26.20 +wrapt==1.17.2