Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/swift-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,13 @@ jobs:
python-version: ${{ inputs.python_version }}
architecture: x64 # FIXME(#1004): Remove workaround installing x64 Python on ARM64 CI hosts

- name: Get lit version
id: get-llvm-version
run: |
$litOutput = python ${{ github.workspace }}/SourceCache/llvm-project/llvm/utils/lit/lit.py --version
$litVersion = ($litOutput | Select-String -Pattern 'lit (\d+)' | ForEach-Object { $_.Matches[0].Groups[1].Value })
echo "llvm-version=$litVersion" >> $env:GITHUB_OUTPUT
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't entirely guaranteed to be correct. lit is available as a separate pip project as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure i understand what you mean?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly that I'm not sure if we should be using lit as the source of the version information.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@compnerd should we have this as an input to the build? or is there a better way to get the version?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value can be set by the user (-DLLVM_VERSION IIRC). So we really need to query this from CMake.


- name: Configure LLVM
if: matrix.os != 'Android' || inputs.build_android
uses: ./SourceCache/ci-build/.github/actions/configure-cmake-project
Expand Down Expand Up @@ -1373,7 +1380,7 @@ jobs:
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/lib/clang/21
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/lib/clang/${{ steps.get-llvm-version.outputs.llvm-version }}
built-compilers: '@("ASM", "C", "CXX")'
cmake-defines: |
@{
Expand Down Expand Up @@ -1402,7 +1409,7 @@ jobs:
android-api-level: ${{ inputs.ANDROID_API_LEVEL }}
android-clang-version: ${{ inputs.ANDROID_CLANG_VERSION }}
ndk-path: ${{ steps.setup-ndk.outputs.ndk-path }}
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/lib/clang/21
install-dir: ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/lib/clang/${{ steps.get-llvm-version.outputs.llvm-version }}
built-compilers: '@("ASM", "C", "CXX")'
cmake-defines: |
@{
Expand Down