Skip to content

Iterate on CI testing #30

Iterate on CI testing

Iterate on CI testing #30

Workflow file for this run

---
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

View workflow run for this annotation

GitHub Actions / Build Hoods

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 35, Col: 25): Unrecognized named-value: 'env'. Located at position 1 within expression: env.TEST_IOS_VERSION .github/workflows/build.yml (Line: 36, Col: 33): Unrecognized named-value: 'env'. Located at position 1 within expression: env.TEST_IOS_SIMULATOR_MODEL
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