Skip to content

Commit 2eaf7de

Browse files
hramosfortmarek
authored andcommitted
Hermes: Use prepare-hermes-for-build in Circle CI (#33811)
Summary: Pull Request resolved: #33811 Use `scripts/hermes/prepare-hermes-for-build.js` in Circle CI, eliminating redundant steps in the `prepare_hermes_workspace` Circle CI job. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D36335122 fbshipit-source-id: b7e8c7aeb2aac5afaf37677cd3ac949ac3f96de1
1 parent 612dbb3 commit 2eaf7de

2 files changed

Lines changed: 10 additions & 20 deletions

File tree

.circleci/config.yml

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -886,8 +886,12 @@ jobs:
886886
name: Install dependencies
887887
command: |
888888
apt update
889-
apt install -y wget git
889+
apt install -y wget git curl
890+
curl -sL https://deb.nodesource.com/setup_16.x | bash -
891+
apt install -y nodejs
892+
npm install --global yarn
890893
- checkout
894+
- run_yarn
891895
- run:
892896
name: Set up Hermes workspace and caching
893897
command: |
@@ -904,24 +908,9 @@ jobs:
904908
- run:
905909
name: Download Hermes tarball
906910
command: |
907-
HERMES_TARBALL_URL="https://github.com/facebook/hermes/archive/refs/heads/main.tar.gz"
908-
HERMES_TARBALL_PATH="$HERMES_WS_DIR/download/hermes.tar.gz"
909-
910-
if [ -f "$HERMES_VERSION_FILE" ]; then
911-
HERMES_TAG=$(cat $HERMES_VERSION_FILE | tr -d '[:space:]')
912-
HERMES_TARBALL_URL="https://github.com/facebook/hermes/archive/refs/tags/$HERMES_TAG.tar.gz"
913-
echo "Using Hermes version tagged $HERMES_TAG"
914-
else
915-
echo "Using Hermes latest version from trunk"
916-
fi
917-
918-
if [ -f "$HERMES_TARBALL_PATH" ]; then
919-
echo "Skipping download; $HERMES_TARBALL_PATH already present."
920-
else
921-
echo "Downloading Hermes tarball from $HERMES_TARBALL_URL"
922-
wget -O "$HERMES_TARBALL_PATH" "$HERMES_TARBALL_URL"
923-
fi
924-
tar -xzf "$HERMES_WS_DIR/download/hermes.tar.gz" --strip-components=1 -C "$HERMES_WS_DIR/hermes"
911+
node scripts/hermes/prepare-hermes-for-build
912+
cp sdks/download/* $HERMES_WS_DIR/download/.
913+
cp -r sdks/hermes/* $HERMES_WS_DIR/hermes/.
925914
- save_cache:
926915
key: v1-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
927916
paths:

sdks/hermes-engine/utils/build-apple-framework.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ function create_universal_framework {
9090
done
9191

9292
mkdir universal
93-
xcodebuild -create-xcframework "$args" -output "universal/hermes.xcframework"
93+
# shellcheck disable=SC2086
94+
xcodebuild -create-xcframework $args -output "universal/hermes.xcframework"
9495

9596
for platform in "$@"; do
9697
rm -r "$platform"

0 commit comments

Comments
 (0)