build-wasm #3
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: build-wasm | |
on: | |
workflow_dispatch: | |
inputs: | |
busytexreleasetag: | |
description: 'busytex release tag' | |
required: false | |
default: 'build_native_1e26725a948d524525b696807689387a673c4fe6_6276429335_1' | |
#default: 'build_1c187d6a3a4bc48787e9def12554eb0dc8740b93' | |
env: | |
# texlive-base | |
UBUNTUPACKAGES: texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-science texlive-fonts-recommended | |
# EMSCRIPTEN_VERSION: 2.0.30 | |
EMSCRIPTEN_VERSION: 3.1.43 | |
MAKE_PARALLELISM: -j2 | |
jobs: | |
build-wasm: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install Prerequisites | |
run: sudo apt-get install -y gperf p7zip-full strace icu-devtools | |
- name: Setup Emscripten | |
uses: mymindstorm/setup-emsdk@v10 | |
with: | |
version: ${{env.EMSCRIPTEN_VERSION}} | |
- uses: actions/checkout@v2 | |
- name: Check URLs exist | |
run: make checkurlsfor404 || make checkurlsfor404 || make checkurlsfor404 | |
- name: Clone/patch TexLive and dependencies | |
run: make source/texlive.downloaded build/versions.txt | |
- name: Download native binaries | |
run: make URLRELEASE=https://github.com/busytex/busytex/releases/download/${{ github.event.inputs.busytexreleasetag }} download-native | |
- name: Build wasm busytex | |
env: | |
MAKEFLAGS: ${{env.MAKE_PARALLELISM}} | |
run: make wasm | |
- name: Create Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: chown $(whoami) -R . && gh --version && gh release create build_wasm_${{github.sha}}_${{ github.run_id }}_${{ github.run_attempt }} -t "Wasm assets" build/wasm/busytex.js build/wasm/busytex.wasm |