Skip to content

version 1 complete

version 1 complete #2

Workflow file for this run

# .github/workflows/ci.yml
name: CI
on: [push, pull_request]
jobs:
ios-build:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: Select Xcode 16.x
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "16.x"
# Pick the first available iPhone simulator dynamically (no hardcoding).
- name: Pick iPhone simulator
id: pick-sim
shell: bash
run: |
NAME="$(xcrun simctl list devices available | sed -nE 's/.*(iPhone [^()]+) \(.*/\1/p' | head -n 1)"
if [[ -z "$NAME" ]]; then
echo "No iPhone simulator found" >&2
exit 1
fi
echo "name=$NAME" >> "$GITHUB_OUTPUT"
echo "Using simulator: $NAME"
- name: Build iOS app (no tests, no signing)
run: |
set -o pipefail
xcodebuild \
-project SleepTrigger.xcodeproj \
-scheme "SleepTrigger" \
-sdk iphonesimulator \
-destination "platform=iOS Simulator,name=${{ steps.pick-sim.outputs.name }}" \
CODE_SIGNING_ALLOWED=NO \
clean build
macos-build:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: Select Xcode 16.x
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "16.x"
- name: Build macOS app (no tests, no signing)
run: |
set -o pipefail
xcodebuild \
-project SleepTrigger.xcodeproj \
-scheme "SleepTriggerMac" \
-destination "platform=macOS" \
CODE_SIGNING_ALLOWED=NO \
clean build
watchos-build:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: Select Xcode 16.x
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "16.x"
- name: Build watchOS app (no tests, no signing)
run: |
set -o pipefail
xcodebuild \
-project SleepTrigger.xcodeproj \
-scheme "SleepTriggerWatchOS Watch App" \
-destination "generic/platform=watchOS Simulator" \
CODE_SIGNING_ALLOWED=NO \
clean build