Files
ci-emsdk/Dockerfile
Alon Zakai 889c1516fb Enable "emsdk [install|activate] latest-upstream" (#195)
This makes it possible to tell the emsdk to get "latest-upstream", which fetches the latest lkgr from there. This will probably be a common use pattern, I expect we may want to recommend users start trying out the wasm backend that way soon. This will also let us simplify this code: https://github.com/kripken/emscripten/blob/incoming/.circleci/config.yml#L334

Aside from adding the "latest-upstream" alias, this PR has

* A few minor cleanups in the emsdk code.
( Minor restructuring of how we define the upstream stuff in the manifest: It seemed odd to have 3 things (clang, emscripten, binaryen) that are all coming from a single archive from the waterfall. Simpler to have just one - the archive is one big lump, there's no way to download just part of it.
* Also add node 8.9.1 as a dependency of the upstream sdk, which makes things usable out of the box (node.js is the one thing not provided by the waterfall archive).
2018-12-20 09:58:37 -08:00

22 lines
716 B
Docker

# For travis
FROM buildpack-deps:xenial
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive LANG=C.UTF-8
RUN mkdir -p /root/emsdk/
COPY . /root/emsdk/
RUN cd /root/ \
&& echo "int main() {}" > hello_world.cpp \
&& apt-get update \
&& apt-get install -y python cmake build-essential openjdk-9-jre-headless \
&& /root/emsdk/emsdk install latest \
&& /root/emsdk/emsdk activate latest \
&& source /root/emsdk/emsdk_env.sh --build=Release \
&& emcc hello_world.cpp \
&& /root/emsdk/emsdk update-tags \
&& /root/emsdk/emsdk install latest-upstream \
&& /root/emsdk/emsdk activate latest-upstream \
&& source /root/emsdk/emsdk_env.sh --build=Release \
&& emcc hello_world.cpp -s WASM_OBJECT_FILES=1