From 086ad8ebdedc7fd911d9a8634460f943bffa0ecc Mon Sep 17 00:00:00 2001 From: Newman Chow Date: Thu, 21 Mar 2024 17:32:16 +0800 Subject: [PATCH] Upgrade build versions --- .github/workflows/ci.yaml | 85 ++++++++++++++++++- .../project.pbxproj | 4 +- 2 files changed, 85 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 065e6b89..9d0b570d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,6 +30,87 @@ jobs: - run: npm run bundle if: ${{ !cancelled() }} + test_react_native_ios: + if: ${{ github.event_name == 'pull_request' }} + runs-on: macos-13 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: "./.tool-versions" + - run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer + - run: npm ci + - run: npm run build + - working-directory: ./example/reactnative + run: yarn + - working-directory: ./example/reactnative + # Install cocoapods from the Gemfile + run: bundle install + - working-directory: ./example/reactnative + # Run the specific cocoapods + run: bundle exec pod install --project-directory=ios + - name: Run xcodebuild + working-directory: ./example/reactnative/ios + run: xcodebuild -quiet -workspace reactNativeExample.xcworkspace -scheme reactNativeExample -sdk iphonesimulator build + test_react_native_android: + if: ${{ github.event_name == 'pull_request' }} + # When we change the runner image, the available Android build tools versions will also change. + # We need to update build.gradle too. + # See https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md + runs-on: macos-13 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: "./.tool-versions" + - run: npm ci + - run: npm run build + - working-directory: ./example/reactnative + run: yarn + - name: Build unsigned APK + working-directory: ./example/reactnative/android + run: ./gradlew :app:assembleRelease + + test_capacitor_ios: + if: ${{ github.event_name == 'pull_request' }} + runs-on: macos-13 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: "./.tool-versions" + - run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer + - run: npm ci + - run: npm run build + - working-directory: ./example/capacitor + run: npm ci + - working-directory: ./example/capacitor + run: npm run build + - working-directory: ./example/capacitor + run: npx cap sync + - name: Run xcodebuild + working-directory: ./example/capacitor/ios/App + run: xcodebuild -quiet -workspace App.xcworkspace -scheme App -sdk iphonesimulator build + test_capacitor_android: + if: ${{ github.event_name == 'pull_request' }} + runs-on: macos-13 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: "./.tool-versions" + - run: npm ci + - run: npm run build + - working-directory: ./example/capacitor + run: npm ci + - working-directory: ./example/capacitor + run: npm run build + - working-directory: ./example/capacitor + run: npx cap sync + - name: Build unsigned APK + working-directory: ./example/capacitor/android + run: ./gradlew :app:assembleRelease + react_native_ios: if: github.ref == 'refs/heads/master' needs: test @@ -39,7 +120,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version-file: "./.tool-versions" - - run: sudo xcode-select -s /Applications/Xcode_14.3.1.app/Contents/Developer + - run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer - run: npm install -g appcenter-cli - run: npm ci - run: npm run build @@ -151,7 +232,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version-file: "./.tool-versions" - - run: sudo xcode-select -s /Applications/Xcode_14.3.1.app/Contents/Developer + - run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer - run: npm install -g appcenter-cli - run: npm ci - run: npm run build diff --git a/example/reactnative/ios/reactNativeExample.xcodeproj/project.pbxproj b/example/reactnative/ios/reactNativeExample.xcodeproj/project.pbxproj index f1c9114e..244e1e64 100644 --- a/example/reactnative/ios/reactNativeExample.xcodeproj/project.pbxproj +++ b/example/reactnative/ios/reactNativeExample.xcodeproj/project.pbxproj @@ -586,7 +586,7 @@ COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -664,7 +664,7 @@ COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = (