Skip to content

CameraViewController dies (UI modernization PR 12) (#136) #317

CameraViewController dies (UI modernization PR 12) (#136)

CameraViewController dies (UI modernization PR 12) (#136) #317

Workflow file for this run

name: iOS CI
on:
push:
branches: [ main, develop, master ]
pull_request:
branches: [ main, develop, master ]
permissions:
contents: read
pull-requests: write
jobs:
build:
name: Build and Test
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '26.2'
- name: Show Xcode version
run: xcodebuild -version
- name: Show available simulators
run: xcrun simctl list devicetypes
# TODO: Remove this once we have a way to install CocoaPods
# - name: Cache CocoaPods
# uses: actions/cache@v4
# with:
# path: Pods
# key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
# restore-keys: |
# ${{ runner.os }}-pods-
# - name: Install CocoaPods
# run: |
# sudo gem install cocoapods
# pod --version
# - name: Install Pod Dependencies
# run: |
# pod install --repo-update
- name: Build for iOS Simulator
run: |
xcodebuild \
-workspace RemoteShutter.xcworkspace \
-scheme RemoteCam \
-destination 'platform=iOS Simulator,OS=26.2,name=iPhone 17' \
-configuration Debug \
clean build \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO
- name: Run Tests
run: |
xcodebuild \
-workspace RemoteShutter.xcworkspace \
-scheme RemoteCam \
-destination 'platform=iOS Simulator,OS=26.2,name=iPhone 17' \
-configuration Debug \
test \
-enableCodeCoverage YES \
-resultBundlePath TestResults.xcresult \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO
- name: Generate Coverage Report
if: success()
run: |
python3 scripts/coverage_report.py TestResults.xcresult coverage.md
cat coverage.md >> "$GITHUB_STEP_SUMMARY"
- name: Post Coverage Comment
if: success() && github.event_name == 'pull_request'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: coverage
path: coverage.md
- name: Archive for Release (if main branch)
if: github.ref == 'refs/heads/main'
run: |
xcodebuild \
-workspace RemoteShutter.xcworkspace \
-scheme RemoteCam \
-configuration Release \
-archivePath RemoteShutter.xcarchive \
archive \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO
- name: Upload Build Artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: build-logs
path: |
~/Library/Developer/Xcode/DerivedData/**/Logs/**
retention-days: 5