diff --git a/.github/workflows/emscripten-report.yml b/.github/workflows/emscripten-report.yml index 9e81701..c0acb2b 100644 --- a/.github/workflows/emscripten-report.yml +++ b/.github/workflows/emscripten-report.yml @@ -26,8 +26,8 @@ jobs: run: | git clone https://github.com/emscripten-core/emsdk.git cd emsdk - ./emsdk install latest - ./emsdk activate latest + ./emsdk install 3.1.35 + ./emsdk activate 3.1.35 source ./emsdk_env.sh emcc -v diff --git a/Dockerfile.emscripten b/Dockerfile.emscripten new file mode 100644 index 0000000..fb13f85 --- /dev/null +++ b/Dockerfile.emscripten @@ -0,0 +1,34 @@ +FROM ubuntu:22.04 + +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update \ + && apt install -y --no-install-recommends \ + python3 git openssl ca-certificates xz-utils \ + bzip2 cmake make + +# Set the working directory to root (ie $HOME) +WORKDIR root + +COPY test test +COPY fuzz fuzz +COPY CMakeLists.txt CMakeLists.txt +COPY scripts scripts +COPY src src + +RUN git clone https://github.com/emscripten-core/emsdk.git + +SHELL ["/bin/bash", "-c"] +# install tool +RUN cd emsdk \ + && ./emsdk install 3.1.35 \ + && ./emsdk activate 3.1.35 \ + && source ./emsdk_env.sh \ + && emcc -v + +#Setup cmake +RUN source ./emsdk/emsdk_env.sh \ + && emcmake cmake -DBuildTest=TRUE -B build . + +# build with make +RUN source ./emsdk/emsdk_env.sh \ + && emmake make -C build \ No newline at end of file