Update package.json to avoid failing build #69
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: Generate Binaryen.js | |
on: | |
push: | |
branches-ignore: | |
- main | |
jobs: | |
build: | |
name: "Build with emsdk" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup node.js | |
uses: actions/[email protected] | |
with: | |
node-version: "16" | |
check-latest: true | |
- name: "Set up emsdk" | |
run: | | |
mkdir $HOME/emsdk | |
git clone --depth 1 https://github.com/emscripten-core/emsdk.git $HOME/emsdk | |
$HOME/emsdk/emsdk install 3.1.17 | |
$HOME/emsdk/emsdk activate 3.1.17 | |
echo "$HOME/emsdk" >> $GITHUB_PATH | |
- name: "Set up CMake" | |
run: | | |
mkdir $HOME/cmake | |
wget -qO- https://github.com/Kitware/CMake/releases/download/v3.21.4/cmake-3.21.4-Linux-x86_64.tar.gz | tar -xzC $HOME/cmake --strip-components 1 | |
echo "$HOME/cmake/bin" >> $GITHUB_PATH | |
- name: Checkout project | |
uses: actions/[email protected] | |
with: | |
submodules: "recursive" | |
- name: "Build binaryen.es5.js" | |
run: | | |
mkdir ./binaryen/build | |
cd ./binaryen/build | |
source $HOME/emsdk/emsdk_env.sh | |
emcc --version | |
emcmake cmake .. -DCMAKE_BUILD_TYPE=Release -DJS_OF_OCAML=ON -DBUILD_TOOLS=OFF -DBUILD_TESTS=OFF | |
emmake make -j2 binaryen_js | |
cd ../.. | |
mv ./binaryen/build/bin/binaryen_js.js binaryen.es5.js | |
# Setup a "bot" name & email for our commit step | |
# using the GitHub Actions bot user: https://github.community/t/github-actions-bot-email-address/17204/6 | |
- name: Configure git | |
run: | | |
git config --global user.name github-actions[bot] | |
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com | |
# Only commit if there's a change. Ref https://stackoverflow.com/a/8123841 | |
- name: Commit binaryen.es5.js | |
run: | | |
git add binaryen.es5.js | |
git diff-index --quiet HEAD || git commit -m 'chore: Rebuild binaryen.es5.js' | |
git push |