setup-swift
setup-swift copied to clipboard
"Could not find Package.swift" for ubuntu target
Describe the bug
Getting the following error:
lsb_release -r
/opt/hostedtoolcache/swift-Ubuntu/5.6.1/x64/usr/bin/swiftc -print-target-info
/opt/hostedtoolcache/swift-Ubuntu/5.6.1/x64/usr/bin/swift-frontend -frontend -print-target-info
/opt/hostedtoolcache/swift-Ubuntu/5.6.1/x64/usr/bin/swift-frontend -frontend -print-target-info
/opt/hostedtoolcache/swift-Ubuntu/5.6.1/x64/usr/bin/swift-frontend -frontend -emit-supported-features /tmp/TemporaryDirectory.lfMPTC/dummyInput-1.swift
/opt/hostedtoolcache/swift-Ubuntu/5.6.1/x64/usr/bin/swiftc -print-target-info
error: Could not find Package.swift in this directory or any of its parent directories.
Error: Process completed with exit code 1.
The offending repository is this and it does contain Package.swift.
Workflow configuration (please complete the following information):
- Platform (
runs-on
): [ubuntu-latest, macos-latest] - Swift version (
swift-version
): ["5.6.1"]
The whole configuration file: swift.yml
EDIT: The action fails for both ubuntu-latest
and macos-latest
targets. The repository does contain Package.swift
as it is being developed as a package. Both Xcode and command-line tools recognise it as a proper Swift package repository.
Hi @Stiivi! 👋🏻 Do you still experience this issue?
I run into the same thing. I was just a beginner about this actions stuff. I forgot to checkout the project first. Add step to checkout the project first. Maybe it should be mentioned on the docs, @fwal.
steps:
- uses: actions/checkout@v4
- uses: swift-actions/setup-swift@v1