@@ -707,28 +707,26 @@ jobs:
707
707
${{ steps.export-binary-paths.outputs.swift_compatibility_symbols }}
708
708
709
709
early_swift_driver :
710
- # TODO: Build this on Windows too.
711
- if : inputs.build_os == 'Darwin'
712
- needs : [sqlite]
713
710
runs-on : ${{ inputs.default_build_runner }}
714
711
715
712
strategy :
716
713
fail-fast : false
717
- matrix : ${{ fromJSON(inputs.host_matrix ) }}
714
+ matrix : ${{ fromJSON(inputs.build_matrix ) }}
718
715
719
- name : ${{ matrix.os }} ${{ matrix.arch }} Early Swift Driver
716
+ name : ${{ matrix.os }} ${{ matrix.arch }} early swift-driver
720
717
721
718
steps :
722
- - uses : actions/download-artifact@v4
723
- with :
724
- name : sqlite-${{ matrix.os }}-${{ matrix.arch }}-${{ inputs.swift_toolchain_sqlite_version }}
725
- path : ${{ github.workspace }}/BuildRoot/Library/sqlite-${{ inputs.swift_toolchain_sqlite_version }}/usr
726
-
727
719
- uses : actions/checkout@v4
728
720
with :
729
721
repository : swiftlang/swift-llbuild
730
722
ref : ${{ inputs.swift_llbuild_revision }}
731
- path : ${{ github.workspace }}/SourceCache/swift-llbuild
723
+ path : ${{ github.workspace }}/SourceCache/llbuild
724
+ show-progress : false
725
+ - uses : actions/checkout@v4
726
+ with :
727
+ repository : swiftlang/swift-toolchain-sqlite
728
+ ref : ${{ inputs.swift_toolchain_sqlite_revision }}
729
+ path : ${{ github.workspace }}/SourceCache/swift-toolchain-sqlite
732
730
show-progress : false
733
731
- uses : actions/checkout@v4
734
732
with :
@@ -755,78 +753,39 @@ jobs:
755
753
path : ${{ github.workspace }}/SourceCache/swift-driver
756
754
show-progress : false
757
755
758
- - uses : compnerd/gha-setup-vsdevenv@f1ba60d553a3216ce1b89abe0201213536bc7557 # main
759
- with :
760
- host_arch : ${{ inputs.build_arch }}
761
- components : ' Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
762
- arch : ${{ matrix.arch }}
763
-
764
- - uses : seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 # master
765
- if : inputs.build_os == 'Darwin'
766
-
767
- - name : Install Swift Toolchain (Mac)
768
- if : inputs.build_os == 'Darwin'
756
+ - name : Install Swift Toolchain
769
757
uses : compnerd/gha-setup-swift@b6c5fc1ed5b5439ada8e7661985acb09ad8c3ba2 # main
770
758
with :
771
759
branch : ${{ env.WORKAROUND_MACOS_PINNED_BOOTSTRAP_TOOLCHAIN_BRANCH }}
772
760
tag : ${{ env.WORKAROUND_MACOS_PINNED_BOOTSTRAP_TOOLCHAIN_TAG }}
773
761
774
762
- name : Build early swift-driver
775
763
run : |
776
- swift build `
777
- --configuration release `
778
- --arch ${{ matrix.arch }} `
779
- --package-path ${{ github.workspace }}/SourceCache/swift-driver `
780
- --build-path ${{ github.workspace }}/BinaryCache/swift-driver `
781
-
782
- - name : Create installable package
783
- run : |
784
- if ("${{ matrix.os }}" -eq "Darwin") {
785
- $PlatformName = "macosx"
786
- $ExeSuffix = ""
787
- $Cpu = "${{ matrix.arch }}"
788
- $SourceBinDir = Join-Path "${{ github.workspace }}" "BinaryCache" "swift-driver" "${Cpu}-apple-macosx" "release"
789
- } else {
790
- $PlatformName = "windows"
791
- $ExeSuffix = ".exe"
792
- if ("${{ matrix.arch }}" -eq "ARM64") {
793
- $Cpu = "aarch64"
794
- } else {
795
- $Cpu = "x86_64"
796
- }
797
- $SourceBinDir = Join-Path "${{ github.workspace }}" "BinaryCache" "swift-driver" "${Cpu}-unknown-windows-msvc" "release"
798
- }
799
-
800
- # The Swift compiler expects a specific folder name for the early swift-driver build.
801
- # TODO: Make this configurable upstream so we don't have to hardcode it here.
802
- $InstallFolderName = "earlyswiftdriver-${PlatformName}-${Cpu}"
803
- $InstallBinDir = Join-Path "${{ github.workspace }}" "BinaryCache" $InstallFolderName "release" "bin"
804
-
805
- # Create the target folder.
806
- New-Item -ItemType Directory -Path $InstallBinDir -Force
764
+ $env:SWIFTCI_USE_LOCAL_DEPS=1
807
765
808
- # Copy binaries.
809
- $SwiftBinaries = @("swift-driver", "swift-help")
810
- foreach ($bin in $SwiftBinaries) {
811
- $binName = "${bin}${ExeSuffix}"
812
- $binPath = Join-Path $InstallBinDir $binName
813
- Copy-Item -Path "${SourceBinDir}/${binName}" -Destination $binPath -Force
814
- }
766
+ swift build `
767
+ --configuration release `
768
+ --package-path ${{ github.workspace }}/SourceCache/swift-driver `
769
+ --build-path ${{ github.workspace }}/BinaryCache/swift-driver `
770
+ -Xlinker "${env:SDKROOT}/usr/lib/swift/windows/x86_64/swiftCore.lib"
815
771
816
- # Create an archive to preserve permissions.
817
- tar -czf "${{ github.workspace }}/BinaryCache/early-swift-driver.tar.gz" `
818
- -C "${{ github.workspace }}/BinaryCache" `
819
- $InstallFolderName
772
+ - id : export-binary-paths
773
+ run : |
774
+ $Suffix = if ("${{ matrix.os }}" -eq "Windows") { ".exe" } else { "" }
775
+ echo "swift_driver=${{ github.workspace }}/BinaryCache/swift-driver/x86_64-unknown-windows-msvc/release/swift-driver${Suffix}" >> $env:GITHUB_OUTPUT
776
+ echo "swift_help=${{ github.workspace }}/BinaryCache/swift-driver/x86_64-unknown-windows-msvc/release/swift-help${Suffix}" >> $env:GITHUB_OUTPUT
820
777
821
778
- uses : actions/upload-artifact@v4
822
779
with :
823
780
name : early-swift-driver-${{ matrix.os }}-${{ matrix.arch }}
824
- path : ${{ github.workspace }}/BinaryCache/early-swift-driver.tar.gz
781
+ path : |
782
+ ${{ steps.export-binary-paths.outputs.swift_driver }}
783
+ ${{ steps.export-binary-paths.outputs.swift_help }}
825
784
826
785
compilers :
827
786
# TODO: Build this on macOS or make an equivalent Mac-only job
828
787
if : inputs.build_os == 'Windows'
829
- needs : [build_tools, cmark_gfm]
788
+ needs : [build_tools, cmark_gfm, early_swift_driver ]
830
789
runs-on : ${{ inputs.compilers_build_runner }}
831
790
832
791
env :
@@ -856,6 +815,10 @@ jobs:
856
815
with :
857
816
name : cmark-gfm-Windows-${{ matrix.arch }}-${{ inputs.swift_cmark_version }}
858
817
path : ${{ github.workspace }}/BinaryCache/Library/cmark-gfm-${{ inputs.swift_cmark_version }}/usr
818
+ - uses : actions/download-artifact@v4
819
+ with :
820
+ name : early-swift-driver-Windows-amd64
821
+ path : ${{ github.workspace }}/BinaryCache/swift-driver/release
859
822
860
823
- uses : actions/checkout@v4
861
824
with :
0 commit comments