diff --git a/package.json b/package.json index cf5baa1..b34a73e 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/scripts/test-builds-quick.sh b/scripts/test-builds-quick.sh new file mode 100644 index 0000000..4b0b214 --- /dev/null +++ b/scripts/test-builds-quick.sh @@ -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 \ No newline at end of file diff --git a/scripts/test-builds.sh b/scripts/test-builds.sh new file mode 100644 index 0000000..1668722 --- /dev/null +++ b/scripts/test-builds.sh @@ -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; \ No newline at end of file