Skip to content

Implement serialization with transfer #2128

Implement serialization with transfer

Implement serialization with transfer #2128

Workflow file for this run

name: facebook/hermes/build
on:
push:
pull_request:
branches:
- static_h
jobs:
macos:
runs-on: macos-15
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 16.2
- uses: actions/[email protected]
with:
path: hermes
- name: Install dependencies
run: brew update && (brew list ninja cmake || brew install ninja cmake)
- name: Build macOS CLI
run: |-
cmake -S hermes -B build -G Ninja ${RELEASE_FLAGS} -DHERMES_ENABLE_DEBUGGER=False
cmake --build ./build --target hermes hvm hbcdump hermesc check-hermes
cmake -S hermes -B build_hdb -G Ninja ${RELEASE_FLAGS}
cmake --build ./build_hdb --target hdb check-hermes
env:
RELEASE_FLAGS: "-DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DCMAKE_OSX_ARCHITECTURES=x86_64;arm64 \\ -DBUILD_SHARED_LIBS=OFF -DHERMES_BUILD_SHARED_JSI=OFF"
- name: Create CLI tarball
run: |-
mkdir output staging
cp build/bin/hermes build/bin/hvm build/bin/hbcdump \
build/bin/hermesc build_hdb/bin/hdb staging
tar -C staging -czvf output/${TAR_NAME} .
shasum -a 256 output/${TAR_NAME} > output/${TAR_NAME}.sha256
env:
TAR_NAME: hermes-cli-darwin.tar.gz
- uses: actions/[email protected]
with:
name: macos-hermes
path: output
test-macos-test262:
strategy:
fail-fast: false
matrix:
os: [macos-15]
cmake_flags: [""]
lit_flags: [""]
test_runner_flags: [""]
include:
- os: macos-15
cmake_flags: "-DHERMESVM_ALLOW_JIT=2"
lit_flags: "-Xjit=force"
test_runner_flags: "--vm-args='-Xjit=force'"
runs-on: ${{ matrix.os }}
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 16.2
- uses: actions/[email protected]
with:
path: hermes
- name: Setup dependencies
run: |-
brew update && (brew list ninja cmake || brew install ninja cmake)
# Check out test262 at a pinned revision to reduce flakiness
git clone https://github.com/tc39/test262
cd test262
git checkout 62626e083bd506124aac6c799464d76c2c42851b
- name: Run Hermes tests and test262 with Intl
env:
LIT_HERMES_EXTRA_FLAGS: ${{ matrix.lit_flags }}
run: |-
cmake -S hermes -B build -GNinja -DHERMES_ENABLE_INTL=ON -DCMAKE_BUILD_TYPE=Debug ${{ matrix.cmake_flags }}
cmake --build ./build
cmake --build ./build --target check-hermes
python3 hermes/utils/test_runner.py --test-intl test262/test -b build/bin ${{ matrix.test_runner_flags }}
test-linux-test262:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
cmake_flags: [""]
lit_flags: [""]
test_runner_flags: [""]
include:
- os: ubuntu-24.04-arm
cmake_flags: "-DHERMESVM_ALLOW_JIT=2"
lit_flags: "-Xjit=force"
test_runner_flags: "--vm-args='-Xjit=force'"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/[email protected]
with:
path: hermes
- name: Setup dependencies
run: |-
sudo apt update
sudo apt install -y git openssh-client cmake build-essential \
libreadline-dev libicu-dev zip python3 ninja-build
# Check out test262 at a pinned revision to reduce flakiness
git clone https://github.com/tc39/test262
cd test262
git checkout 62626e083bd506124aac6c799464d76c2c42851b
- name: Run test262 with Intl
env:
LIT_HERMES_EXTRA_FLAGS: ${{ matrix.lit_flags }}
run: |-
cmake -S hermes -GNinja -B build -DCMAKE_BUILD_TYPE=Debug ${{ matrix.cmake_flags }}
cmake --build build --target check-hermes all
cmake -S hermes -GNinja -B build_intl -DHERMES_ENABLE_INTL=ON -DCMAKE_CXX_FLAGS=-O2 -DCMAKE_C_FLAGS=-O2 -DCMAKE_BUILD_TYPE=Debug ${{ matrix.cmake_flags }}
cmake --build ./build_intl
# Not running Hermes test with -DHERMES_ENABLE_INTL=ON until more of
# Intl is built out: toLocaleLowerCase and toLocaleUpperCase are the two
# main ones.
# cmake --build ./build_intl --target check-hermes
python3 hermes/utils/test_runner.py --test-intl test262/test -b build_intl/bin ${{ matrix.test_runner_flags }}
test-linux-armv7:
runs-on: ubuntu-24.04-arm
container:
image: arm32v7/ubuntu:noble
steps:
# checkout action has problem running on container, currently using v1 can bypass it,
# see https://github.com/actions/checkout/issues/334.
- uses: actions/checkout@v1
- name: Setup dependencies
run: |-
apt update
apt install -y git openssh-client cmake clang-16 build-essential \
libreadline-dev libicu-dev zip python3 ninja-build
# Check out test262 at a pinned revision to reduce flakiness
cd ..
git clone https://github.com/tc39/test262
cd test262
git checkout 62626e083bd506124aac6c799464d76c2c42851b
- name: Run tests on ARMv7
run: |-
cd ..
export CC=clang-16
export CXX=clang++-16
cmake -S hermes -GNinja -B build -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_SYSTEM_PROCESSOR=arm -DCMAKE_SYSTEM_NAME=Linux
cmake --build build --target check-hermes all
cmake -S hermes -GNinja -B build_intl -DHERMES_ENABLE_INTL=ON \
-DCMAKE_CXX_FLAGS=-O2 -DCMAKE_C_FLAGS=-O2 -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_SYSTEM_PROCESSOR=arm -DCMAKE_SYSTEM_NAME=Linux
cmake --build ./build_intl
# Not running Hermes test with -DHERMES_ENABLE_INTL=ON until more of
# Intl is built out: toLocaleLowerCase and toLocaleUpperCase are the two
# main ones.
# cmake --build ./build_intl --target check-hermes
python3 hermes/utils/test_runner.py --test-intl test262/test -b build_intl/bin