I am interested in running build for my Swift project on CI with GitHub Actions
I use the following ci.yml
:
Build:
runs-on: macOS-latest
steps:
- name: Install Swift
uses: slashmo/install-swift@v0.2.1
with:
version: 5.7
- name: Checkout
uses: actions/checkout@v1
- name: Build
uses: sersoft-gmbh/xcodebuild-action@v2
with:
project: <Project>.xcodeproj
scheme: <Scheme>
destination: "platform=iOS Simulator,name=iPhone 14 Pro Max"
action: build
I am facing a problem here:
xcodebuild: error: Could not resolve package dependencies:
package at '/Users/runner/work/path/to/my/package' is using Swift tools version 5.7.0 but the installed version is 5.5.0
I want to use swift-tools-version
equal to 5.7.0
, not the lower one
Please, help me install the version I need
Looks like I made it work. I added this step in my workflow:
- name: Select Xcode
run: sudo xcode-select -s "/Applications/Xcode_14.0.1.app"
and then specified the simulator environment:
env:
destination: 'platform=iOS Simulator,name=iPhone 14 Pro,OS=16.0'