@@ -3812,6 +3812,24 @@ jobs:
3812
3812
with :
3813
3813
setup-vs-dev-env : true
3814
3814
host-arch : ${{ matrix.arch }}
3815
+ - name : Compute workspace hash
3816
+ id : workspace_hash
3817
+ run : |
3818
+ $stringAsStream = [System.IO.MemoryStream]::new()
3819
+ $writer = [System.IO.StreamWriter]::new($stringAsStream)
3820
+ $writer.write("${{ github.workspace }}")
3821
+ $writer.Flush()
3822
+ $stringAsStream.Position = 0
3823
+ $hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
3824
+ echo "hash=$hash" >> $env:GITHUB_OUTPUT
3825
+ - name : Setup sccache
3826
+ uses : ./SourceCache/ci-build/.github/actions/setup-sccache
3827
+ with :
3828
+ s3-bucket : ${{ vars.SCCACHE_S3_BUCKET }}
3829
+ aws-region : ${{ vars.SCCACHE_AWS_REGION }}
3830
+ aws-arn : ${{ vars.SCCACHE_AWS_ARN }}
3831
+ disk-max-size : 100M
3832
+ disk-cache-key : ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-debugging-tools
3815
3833
3816
3834
- name : Download swift-argument-parser
3817
3835
uses : actions/download-artifact@v4
@@ -3877,22 +3895,29 @@ jobs:
3877
3895
path : ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform
3878
3896
3879
3897
- name : Configure swift-inspect
3880
- run : |
3881
- $SWIFTC = cygpath -m ${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr/bin/swiftc.exe
3898
+ uses : ./SourceCache/ci-build/.github/actions/configure-cmake-project
3899
+ with :
3900
+ project-name : swift-inspect
3901
+ swift-version : ${{ inputs.swift_version }}
3902
+ enable-caching : true
3903
+ debug-info : ${{ inputs.debug_info }}
3904
+ build-os : ${{ inputs.build_os }}
3905
+ build-arch : ${{ inputs.build_arch }}
3906
+ os : ${{ matrix.os }}
3907
+ arch : ${{ matrix.arch }}
3908
+ src-dir : ${{ github.workspace }}/SourceCache/swift/tools/swift-inspect
3909
+ bin-dir : ${{ github.workspace }}/BinaryCache/${{ matrix.arch }}/swift-inspect
3910
+ install-dir : ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr
3911
+ swift-sdk-path : ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk
3912
+ built-compilers : ' @("Swift")'
3913
+ cmake-defines : |
3914
+ @{
3915
+ 'CMAKE_Swift_FLAGS' = @(
3916
+ "-Xcc",
3917
+ "-I${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/${{ matrix.os }}.platform/Developer/SDKs/${{ matrix.os }}.sdk/usr/include/swift/SwiftRemoteMirror");
3918
+ 'ArgumentParser_DIR' = "${{ github.workspace }}/BinaryCache/swift-argument-parser/cmake/modules";
3919
+ }
3882
3920
3883
- cmake -B ${{ github.workspace }}/BinaryCache/${{ matrix.arch }}/swift-inspect `
3884
- -D CMAKE_BUILD_TYPE=Release `
3885
- -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/${{ inputs.swift_version }}+Asserts/usr `
3886
- -D CMAKE_Swift_COMPILER=${SWIFTC} `
3887
- -D CMAKE_Swift_COMPILER_TARGET=${{ matrix.triple }} `
3888
- -D CMAKE_Swift_COMPILER_WORKS=YES `
3889
- -D CMAKE_Swift_FLAGS="-sdk ${env:SDKROOT} ${{ inputs.CMAKE_Swift_FLAGS }} -Xcc `"-I${env:SDKROOT}/usr/include/swift/SwiftRemoteMirror`"" `
3890
- -D CMAKE_Swift_FLAGS_RELEASE="-O" `
3891
- -D CMAKE_SYSTEM_NAME=Windows `
3892
- -D CMAKE_SYSTEM_PROCESSOR=${{ matrix.cpu }} `
3893
- -G Ninja `
3894
- -S ${{ github.workspace }}/SourceCache/swift/tools/swift-inspect `
3895
- -D ArgumentParser_DIR=${{ github.workspace }}/BinaryCache/swift-argument-parser/cmake/modules
3896
3921
- name : Build swift-inspect
3897
3922
run : cmake --build ${{ github.workspace }}/BinaryCache/${{ matrix.arch }}/swift-inspect
3898
3923
0 commit comments