Skip to content

Commit

Permalink
⚙️ Chore: Add Test Build Scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Dec 8, 2024
1 parent e0866cc commit de2a083
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@
"update-dep:pods": "cd example/ios ; pod install --repo-update ; pod update DGSwiftUtilities ; cd ../.. ; yarn run build:update-version",
"initialize": "yarn run initialize:js ; yarn run pod-install",
"initialize:js": "yarn install ; cd example ; yarn install ; cd ..",
"initialize:reset": "npm run nuke:all ; yarn ; npm run initialize"
"initialize:reset": "npm run nuke:all ; yarn ; npm run initialize",
"test-build:all": "sh ./scripts/test-builds.sh",
"test-build:all-quick": "sh ./scripts/test-builds-quick.sh"
},
"keywords": [
"react-native",
Expand Down
66 changes: 66 additions & 0 deletions scripts/test-builds-quick.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/bin/bash

NEW_ARCH_STATIC=PENDING
OLD_ARCH_STATIC=PENDING
NEW_ARCH_DYNAMIC=PENDING
OLD_ARCH_DYNAMIC=PENDING

log_build_status() {
echo "\n\n\nBUILD RESULTS...";
echo "Build - NEW_ARCH_STATIC: ${NEW_ARCH_STATIC}"
echo "Build - OLD_ARCH_STATIC: ${OLD_ARCH_STATIC}"
echo "Build - NEW_ARCH_DYNAMIC: ${NEW_ARCH_DYNAMIC}"
echo "Build - OLD_ARCH_DYNAMIC: ${OLD_ARCH_DYNAMIC}"
echo "\n\n"
}

log_build_status;

echo '\n\nBuild - new-arch (fabric) + static: Begin...\n'
yarn run pod-install:new-static
yarn run build:ios ;

if [ $? -eq 0 ]; then
NEW_ARCH_STATIC=SUCCESS;
else
NEW_ARCH_STATIC=FAILED;
fi;

log_build_status

echo '\n\nBuild - old-arch (paper) + static: Begin...'
yarn run pod-install:old-static
yarn run build:ios ;

if [ $? -eq 0 ]; then
OLD_ARCH_STATIC=SUCCESS;
else
OLD_ARCH_STATIC=FAILED;
fi;

log_build_status

echo '\nBuild - new-arch (fabric) + dynamic: Begin...\n'
yarn run pod-install:new-dynamic
yarn run build:ios ;

if [ $? -eq 0 ]; then
NEW_ARCH_DYNAMIC=SUCCESS;
else
NEW_ARCH_DYNAMIC=FAILED;
fi;

log_build_status;

echo 'Build - old-arch (paper) + static: Begin...'
yarn run pod-install:old-dynamic
yarn run build:ios ;

if [ $? -eq 0 ]; then
OLD_ARCH_DYNAMIC=SUCCESS;
else
OLD_ARCH_DYNAMIC=FAILED;
fi;

echo "\n\n All Builds Completed..."
log_build_status
76 changes: 76 additions & 0 deletions scripts/test-builds.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#!/bin/bash

NEW_ARCH_STATIC=PENDING
OLD_ARCH_STATIC=PENDING
NEW_ARCH_DYNAMIC=PENDING
OLD_ARCH_DYNAMIC=PENDING

log_build_status() {
echo "\n\n\nBUILD RESULTS...";
echo "Build - NEW_ARCH_STATIC: ${NEW_ARCH_STATIC}"
echo "Build - OLD_ARCH_STATIC: ${OLD_ARCH_STATIC}"
echo "Build - NEW_ARCH_DYNAMIC: ${NEW_ARCH_DYNAMIC}"
echo "Build - OLD_ARCH_DYNAMIC: ${OLD_ARCH_DYNAMIC}"
echo "\n\n"
}

clear_cache(){
echo '\nclearing pods + derived data...'
yarn run nuke:example-pods
yarn run nuke:derived-data
}

log_build_status;
clear_cache;

echo '\n\nBuild - new-arch (fabric) + static: Begin...\n'
yarn run pod-install:new-static
yarn run build:ios ;

if [ $? -eq 0 ]; then
NEW_ARCH_STATIC=SUCCESS;
else
NEW_ARCH_STATIC=FAILED;
fi;

log_build_status
clear_cache

echo '\n\nBuild - old-arch (paper) + static: Begin...'
yarn run pod-install:old-static
yarn run build:ios ;

if [ $? -eq 0 ]; then
OLD_ARCH_STATIC=SUCCESS;
else
OLD_ARCH_STATIC=FAILED;
fi;

log_build_status
clear_cache

echo '\nBuild - new-arch (fabric) + dynamic: Begin...\n'
yarn run pod-install:new-dynamic
yarn run build:ios ;

if [ $? -eq 0 ]; then
NEW_ARCH_DYNAMIC=SUCCESS;
else
NEW_ARCH_DYNAMIC=FAILED;
fi;

log_build_status;
clear_cache;

echo 'Build - old-arch (paper) + static: Begin...'
yarn run pod-install:old-dynamic
yarn run build:ios ;

if [ $? -eq 0 ]; then
OLD_ARCH_DYNAMIC=SUCCESS;
else
OLD_ARCH_DYNAMIC=FAILED;
fi;

echo "\n\n All Builds Completed..."
log_build_status;

0 comments on commit de2a083

Please sign in to comment.