Iterate on CI testing #30
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | ||
name: Build Hoods | ||
# 📜 https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
build_macOS: | ||
name: Build macOS | ||
runs-on: macos-13 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Select Xcode 15.2 | ||
run: sudo xcode-select -s /Applications/Xcode_15.2.app | ||
- name: Output XCode and Swift version | ||
run: | | ||
xcrun xcodebuild -version | ||
xcrun swift --version | ||
- name: Build debug version | ||
run: | | ||
make build | ||
- name: Test debug version | ||
run: | | ||
swift test | ||
build_iOS: | ||
name: Build iOS | ||
runs-on: macos-13 | ||
env: | ||
TEST_IOS_VERSION: ${{ env.TEST_IOS_VERSION }} | ||
Check failure on line 35 in .github/workflows/build.yml
|
||
TEST_IOS_SIMULATOR_MODEL: ${{ env.TEST_IOS_SIMULATOR_MODEL }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Select Xcode 15.2 | ||
run: sudo xcode-select -s /Applications/Xcode_15.2.app | ||
- name: Output XCode and Swift version | ||
run: | | ||
xcrun xcodebuild -version | ||
xcrun swift --version | ||
- name: Show destinations | ||
run: xcrun xcodebuild -showdestinations -scheme Hoods | ||
- name: Build debug version | ||
run: | | ||
set -o pipefail && xcrun xcodebuild build \ | ||
-skipMacroValidation -skipPackagePluginValidation \ | ||
-skipMacroValidation build -scheme Hoods -destination generic/platform=ios | ||
- name: Test debug version | ||
run: | | ||
echo "$TEST_IOS_VERSION" | ||
echo "$TEST_IOS_SIMULATOR_MODEL" | ||
curl -sSL https://raw.githubusercontent.com/dirtyhenry/swift-blocks/main/Scripts/ListDevices.swift \ | ||
-o findDevice | ||
chmod +x findDevice | ||
# Find the device identifier | ||
DEVICE_ID=$(./findDevice "$TEST_IOS_VERSION" "$TEST_IOS_SIMULATOR_MODEL") | ||
# Run a test | ||
set -o pipefail && xcodebuild test \ | ||
-skipMacroValidation -skipPackagePluginValidation \ | ||
-scheme Hoods \ | ||
-destination platform="iOS Simulator,id=$DEVICE_ID" \ | ||
| xcpretty |