Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,22 @@ jobs:
echo "EM_CONFIG=$EM_CONFIG" >> $GITHUB_ENV
echo "$EMSDK:$EMSDK/upstream/emscripten" >> $GITHUB_PATH

- name: Cache emscripten build products
id: cache-emscripten
uses: actions/cache@v5
env:
cache-name: emscripten-cache
with:
path: ~/emsdk_main/upstream/emscripten/cache
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the path we expect to see? The above has emsdk-main rather than emsdk_main

Copy link
Copy Markdown
Member Author

@JonathanLennox JonathanLennox Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right; fixed to use ${{ env.EMSDK }}

key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.emsdk_version }}

- if: ${{ steps.cache-emscripten.outputs.cache-hit }} == 'true'
name: Run emscripten sanity check after restoring cache
run: |
source "$EMSDK/emsdk_env.sh"
emcc --check
exit $?

- name: Build TS App
run: |
source "$EMSDK/emsdk_env.sh"
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ opus-wasmlib: $(LIBOPUS_WASM_LIB)

# common EMCC options
define EMCC_OPTS
-O2 \
-O3 \
-msimd128 \
-flto \
--minify 0 \
-gsource-map \
-s WASM=1 \
Expand Down Expand Up @@ -109,9 +110,11 @@ $(LIBOPUS_WASM_LIB): $(LIBOPUS_BUILD)/Makefile

libopus-configure: $(LIBOPUS_BUILD)/Makefile

$(LIBOPUS_BUILD)/Makefile: $(LIBOPUS_SRC)/configure
$(LIBOPUS_BUILD)/Makefile: $(LIBOPUS_SRC)/configure
mkdir -p $(LIBOPUS_BUILD)
cd $(LIBOPUS_BUILD); CFLAGS="-O3 -msimd128" emconfigure $(CURDIR)/$(LIBOPUS_SRC)/configure \
cd $(LIBOPUS_BUILD); \
CFLAGS="-O3 -msimd128 -flto" \
emconfigure $(CURDIR)/$(LIBOPUS_SRC)/configure \
--host=wasm32-unknown-emscripten \
--enable-float-approx \
--disable-rtcd \
Expand Down