Update emsdk version #349
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Esy | |
on: | |
- push | |
- pull_request | |
jobs: | |
build: | |
name: Build and test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- name: Setup node.js | |
uses: actions/[email protected] | |
with: | |
node-version: "16" | |
check-latest: true | |
# Install `esy` to build the project | |
# It also adds `shx` globally for cross-platform shell commands | |
- name: Setup environment | |
run: | | |
npm i -g esy | |
npm i -g shx | |
- name: Checkout project | |
uses: actions/[email protected] | |
with: | |
submodules: "recursive" | |
- name: Install local dependencies | |
run: | | |
esy install | |
- name: Esy cache | |
id: esy-cache | |
uses: actions/[email protected] | |
with: | |
path: _export | |
key: ${{ runner.os }}-esy-${{ hashFiles('esy.lock/index.json') }} | |
- name: Import esy cache | |
if: steps.esy-cache.outputs.cache-hit == 'true' | |
run: | | |
esy import-dependencies _export | |
shx rm -rf _export | |
# Build the project in release to make sure deps are specified correctly | |
- name: Build release dependencies | |
if: steps.esy-cache.outputs.cache-hit != 'true' | |
run: | | |
esy build-dependencies --release | |
- name: Build project in release | |
run: | | |
esy build --release | |
# Then build in non-release so we can test | |
- name: Build dependencies | |
if: steps.esy-cache.outputs.cache-hit != 'true' | |
run: | | |
esy build-dependencies | |
- name: Build project | |
run: | | |
esy build | |
# Re-export dependencies if anything has changed or if it is the first time | |
- name: Build esy cache | |
if: steps.esy-cache.outputs.cache-hit != 'true' | |
run: | | |
esy export-dependencies | |
- name: Run tests | |
run: | | |
esy test |