Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

chore: tidy the github action workflow

Lakr23336d8abadf220
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 48aae596..7136faee 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -16,18 +16,39 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
+ - name: Install xcbeautify
+ run: command -v xcbeautify >/dev/null || brew install xcbeautify
+
- name: Toolchain versions
run: |
swift --version
xcodebuild -version
+ xcbeautify --version
- name: Build VPhone.bundle
env:
SWIFT_JOBS: "4"
run: |
+ set -o pipefail
+ mkdir -p .build
xcodebuild -workspace VPhone.xcworkspace -scheme VPhone \
-configuration Debug -destination 'platform=macOS,arch=arm64' \
- -derivedDataPath .build/XcodeBundle -jobs 4 build
+ -derivedDataPath .build/XcodeBundle -jobs 4 build 2>&1 \
+ | tee .build/xcodebuild.log \
+ | xcbeautify --quiet --disable-logging --renderer github-actions
+
+ # Quiet mode hides unannotated build-phase output, including the reason
+ # a script phase failed. Keep the full log for that case.
+ - name: Show raw build log
+ if: failure()
+ run: tail -n 300 .build/xcodebuild.log
+
+ - name: Upload raw build log
+ if: failure()
+ uses: actions/upload-artifact@v4
+ with:
+ name: xcodebuild-log
+ path: .build/xcodebuild.log
- name: Verify bundle
run: |
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 6eda5207..334802d0 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -27,18 +27,39 @@ jobs:
with:
ref: ${{ github.event.release.tag_name || inputs.tag }}
+ - name: Install xcbeautify
+ run: command -v xcbeautify >/dev/null || brew install xcbeautify
+
- name: Toolchain versions
run: |
swift --version
xcodebuild -version
+ xcbeautify --version
- name: Build VPhone.bundle
env:
SWIFT_JOBS: "4"
run: |
+ set -o pipefail
+ mkdir -p .build
xcodebuild -workspace VPhone.xcworkspace -scheme VPhone \
-configuration Release -destination 'platform=macOS,arch=arm64' \
- -derivedDataPath .build/XcodeBundle -jobs 4 build
+ -derivedDataPath .build/XcodeBundle -jobs 4 build 2>&1 \
+ | tee .build/xcodebuild.log \
+ | xcbeautify --quiet --disable-logging --renderer github-actions
+
+ # Quiet mode hides unannotated build-phase output, including the reason
+ # a script phase failed. Keep the full log for that case.
+ - name: Show raw build log
+ if: failure()
+ run: tail -n 300 .build/xcodebuild.log
+
+ - name: Upload raw build log
+ if: failure()
+ uses: actions/upload-artifact@v4
+ with:
+ name: xcodebuild-log
+ path: .build/xcodebuild.log
- name: Verify bundle
run: |
@@ -68,15 +89,37 @@ jobs:
with:
ref: ${{ github.event.release.tag_name || inputs.tag }}
+ - name: Install xcbeautify
+ run: command -v xcbeautify >/dev/null || brew install xcbeautify
+
- name: Toolchain versions
- run: xcodebuild -version
+ run: |
+ xcodebuild -version
+ xcbeautify --version
- name: Build vphone-launchpad.app
run: |
+ set -o pipefail
+ mkdir -p .build
xcodebuild -project VPhoneLaunchpad/VPhoneLaunchpad.xcodeproj \
-scheme VPhoneLaunchpad -configuration Release \
-destination 'platform=macOS,arch=arm64' \
- -derivedDataPath .build/XcodeLaunchpad build
+ -derivedDataPath .build/XcodeLaunchpad build 2>&1 \
+ | tee .build/xcodebuild.log \
+ | xcbeautify --quiet --disable-logging --renderer github-actions
+
+ # Quiet mode hides unannotated build-phase output, including the reason
+ # a script phase failed. Keep the full log for that case.
+ - name: Show raw build log
+ if: failure()
+ run: tail -n 300 .build/xcodebuild.log
+
+ - name: Upload raw build log
+ if: failure()
+ uses: actions/upload-artifact@v4
+ with:
+ name: xcodebuild-log-launchpad
+ path: .build/xcodebuild.log
# The asset name must not match Launchpad's own `^VPhone-.+\.zip$`
# bundle asset pattern.
diff --git a/.gitignore b/.gitignore
index 5420651b..716c0cde 100644
--- a/.gitignore
+++ b/.gitignore
@@ -355,3 +355,4 @@ setup_logs/
# vphone-launchpad signing team; never committed
VPhoneLaunchpad/Configuration/Developer.xcconfig
VPhoneLaunchpad/Configuration/DevelopmentDeveloper.xcconfig
+.claude/worktrees