From e08f5950407a36d47a30ffd3eba8d163eff6c8f0 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Mon, 22 Aug 2022 14:28:41 +0100 Subject: [PATCH] feat: add matrix for Debug/Release and New/Legacy architecture --- .circleci/config.yml | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d881a12aa18626..f84c01309c1b8d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -134,6 +134,11 @@ commands: name: Shallow clone repo command: | git clone --branch main --no-checkout "$CIRCLE_REPOSITORY_URL" --single-branch . + + echo "CIRCLE PR Number is: "$CIRCLE_PR_NUMBER + echo "CIRCLE BRANCH is: "$CIRCLE_BRANCH + echo "CIRCLE_SHA1 is: "$CIRCLE_SHA1 + # Fetch from fork if applicable if [ -n "$CIRCLE_PR_NUMBER" ] ; then git fetch --force --depth 1 origin +refs/pull/$CIRCLE_PR_NUMBER/head:refs/remotes/origin/pull/$CIRCLE_PR_NUMBER @@ -730,6 +735,13 @@ jobs: # ------------------------- test_ios_template: executor: reactnativeios + parameters: + flavor: + type: string + default: "Debug" + newarchitecture: + type: boolean + default: false environment: - PROJECT_NAME: "iOSTemplateProject" - HERMES_WS_DIR: *hermes_workspace_root @@ -754,11 +766,28 @@ jobs: PACKAGE=$(cat build/react-native-package-version) PATH_TO_PACKAGE="$REPO_ROOT/build/$PACKAGE" node ./scripts/set-rn-template-version.js "file:$PATH_TO_PACKAGE" - node cli.js init $PROJECT_NAME --directory "/tmp/$PROJECT_NAME" --template $REPO_ROOT --verbose + node cli.js init $PROJECT_NAME --directory "/tmp/$PROJECT_NAME" --template $REPO_ROOT --verbose --skip-install + - run: + name: Install iOS dependencies - Configuration << parameters.flavor >>; New Architecture << parameters.newarchitecture >> + command: | + cd /tmp/$PROJECT_NAME/ios + PROD="" + if [[ << parameters.flavor >> == "Release" ]]; then + PROD="PRODUCTION=1" + fi + + NEW_ARCH="" + if [[ << parameters.newarchitecture >> ]]; then + NEW_ARCH="RCT_NEW_ARCH_ENABLED=1" + fi + + bundle install + $PROD $NEW_ARCH bundle exec pod install - run: name: Build template project command: | xcodebuild build \ + -configuration << parameters.flavor >> \ -workspace /tmp/$PROJECT_NAME/ios/$PROJECT_NAME.xcworkspace \ -scheme $PROJECT_NAME \ -sdk iphonesimulator @@ -1360,6 +1389,10 @@ workflows: - test_ios_template: requires: - build_npm_package + matrix: + parameters: + newarchitecture: [true, false] + flavor: ["Debug", "Release"] - test_ios_rntester: requires: - build_hermes_macos