Files
yoga/.github/actions/setup-js/action.yml
Nick Gerleman 0d03d8a06d Manage native build toolchain (#1506)
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1506

In order to build the website, you must build a Yoga binary. This usually requires installing native toolchains.

We have warning messages for these right now, but an even better solution is to just manage the dependencies ourselves. This does that, bringing in specific CMake and Ninja binaries from NPM, and caching a local copy of Emscripten during the build.

A downside is that the CMake packages are chunky, so we add 130MB to node_modules (for a repo total around 350MB). This also delays acquiring Emscripten (which is even chunkier) in CI builds until it is needed, and I added some caching for it as well.

The upside of JS users being able to run and test (inc the website) without installing and managing their own versions of toolchains is a real time-saver though, and is probably worth it.

allow-large-files

Reviewed By: yungsters

Differential Revision: D52013026

fbshipit-source-id: 3d307f751463a21c5e5d5b98b8e9e63db9d3d52e
2023-12-12 09:06:58 -08:00

19 lines
421 B
YAML

name: Setup JavaScript envirionment
runs:
using: "composite"
steps:
- name: Setup Node environment
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
cache-dependency-path: yarn.lock
env:
# https://github.com/actions/setup-node/issues/317
FORCE_COLOR: 0
- name: yarn install
shell: bash
run: yarn install --frozen-lockfile