summary refs log tree commit diff
path: root/src/ci/docker/wasm32/Dockerfile
blob: 91c492d03c179dcdc073b1444ea2ad73fcc2e254 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM ubuntu:16.04

RUN apt-get update && apt-get install -y --no-install-recommends \
  g++ \
  make \
  file \
  curl \
  ca-certificates \
  python3 \
  git \
  cmake \
  sudo \
  gdb \
  xz-utils \
  bzip2

COPY scripts/emscripten.sh /scripts/
RUN bash /scripts/emscripten.sh

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

# emcc seems to need python to specifically be "python" and not "python3"
RUN ln `which python3` /usr/bin/python

ENV PATH=$PATH:/emsdk-portable
ENV PATH=$PATH:/emsdk-portable/upstream/emscripten/
ENV PATH=$PATH:/emsdk-portable/node/12.9.1_64bit/bin/
ENV BINARYEN_ROOT=/emsdk-portable/upstream/

ENV TARGETS=wasm32-unknown-emscripten

# Use -O1 optimizations in the link step to reduce time spent optimizing.
ENV EMCC_CFLAGS=-O1

# Emscripten installation is user-specific
ENV NO_CHANGE_USER=1

# FIXME: Re-enable these tests once https://github.com/rust-lang/cargo/pull/7476
# is picked up by CI
ENV SCRIPT python3 ../x.py test --target $TARGETS \
    --exclude src/libcore \
    --exclude src/liballoc \
    --exclude src/libproc_macro \
    --exclude src/libstd \
    --exclude src/libterm \
    --exclude src/libtest