diff --git a/.github/workflows/iOS_Build.yml b/.github/workflows/iOS_Build.yml new file mode 100644 index 00000000..a9f4e488 --- /dev/null +++ b/.github/workflows/iOS_Build.yml @@ -0,0 +1,34 @@ +name: iOS Simulator Build + +on: + push: + branches: + - master + pull_request: + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + +jobs: + build: + # The CMake configure and build commands are platform agnostic and should work equally + # well on Windows or Mac. You can convert this to a matrix build if you need + # cross-platform coverage. + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + runs-on: macos-latest + + steps: + - uses: actions/checkout@v4 + - name: Fetch submodules + run: git submodule update --init --recursive + + - name: Setup Vulkan SDK + uses: humbletim/setup-vulkan-sdk@main + with: + vulkan-query-version: 1.3.296.0 + vulkan-use-cache: true + vulkan-components: Vulkan-Headers, Vulkan-Loader, SPIRV-Tools, Glslang + + - name: Build core and frontend + run: cd src/pandios && ./build.sh \ No newline at end of file diff --git a/src/pandios/Pandios.xcodeproj/project.xcworkspace/xcuserdata/giorgos.xcuserdatad/UserInterfaceState.xcuserstate b/src/pandios/Pandios.xcodeproj/project.xcworkspace/xcuserdata/giorgos.xcuserdatad/UserInterfaceState.xcuserstate index 43042697..cde9b6fc 100644 Binary files a/src/pandios/Pandios.xcodeproj/project.xcworkspace/xcuserdata/giorgos.xcuserdatad/UserInterfaceState.xcuserstate and b/src/pandios/Pandios.xcodeproj/project.xcworkspace/xcuserdata/giorgos.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/src/pandios/build.sh b/src/pandios/build.sh index 4f13ddbc..1652db56 100755 --- a/src/pandios/build.sh +++ b/src/pandios/build.sh @@ -1,15 +1,20 @@ #!/bin/bash +# Settings for the SwiftUI frontend ARCH=arm64 CONFIGURATION=Release SDK=iphonesimulator18.2 -runSimulator=false +# Settings for the emulator core +EMULATOR_BUILD_TYPE=Release + +# Simulator settings +RUN_SIMULATOR=false # Go to the parent directory and build the emulator core cd ../.. -cmake -B build -DENABLE_VULKAN=OFF -DBUILD_HYDRA_CORE=ON -DCMAKE_TOOLCHAIN_FILE=third_party/ios_toolchain/ios.toolchain.cmake -DPLATFORM=SIMULATORARM64 -DDEPLOYMENT_TARGET="13.0" -cmake --build build +cmake -B build -DENABLE_VULKAN=OFF -DBUILD_HYDRA_CORE=ON -DENABLE_USER_BUILD=ON -DCMAKE_TOOLCHAIN_FILE=third_party/ios_toolchain/ios.toolchain.cmake -DPLATFORM=SIMULATORARM64 -DDEPLOYMENT_TARGET="13.0" +cmake --build build --config ${EMULATOR_BUILD_TYPE} # Copy the bridging header from the emulator source to the Swift interop module folder cp ./include/ios_driver.h ./src/pandios/Alber/Headers/ios_driver.h @@ -19,11 +24,10 @@ cd src/pandios xcodebuild build -configuration ${CONFIGURATION} -sdk ${SDK} -arch ${ARCH} # To run the app in the simulator: - # Boot the iPhone, install the app on the iphone, then open the sim & launch the app -if [ "$runSimulator" = true ] ; then - xcrun simctl boot "iPhone 16" - xcrun simctl install "iPhone 16" "build/Release-iphonesimulator/Pandios.app" +if [ "$RUN_SIMULATOR" = true ] ; then + xcrun simctl boot "iPhone 16 Pro" + xcrun simctl install "iPhone 16 Pro" "build/Release-iphonesimulator/Pandios.app" open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app - xcrun simctl launch booted "Alber.Pandios" + xcrun simctl launch --console booted "Alber.Pandios" fi \ No newline at end of file