Xcode 11 bot can't build swift package

Today I tried to refactor some code into a swift package from Xcode 11 and set up a CI bot on my Xcode server to test the package. Although I can build and test the swift package locally without problems, the bot can't build at all, with the following error:


Build Service Error: The directory /Users/username/Library/Caches/XCSBuilder/Bots/*snip*/Source does not contain an Xcode project, workspace or package.


I don't think it's a problem with the repository because I can clone it into a fresh directory and build/test locally. I can navigate to that directory on the server and it appears to have the same layout, permissions, etc as other bot directories that work. The only difference is it contains a swift package instead of an Xcode project.


Is this not supported (yet?)

Replies

Replying to my own post... I found this article today: https://developer.apple.com/documentation/swift_packages/building_apps_that_use_swift_packages_in_continuous_integration_workflows


So I guess Xcode server can't build swift packages. That's pretty unfortunate but at least now I know so I can stop wasting time troubleshooting.


The error strongly implies that it can build packages ("... does not contain an Xcode project, workspace or package") so hopefully this is coming soon.

Exact same problem, thanks for your answer - helps me save time!


EDIT: Just looked at an older package from myself which had a .xcodeproj file in the swift package. After searching I remembered we can create an xcodeproject file with:

```

# swift package generate-xcodeproj

```

That still works with Xcode 11.5

(I did not yet test if that xcodeproj then works with the Xcode Server, but I would guess so)


After looking at your link that is actually what Apple is proposing in that yellow box titled "Important" 😉