build-wasm #10
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: 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: Download TexLive Full | |
run: make source/texmfrepo.txt | |
- name: Install TexLive | |
env: | |
MAKEFLAGS: ${{env.MAKE_PARALLELISM}} | |
run: make build/texlive-basic.txt build/texlive-full.txt | |
# - name: Archive native artifacts | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: native_build | |
# path: | | |
# build/texlive-basic/ | |
# build/native/busytex | |
- name: Create packages and dist | |
run: | | |
make build/wasm/texlive-basic.js | |
make -e TEXMFFULL=build/texlive-full $(printf "build/wasm/ubuntu-%s.js " $UBUNTUPACKAGES) | |
make dist-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 |