Skip to content

Commit

Permalink
Try to update emsdk version
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
  • Loading branch information
JohnTitor committed Sep 24, 2022
1 parent 1f1527e commit d0868ac
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
3 changes: 2 additions & 1 deletion ci/docker/asmjs-unknown-emscripten/Dockerfile
Expand Up @@ -15,7 +15,8 @@ RUN apt-get install -y --no-install-recommends \
libxml2 \
python3 \
python3-distutils \
xz-utils
xz-utils \
bzip2

COPY emscripten.sh /
RUN bash /emscripten.sh
Expand Down
3 changes: 2 additions & 1 deletion ci/docker/wasm32-unknown-emscripten/Dockerfile
Expand Up @@ -21,7 +21,8 @@ RUN apt-get install -y --no-install-recommends \
cmake \
sudo \
gdb \
xz-utils
xz-utils \
bzip2

RUN ln -s /usr/bin/python3 /usr/bin/python & \
ln -s /usr/bin/pip3 /usr/bin/pip
Expand Down
23 changes: 3 additions & 20 deletions ci/emscripten.sh
Expand Up @@ -2,34 +2,17 @@

set -ex

EMSDK_VERSION=1.39.20

hide_output() {
set +x
on_err="
echo ERROR: An error was encountered with the build.
cat /tmp/build.log
exit 1
"
trap '$on_err' ERR
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
PING_LOOP_PID=$!
"${@}" &> /tmp/build.log
trap - ERR
kill $PING_LOOP_PID
rm -f /tmp/build.log
set -x
}
EMSDK_VERSION=3.1.23

git clone https://github.com/emscripten-core/emsdk.git /emsdk-portable
cd /emsdk-portable
hide_output ./emsdk install "${EMSDK_VERSION}"
./emsdk install "${EMSDK_VERSION}"
./emsdk activate "${EMSDK_VERSION}"

# Compile and cache libc
# shellcheck disable=SC1091
source ./emsdk_env.sh
echo "main(){}" > a.c
echo "int main() {return 0;}" > a.c
HOME=/emsdk-portable/ emcc a.c
rm -f a.*

Expand Down

0 comments on commit d0868ac

Please sign in to comment.