Files
ci-emsdk/Dockerfile
Alon Zakai 38dcc11b1d Re-land #200 : waterfall fastcomp support (#204)
(This was reverted by mistake. It had a bad commit message though, so relanding with a nicer one is nice anyhow.)

With this, we can do emsdk install latest-fastcomp and it installs fastcomp from the waterfall. That is, we then have 3 main sdks people might want to use:

* latest which installs fastcomp-llvm (plus emscripten etc.) from the mozilla infrastructure. (fetches the last emscripten version there)
* latest-upstream which installs upstream-llvm (plus emscripten etc.) from the waterfall infrastructure. (fetches the last known good revision (lkgr) there)
* latest-fastcomp which installs fastcomp-llvm (plus emscripten etc.) from the waterfall infrastructure. (fetches the last known good revision (lkgr) there)

The first and last are currently somewhat overlapping in that both fetch a build of fastcomp. However, as we transition away from the mozilla infrastructure, we could just make latest an alias for latest-fastcomp. (And later, when we're ready to switch to the wasm backend by default, the alias could switch to latest-upstream.)
2019-01-08 13:46:53 -08:00

30 lines
1.0 KiB
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 update-tags \
&& echo "test latest" \
&& /root/emsdk/emsdk install latest \
&& /root/emsdk/emsdk activate latest \
&& source /root/emsdk/emsdk_env.sh --build=Release \
&& emcc hello_world.cpp \
&& echo "test upstream (waterfall)" \
&& /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 \
&& echo "test fastcomp (waterfall)" \
&& /root/emsdk/emsdk install latest-fastcomp \
&& /root/emsdk/emsdk activate latest-fastcomp \
&& source /root/emsdk/emsdk_env.sh --build=Release \
&& emcc hello_world.cpp \
&& emcc hello_world.cpp -s WASM=0