Skip to content

Commit

Permalink
Hermes: Use prepare-hermes-for-build in Circle CI (#33811)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hramos authored and facebook-github-bot committed May 13, 2022
1 parent aaa01f7 commit d7921f0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
27 changes: 8 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -911,8 +911,12 @@ jobs:
name: Install dependencies
command: |
apt update
apt install -y wget git
apt install -y wget git curl
curl -sL https://deb.nodesource.com/setup_16.x | bash -
apt install -y nodejs
npm install --global yarn
- checkout
- run_yarn
- run:
name: Set up Hermes workspace and caching
command: |
Expand All @@ -929,24 +933,9 @@ jobs:
- run:
name: Download Hermes tarball
command: |
HERMES_TARBALL_URL="https://github.com/facebook/hermes/archive/refs/heads/main.tar.gz"
HERMES_TARBALL_PATH="$HERMES_WS_DIR/download/hermes.tar.gz"
if [ -f "$HERMES_VERSION_FILE" ]; then
HERMES_TAG=$(cat $HERMES_VERSION_FILE | tr -d '[:space:]')
HERMES_TARBALL_URL="https://github.com/facebook/hermes/archive/refs/tags/$HERMES_TAG.tar.gz"
echo "Using Hermes version tagged $HERMES_TAG"
else
echo "Using Hermes latest version from trunk"
fi
if [ -f "$HERMES_TARBALL_PATH" ]; then
echo "Skipping download; $HERMES_TARBALL_PATH already present."
else
echo "Downloading Hermes tarball from $HERMES_TARBALL_URL"
wget -O "$HERMES_TARBALL_PATH" "$HERMES_TARBALL_URL"
fi
tar -xzf "$HERMES_WS_DIR/download/hermes.tar.gz" --strip-components=1 -C "$HERMES_WS_DIR/hermes"
node scripts/hermes/prepare-hermes-for-build
cp sdks/download/* $HERMES_WS_DIR/download/.
cp -r sdks/hermes/* $HERMES_WS_DIR/hermes/.
- save_cache:
key: *hermes_cache_key
paths:
Expand Down
3 changes: 2 additions & 1 deletion sdks/hermes-engine/utils/build-apple-framework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ function create_universal_framework {
done

mkdir universal
xcodebuild -create-xcframework "$args" -output "universal/hermes.xcframework"
# shellcheck disable=SC2086
xcodebuild -create-xcframework $args -output "universal/hermes.xcframework"

for platform in "$@"; do
rm -r "$platform"
Expand Down

0 comments on commit d7921f0

Please sign in to comment.