diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index 8092a1f..6a81e7f 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -10,7 +10,7 @@ on: jobs: build-ios: name: Build iOS Simulator App - runs-on: macos-15 + runs-on: bladerunner-macos steps: - name: Checkout repository @@ -31,15 +31,6 @@ jobs: brew install nim echo "$HOME/.nimble/bin" >> $GITHUB_PATH - - name: Setup Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: '3.0' - working-directory: mobile-app/ios - - - name: Select Xcode 16.4 - run: sudo xcode-select -s "/Applications/Xcode_16.4.app/Contents/Developer" - - name: Build iOS working-directory: mobile-app run: make build-ios diff --git a/.github/workflows/nix-build.yml b/.github/workflows/nix-build.yml index 2cb8ea5..f5134bb 100644 --- a/.github/workflows/nix-build.yml +++ b/.github/workflows/nix-build.yml @@ -22,12 +22,6 @@ jobs: extra_nix_config: | experimental-features = nix-command flakes - - name: Cache Nix store - uses: cachix/cachix-action@v15 - with: - name: devenv - skipPush: true - - name: Init git repo (required by nimble) working-directory: mobile-app run: | @@ -35,7 +29,7 @@ jobs: git config user.email "ci@test.com" git config user.name "CI" git add -A - git commit -m "init" + git diff --cached --quiet || git commit -m "init" - name: Build Android via Nix + Make run: nix develop --command bash -c 'make android' @@ -49,7 +43,7 @@ jobs: nix-ios: name: Nix → iOS Build - runs-on: macos-15 + runs-on: bladerunner-macos steps: - name: Checkout repository @@ -61,15 +55,6 @@ jobs: extra_nix_config: | experimental-features = nix-command flakes - - name: Cache Nix store - uses: cachix/cachix-action@v15 - with: - name: devenv - skipPush: true - - - name: Select Xcode 16.4 - run: sudo xcode-select -s "/Applications/Xcode_16.4.app/Contents/Developer" - - name: Init git repo (required by nimble) working-directory: mobile-app run: | @@ -77,7 +62,7 @@ jobs: git config user.email "ci@test.com" git config user.name "CI" git add -A - git commit -m "init" + git diff --cached --quiet || git commit -m "init" - name: Install Nim deps (Nix nimble links OpenSSL 3 + Security.framework which clash) run: | diff --git a/.github/workflows/validate-template.yml b/.github/workflows/validate-template.yml index 848f2d5..b72aaa3 100644 --- a/.github/workflows/validate-template.yml +++ b/.github/workflows/validate-template.yml @@ -91,7 +91,7 @@ jobs: scaffold-and-build-ios: name: Template → iOS Build - runs-on: macos-15 + runs-on: bladerunner-macos steps: - name: Checkout repository @@ -140,15 +140,6 @@ jobs: brew install nim echo "$HOME/.nimble/bin" >> $GITHUB_PATH - - name: Setup Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: '3.0' - working-directory: test-app/ios - - - name: Select Xcode 16.4 - run: sudo xcode-select -s "/Applications/Xcode_16.4.app/Contents/Developer" - - name: Build iOS working-directory: test-app env: diff --git a/flake.nix b/flake.nix index a328458..412b3af 100644 --- a/flake.nix +++ b/flake.nix @@ -113,10 +113,15 @@ # Nix transitive deps (e.g. nim → apple-sdk) set SDKROOT/DEVELOPER_DIR # to the Nix SDK and put a broken xcrun wrapper in PATH, unset these # and prepend /usr/bin so system Xcode tools take priority. - unset DEVELOPER_DIR SDKROOT + unset SDKROOT unset NIX_CFLAGS_COMPILE NIX_ENFORCE_NO_NATIVE unset NIX_IGNORE_LD_THROUGH_GCC NIX_DONT_SET_RPATH NIX_DONT_SET_RPATH_FOR_BUILD NIX_NO_SELF_RPATH export PATH="/usr/bin:$PATH" + if [ -d /Applications/Xcode.app/Contents/Developer ]; then + export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer + else + unset DEVELOPER_DIR + fi echo " • macOS: iOS and Android development available" echo " • CocoaPods: $(pod --version 2>/dev/null || echo 'not available')" else diff --git a/mobile-app/Makefile b/mobile-app/Makefile index d122c46..9025140 100644 --- a/mobile-app/Makefile +++ b/mobile-app/Makefile @@ -121,6 +121,8 @@ build-nim: nim-static-lib nim-bindings nim-headers build-ios: install build-nim codegen pod-install @echo "Building iOS Simulator app..." @set -o pipefail && env -i HOME=$(HOME) PATH=/usr/bin:/bin:/usr/sbin:/sbin LANG=en_US.UTF-8 \ + DEVELOPER_DIR="$$DEVELOPER_DIR" \ + TMPDIR="$$TMPDIR" \ xcodebuild -workspace $(XCODE_WORKSPACE) \ -scheme $(XCODE_SCHEME) \ -sdk iphonesimulator \ diff --git a/mobile-app/ios/Podfile b/mobile-app/ios/Podfile index 04dd271..de7c37b 100644 --- a/mobile-app/ios/Podfile +++ b/mobile-app/ios/Podfile @@ -53,6 +53,20 @@ target 'nimrnmobileapp' do :ccache_enabled => podfile_properties['apple.ccacheEnabled'] == 'true', ) + # fmt 11.0.2 (bundled with RN 0.81) emits FMT_STRING("...") lambdas + # that Xcode 26's clang rejects as not constant-evaluable. Strip the + # wrapper so the literal goes through the plain consteval ctor path. + # Remove when bumping to RN 0.82 (ships fmt prebuilt). + fmt_inl = File.join(installer.sandbox.root, 'fmt/include/fmt/format-inl.h') + if File.exist?(fmt_inl) + content = File.read(fmt_inl) + patched = content.gsub(/FMT_STRING\(("[^"]*")\)/, '\1') + if patched != content + File.chmod(0644, fmt_inl) + File.write(fmt_inl, patched) + end + end + # fix for Xcode 16 build issues installer.pods_project.targets.each do |target| target.build_configurations.each do |config| diff --git a/mobile-app/ios/Podfile.lock b/mobile-app/ios/Podfile.lock index 8bf9b40..3847b8d 100644 --- a/mobile-app/ios/Podfile.lock +++ b/mobile-app/ios/Podfile.lock @@ -2924,6 +2924,6 @@ SPEC CHECKSUMS: SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 Yoga: 922d794dce2af9c437f864bf4093abfa7a131adb -PODFILE CHECKSUM: 30222b370f2c6e2622deeb5e8d786e95202de871 +PODFILE CHECKSUM: 2c305444c70fa279b301b0f41b47d1e9fa4781e9 COCOAPODS: 1.16.2