use emsdk instead of emscripten debian package
Build Container Image / build_amd64 (push) Successful in 1m30s Details
Build Container Image / build_manifest (push) Successful in 6s Details
Build Container Image / publish_amd64 (push) Successful in 44s Details
Build Container Image / publish_manifest (push) Successful in 19s Details

This commit is contained in:
Daniel Wolf 2023-11-07 16:30:02 -05:00
parent 7b2d361be8
commit 6283095056
Signed by: nephatrine
GPG Key ID: 59D70EC2E4AAB4D0
2 changed files with 7 additions and 6 deletions

View File

@ -5,12 +5,13 @@
FROM nephatrine/nxbuilder:debian
LABEL maintainer="Daniel Wolf <nephatrine@gmail.com>"
ARG DEBIAN_FRONTEND=noninteractive
ENV EMSCRIPTEN_PATH=/opt/emsdk
RUN echo "====== INSTALL EMSCRIPTEN ======" \
&& apt-get update \
&& apt-get -o Dpkg::Options::="--force-confnew" install -y --no-install-recommends emscripten \
&& apt-get autoremove -y && apt-get clean \
&& git -C /opt clone https://github.com/emscripten-core/emsdk.git && cd /opt/emsdk \
&& ./emsdk install latest --shallow --generator=Ninja \
&& ./emsdk activate latest \
&& rm -rf /tmp/* /var/tmp/*
ENV PATH=${EMSCRIPTEN_PATH}:${EMSCRIPTEN_PATH}/upstream/emscripten:$PATH
ENV WASI_VERSION=20
RUN echo "====== INSTALL WASI-SDK ======" \
@ -26,7 +27,7 @@ RUN echo "====== TEST TOOLCHAINS ======" \
&& git -C ${HOME} clone --single-branch --depth=1 https://code.nephatrine.net/nephatrine/hello-test.git \
&& mkdir /tmp/build-emscripten && cd /tmp/build-emscripten \
&& nxbuild-emscripten -GNinja ${HOME}/hello-test \
&& ninja && file HelloTest \
&& ninja && node HelloTest \
&& mkdir /tmp/build-wasi && cd /tmp/build-wasi \
&& nxbuild-wasi -GNinja ${HOME}/hello-test \
&& echo ninja \

View File

@ -2,4 +2,4 @@
# SPDX-FileCopyrightText: 2023 Daniel Wolf <nephatrine@gmail.com>
#
# SPDX-License-Identifier: ISC
/usr/bin/cmake -DEMSCRIPTEN_SYSTEM_PROCESSOR="wasm32" -DCMAKE_TOOLCHAIN_FILE="/usr/share/emscripten/cmake/Modules/Platform/Emscripten.cmake" $@
${EMSCRIPTEN_PATH}/upstream/emscripten/emcmake /usr/bin/cmake -DEMSCRIPTEN_SYSTEM_PROCESSOR="wasm32" $@