setup-swift icon indicating copy to clipboard operation
setup-swift copied to clipboard

XCTest not found

Open ffried opened this issue 3 years ago • 2 comments

Describe the bug Running swift test in a SPM package using the swift environment set up using this action fails with:

dyld: Library not loaded: @rpath/XCTest.framework/Versions/A/XCTest
      Referenced from: /Users/runner/hostedtoolcache/swift-macOS/5.6/x64/usr/libexec/swift/pm/swiftpm-xctest-helper
      Reason: image not found

I'm not sure if this is an issue with this action (or rather the Swift environment it sets up) or if Apple's toolchains are broken this way.

Workflow configuration (please complete the following information):

  • Platform (runs-on): macos-11
  • Swift version (swift-version): 5.6, which resolves to 5.6.1 now, but it also fails on 5.6.0 and 5.5 (which resolves to 5.5.3).

ffried avatar May 05 '22 06:05 ffried

Hi @ffried, thanks for your report.

Looking into it but as this is Xcode related, perhaps a faster solution would be to use another action that's tailored towards Xcode, for example mxcl-xcodebuild

fwal avatar May 09 '22 07:05 fwal

@fwal I'm not sure this is Xcode related. The same swift test runs fine on Linux when using this action to setup Swift. Using setup-xcode to select an Xcode version works fine. However, on macOS-11 I'll only get Xcode 13.2 - which includes Swift 5.5. With this action I can install Swift 5.6, but am not able to use it because of this error.

ffried avatar May 09 '22 12:05 ffried