@@ -387,14 +387,16 @@ struct BuildSwiftlyRelease: AsyncParsableCommand {
387387 print ( releaseArchive)
388388
389389 if self . test {
390+ let debugDir = cwd + " /.build/debug "
391+
390392#if arch(arm64)
391- let testArchive = " \( releaseDir ) /test-swiftly-linux-aarch64.tar.gz "
393+ let testArchive = " \( debugDir ) /test-swiftly-linux-aarch64.tar.gz "
392394#else
393- let testArchive = " \( releaseDir ) /test-swiftly-linux-x86_64.tar.gz "
395+ let testArchive = " \( debugDir ) /test-swiftly-linux-x86_64.tar.gz "
394396#endif
395397
396- try runProgram ( swift, " build " , " --swift-sdk " , " \( arch) -swift-linux-musl " , " --product=test-swiftly " , " --pkg-config-path= \( pkgConfigPath) /lib/pkgconfig " , " --static-swift-stdlib " , " --configuration=release " )
397- try runProgram ( tar, " --directory= \( releaseDir ) " , " -czf " , testArchive, " test-swiftly " )
398+ try runProgram ( swift, " build " , " --swift-sdk " , " \( arch) -swift-linux-musl " , " --product=test-swiftly " , " --pkg-config-path= \( pkgConfigPath) /lib/pkgconfig " , " --static-swift-stdlib " , " --configuration=debug " )
399+ try runProgram ( tar, " --directory= \( debugDir ) " , " -czf " , testArchive, " test-swiftly " )
398400
399401 print ( testArchive)
400402 }
@@ -491,14 +493,16 @@ struct BuildSwiftlyRelease: AsyncParsableCommand {
491493
492494 if self . test {
493495 for arch in [ " x86_64 " , " arm64 " ] {
494- try runProgram ( swift, " build " , " --product=test-swiftly " , " --configuration=release " , " --arch= \( arch) " )
496+ try runProgram ( swift, " build " , " --product=test-swiftly " , " --configuration=debug " , " --arch= \( arch) " )
495497 try runProgram ( strip, " .build/ \( arch) -apple-macosx/release/swiftly " )
496498 }
497499
498500 let testArchive = releaseDir. appendingPathComponent ( " test-swiftly-macos.tar.gz " )
499501
500- try runProgram ( lipo, " .build/x86_64-apple-macosx/release/test-swiftly " , " .build/arm64-apple-macosx/release/test-swiftly " , " -create " , " -o " , " \( swiftlyBinDir) /swiftly " )
501- try runProgram ( tar, " --directory= \( swiftlyBinDir) " , " -czf " , testArchive. path, " test-swiftly " )
502+ try runProgram ( lipo, " .build/x86_64-apple-macosx/debug/test-swiftly " , " .build/arm64-apple-macosx/debug/test-swiftly " , " -create " , " -o " , " \( swiftlyBinDir) /swiftly " )
503+ try runProgram ( tar, " --directory=.build/x86_64-apple-macosx/debug " , " -czf " , testArchive. path, " test-swiftly " )
504+
505+ print ( testArchive. path)
502506 }
503507 }
504508}
0 commit comments