Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable rosetta cache for builds #17336

Merged
merged 5 commits into from
Nov 5, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Do rosetta run full well after transform
  • Loading branch information
rix0rrr committed Nov 4, 2021
commit d016f6daea58b93d75470d46d4e2c7ee29211775
12 changes: 1 addition & 11 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ runtarget="build"
run_tests="true"
check_prereqs="true"
check_compat="true"
extract_snippets="false"
while [[ "${1:-}" != "" ]]; do
case $1 in
-h|--help)
echo "Usage: build.sh [--no-bail] [--force|-f] [--skip-test] [--skip-prereqs] [--skip-compat] [--extract]"
echo "Usage: build.sh [--no-bail] [--force|-f] [--skip-test] [--skip-prereqs] [--skip-compat]"
exit 1
;;
--no-bail)
Expand All @@ -28,9 +27,6 @@ while [[ "${1:-}" != "" ]]; do
--skip-compat)
check_compat="false"
;;
--extract)
extract_snippets="true"
;;
*)
echo "Unrecognized parameter: $1"
exit 1
Expand Down Expand Up @@ -86,12 +82,6 @@ echo "==========================================================================
echo "building..."
time lerna run $bail --stream $runtarget || fail

if $extract_snippets; then
# After compilation, run Rosetta (using the cache if available).
# This will print errors, and fail the build if there are compilation errors in any packages marked as 'strict'.
/bin/bash scripts/run-rosetta.sh
fi

if [ "$check_compat" == "true" ]; then
/bin/bash scripts/check-api-compatibility.sh
fi
Expand Down
7 changes: 5 additions & 2 deletions buildspec-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ phases:
- /bin/bash ./scripts/cache-load.sh
build:
commands:
- /bin/bash ./build.sh --extract
- /bin/bash ./scripts/transform.sh --extract
- /bin/bash ./build.sh
- /bin/bash ./scripts/transform.sh
# After compilation, run Rosetta (using the cache if available).
# This will print errors, and fail the build if there are compilation errors in any packages marked as 'strict'.
- /bin/bash ./scripts/run-rosetta.sh
- git diff-index --exit-code --ignore-space-at-eol --stat HEAD
9 changes: 1 addition & 8 deletions scripts/transform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ createSymlinks() {

runtarget="build"
run_tests="true"
extract_snippets="false"
skip_build=""
while [[ "${1:-}" != "" ]]; do
case $1 in
-h|--help)
echo "Usage: transform.sh [--skip-test/build] [--extract]"
echo "Usage: transform.sh [--skip-test/build]"
exit 1
;;
--skip-test|--skip-tests)
Expand All @@ -39,9 +38,6 @@ while [[ "${1:-}" != "" ]]; do
--skip-build)
skip_build="true"
;;
--extract)
extract_snippets="true"
;;
*)
echo "Unrecognized options: $1"
exit 1
Expand All @@ -52,9 +48,6 @@ done
if [ "$run_tests" == "true" ]; then
runtarget="$runtarget+test"
fi
if [ "$extract_snippets" == "true" ]; then
runtarget="$runtarget+extract"
fi

export NODE_OPTIONS="--max-old-space-size=4096 --experimental-worker ${NODE_OPTIONS:-}"

Expand Down