Skip to content

Commit

Permalink
feat: add matrix for Debug/Release and New/Legacy architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
Riccardo Cipolleschi committed Aug 22, 2022
1 parent 0a59c28 commit e08f595
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e08f595

Please sign in to comment.