Run a virtual iPhone on an Apple Silicon Mac.
Swift
Build and publish VPhone bundle with GitHub Actions
Lakr08db376d9417
diff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlnew file mode 100644index 00000000..48aae596--- /dev/null+++ b/.github/workflows/build.yml@@ -0,0 +1,36 @@+name: build++on:+ push:+ branches: [main]+ pull_request:+ workflow_dispatch:++permissions:+ contents: read++jobs:+ build:+ runs-on: macos-26+ steps:+ - name: Checkout+ uses: actions/checkout@v4++ - name: Toolchain versions+ run: |+ swift --version+ xcodebuild -version++ - name: Build VPhone.bundle+ env:+ SWIFT_JOBS: "4"+ run: |+ xcodebuild -workspace VPhone.xcworkspace -scheme VPhone \+ -configuration Debug -destination 'platform=macOS,arch=arm64' \+ -derivedDataPath .build/XcodeBundle -jobs 4 build++ - name: Verify bundle+ run: |+ set -euo pipefail+ zsh VPhoneExecutable/VPhoneVirtualization/Build/ValidateBundle.sh \+ .build/XcodeBundle/Build/Products/Debug/VPhone.bundlediff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 00fa32fe..14ba59af 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -1,12 +1,17 @@name: release-# Build the portable, signed vphone-cli.app and attach it to a published-# GitHub Release. Validate the actual application bundle; no Homebrew-# packages or separately provisioned runtime tools are required.+# Build the self-contained VPhone.bundle and attach it to a published+# GitHub Release. The Xcode scheme signs and validates the bundle.on:release:types: [published]+ workflow_dispatch:+ inputs:+ tag:+ description: Existing release tag to build and upload+ required: true+ type: stringpermissions:contents: write@@ -17,31 +22,38 @@ jobs:steps:- name: Checkoutuses: actions/checkout@v4+ with:+ ref: ${{ github.event.release.tag_name || inputs.tag }}- name: Toolchain versionsrun: |swift --versionxcodebuild -version- - name: Build and bundle (portable .app)+ - name: Build VPhone.bundleenv:SWIFT_JOBS: "4"- run: ./Scripts/build.sh+ run: |+ xcodebuild -workspace VPhone.xcworkspace -scheme VPhone \+ -configuration Release -destination 'platform=macOS,arch=arm64' \+ -derivedDataPath .build/XcodeBundle -jobs 4 build- - name: Verify application bundle+ - name: Verify bundlerun: |set -euo pipefail- codesign --verify --strict .build/vphone-cli.app- test -x .build/vphone-cli.app/Contents/Resources/guest/vphoned- zsh Scripts/check_aux.sh+ zsh VPhoneExecutable/VPhoneVirtualization/Build/ValidateBundle.sh \+ .build/XcodeBundle/Build/Products/Release/VPhone.bundle- - name: Package app+ - name: Package bundleenv:- TAG: ${{ github.event.release.tag_name }}- run: ditto -c -k --keepParent .build/vphone-cli.app "vphone-cli-${TAG}.zip"+ TAG: ${{ github.event.release.tag_name || inputs.tag }}+ run: |+ ditto -c -k --keepParent \+ .build/XcodeBundle/Build/Products/Release/VPhone.bundle \+ "VPhone-${TAG}.zip"- name: Upload to releaseenv:GH_TOKEN: ${{ github.token }}- TAG: ${{ github.event.release.tag_name }}- run: gh release upload "$TAG" "vphone-cli-${TAG}.zip" --clobber+ TAG: ${{ github.event.release.tag_name || inputs.tag }}+ run: gh release upload "$TAG" "VPhone-${TAG}.zip" --clobber