mirror of
https://github.com/react/react-native.git
synced 2026-10-02 18:09:53 +08:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54729 Changelog: [Internal] - Created new build-fantom-runner action to compile the Fantom runner binary - Modified run-fantom-tests action to download and use pre-built binary - Updated test-all.yml workflow to run build and test as separate jobs - Removed build dependencies and ccache configuration from test job Reviewed By: cortinico Differential Revision: D88012198 fbshipit-source-id: cd1c91b18cccc3c62b9edbcbeb131e80551369f1
38 lines
1.0 KiB
Bash
Executable File
38 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
#
|
|
# This source code is licensed under the MIT license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
set -e
|
|
|
|
|
|
if [[ -f "BUCK" && -z "$FANTOM_FORCE_OSS_BUILD" ]]; then
|
|
export JS_DIR='..'
|
|
else
|
|
if [[ ! -f "private/react-native-fantom/build/tester/fantom_tester" ]]; then
|
|
yarn workspace @react-native/fantom build
|
|
fi
|
|
export FANTOM_FORCE_OSS_BUILD=1
|
|
fi
|
|
|
|
export NODE_OPTIONS='--max-old-space-size=8192'
|
|
|
|
# Parse arguments to check for --benchmarks flag
|
|
INCLUDE_BENCHMARKS=false
|
|
ARGS=()
|
|
for arg in "$@"; do
|
|
if [[ "$arg" == "--benchmarks" ]]; then
|
|
INCLUDE_BENCHMARKS=true
|
|
else
|
|
ARGS+=("$arg")
|
|
fi
|
|
done
|
|
|
|
# When --benchmarks is passed, set env var so jest.config.js includes benchmark tests
|
|
if [[ "$INCLUDE_BENCHMARKS" == true ]]; then
|
|
FANTOM_INCLUDE_BENCHMARKS=1 yarn jest --config private/react-native-fantom/config/jest.config.js "${ARGS[@]}"
|
|
else
|
|
yarn jest --config private/react-native-fantom/config/jest.config.js "${ARGS[@]}"
|
|
fi
|