1FROM ubuntu:22.04 2 3ARG DEBIAN_FRONTEND=noninteractive 4RUN apt-get update && apt-get install -y --no-install-recommends \ 5 g++ \ 6 make \ 7 ninja-build \ 8 file \ 9 curl \ 10 ca-certificates \ 11 python3 \ 12 git \ 13 cmake \ 14 libssl-dev \ 15 sudo \ 16 xz-utils \ 17 tidy \ 18 \ 19# Install dependencies for chromium browser 20 gconf-service \ 21 libasound2 \ 22 libatk1.0-0 \ 23 libatk-bridge2.0-0 \ 24 libc6 \ 25 libcairo2 \ 26 libcups2 \ 27 libdbus-1-3 \ 28 libexpat1 \ 29 libfontconfig1 \ 30 libgbm1 \ 31 libgcc1 \ 32 libgconf-2-4 \ 33 libgdk-pixbuf2.0-0 \ 34 libglib2.0-0 \ 35 libgtk-3-0 \ 36 libnspr4 \ 37 libpango-1.0-0 \ 38 libpangocairo-1.0-0 \ 39 libstdc++6 \ 40 libx11-6 \ 41 libx11-xcb1 \ 42 libxcb1 \ 43 libxcomposite1 \ 44 libxcursor1 \ 45 libxdamage1 \ 46 libxext6 \ 47 libxfixes3 \ 48 libxi6 \ 49 libxrandr2 \ 50 libxrender1 \ 51 libxss1 \ 52 libxtst6 \ 53 fonts-liberation \ 54 libappindicator1 \ 55 libnss3 \ 56 lsb-release \ 57 xdg-utils \ 58 wget \ 59 && rm -rf /var/lib/apt/lists/* 60 61COPY scripts/sccache.sh /scripts/ 62RUN sh /scripts/sccache.sh 63 64COPY host-x86_64/x86_64-gnu-tools/checktools.sh /tmp/ 65 66RUN curl -sL https://nodejs.org/dist/v14.20.0/node-v14.20.0-linux-x64.tar.xz | tar -xJ 67ENV NODE_FOLDER=/node-v14.20.0-linux-x64/bin 68ENV PATH="$NODE_FOLDER:${PATH}" 69 70COPY host-x86_64/x86_64-gnu-tools/browser-ui-test.version /tmp/ 71 72# For now, we need to use `--unsafe-perm=true` to go around an issue when npm tries 73# to create a new folder. For reference: 74# https://github.com/puppeteer/puppeteer/issues/375 75# 76# We also specify the version in case we need to update it to go around cache limitations. 77# 78# The `browser-ui-test.version` file is also used by bootstrap to emit warnings in case 79# the local version of the package is different than the one used by the CI. 80RUN npm install -g browser-ui-test@$(head -n 1 /tmp/browser-ui-test.version) --unsafe-perm=true 81 82ENV RUST_CONFIGURE_ARGS \ 83 --build=x86_64-unknown-linux-gnu \ 84 --save-toolstates=/tmp/toolstate/toolstates.json 85 86ENV SCRIPT /tmp/checktools.sh ../x.py && \ 87 NODE_PATH=`npm root -g` python3 ../x.py test tests/rustdoc-gui --stage 2 \ 88 --test-args "'--no-sandbox --jobs 1'" 89