diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b03767a..d58ebc8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -808,7 +808,6 @@ jobs: pushd deps/PawPaw; source local.env wasm; popd make features make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) - make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) -C src/CardinalMiniSep modgui - name: Make wasm versioned and compress if: steps.cache.outputs.cache-hit == 'true' run: | @@ -832,7 +831,7 @@ jobs: - name: Pack binaries if: steps.cache.outputs.cache-hit == 'true' run: | - cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm) CardinalMini.lv2/modgui + cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm) - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }} @@ -848,6 +847,91 @@ jobs: files: | *.zip + wasm-noopt: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Set up cache + id: cache + uses: actions/cache@v3 + with: + path: | + ~/PawPawBuilds + src/Rack/dep/bin + src/Rack/dep/include + src/Rack/dep/lib + src/Rack/dep/share + src/Rack/dep/jansson-2.12 + src/Rack/dep/libarchive-3.4.3 + src/Rack/dep/libsamplerate-0.1.9 + src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 + src/Rack/dep/zstd-1.4.5 + key: wasm-noopt-v${{ env.CACHE_VERSION }} + - name: Set up dependencies + run: | + sudo apt-get update -qq + sudo apt-get install -yqq brotli gperf + sudo apt-get clean + [ -e ~/PawPawBuilds/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/PawPawBuilds/emsdk + cd ~/PawPawBuilds/emsdk && ./emsdk install ${{ env.EMSCRIPTEN_VERSION }} && ./emsdk activate ${{ env.EMSCRIPTEN_VERSION }} + - name: Build extra dependencies + env: + PAWPAW_NOSIMD: 1 + run: | + source ~/PawPawBuilds/emsdk/emsdk_env.sh + ./deps/PawPaw/bootstrap-cardinal.sh wasm && ./deps/PawPaw/.cleanup.sh wasm + - name: Build wasm-noopt cross-compiled + if: steps.cache.outputs.cache-hit == 'true' + env: + NOSIMD: true + WITH_LTO: false + run: | + source ~/PawPawBuilds/emsdk/emsdk_env.sh + pushd deps/PawPaw; source local.env wasm; popd + make features + make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) + make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) -C src/CardinalMiniSep modgui + - name: Make wasm-noopt versioned and compress + if: steps.cache.outputs.cache-hit == 'true' + run: | + VERSION=$(cat Makefile | awk 'sub("VERSION = ","")') + cd bin + sed -i "s/CardinalMini\./CardinalMini-noopt-v${VERSION}\./g" *.html *.js + sed -i "s/CardinalNative\./CardinalNative-noopt-v${VERSION}\./g" *.html *.js + mv CardinalMini.data CardinalMini-noopt-v${VERSION}.data + mv CardinalMini.js CardinalMini-noopt-v${VERSION}.js + mv CardinalMini.wasm CardinalMini-noopt-v${VERSION}.wasm + mv CardinalNative.data CardinalNative-noopt-v${VERSION}.data + mv CardinalNative.js CardinalNative-noopt-v${VERSION}.js + mv CardinalNative.wasm CardinalNative-noopt-v${VERSION}.wasm + brotli -k -q 11 *.data *.html *.js *.wasm + - name: Set sha8 (non-release) + if: startsWith(github.ref, 'refs/tags/') != true + run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV + - name: Set sha8 (release) + if: startsWith(github.ref, 'refs/tags/') + run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV + - name: Pack binaries + if: steps.cache.outputs.cache-hit == 'true' + run: | + cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-noopt-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm-noopt) CardinalMini.lv2/modgui + - uses: actions/upload-artifact@v3 + with: + name: ${{ github.event.repository.name }}-wasm-noopt-${{ github.event.pull_request.number || env.SHA8 }} + path: | + *.zip + - uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + tag_name: ${{ github.ref_name }} + name: ${{ github.ref_name }} + draft: false + prerelease: false + files: | + *.zip + win32: runs-on: ubuntu-22.04 steps: diff --git a/deps/PawPaw b/deps/PawPaw index 63bf2d8..1658398 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit 63bf2d8e954cc7838f5d9df9b14e4d460abca942 +Subproject commit 1658398aa4d2b9c02dfe5602c9dd3eca18260503