ci: switch back to using bionic agent for x64 linux (#38)

This commit is contained in:
Robo 2023-07-18 10:20:30 -07:00 коммит произвёл GitHub
Родитель 28d7221b71
Коммит c6b5814435
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 91 добавлений и 2 удалений

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -1,11 +1,11 @@
jobs:
- job: focal_x64
- job: bionic_x64
pool:
vmImage: 'ubuntu-latest'
steps:
- template: build.yml
parameters:
arch: focal-x64
arch: bionic-x64
- job: centos7_devtoolset8_x64
pool:

86
bionic-x64/Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,86 @@
ARG REPO=mcr.microsoft.com/mirror/docker/library/ubuntu
ARG TAG=18.04
FROM ${REPO}:${TAG}
ARG DEBIAN_FRONTEND=noninteractive
RUN groupadd --gid 1000 builduser \
&& useradd --uid 1000 --gid builduser --shell /bin/bash --create-home builduser \
&& mkdir -p /setup
# Set up TEMP directory
ENV TEMP=/tmp
RUN chmod a+rwx /tmp
# Latest stable git
RUN apt-get update && apt-get install -y software-properties-common
RUN add-apt-repository ppa:git-core/ppa -y
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
file \
git \
gnome-keyring \
iproute2 \
libfuse2 \
libgconf-2-4 \
libgdk-pixbuf2.0-0 \
libgl1 \
libgtk-3.0 \
libsecret-1-dev \
libssl-dev \
libx11-dev \
libx11-xcb-dev \
libxkbfile-dev \
locales \
lsb-release \
lsof \
python-dbus \
python3-pip \
sudo \
wget \
xvfb \
tzdata \
unzip \
&& curl https://chromium.googlesource.com/chromium/src/+/HEAD/build/install-build-deps.sh\?format\=TEXT | base64 --decode | cat > /setup/install-build-deps.sh \
&& curl https://chromium.googlesource.com/chromium/src/+/HEAD/build/install-build-deps.py\?format\=TEXT | base64 --decode | cat > /setup/install-build-deps.py \
# Remove snapcraft to avoid issues on docker build
&& sed -i 's/packages.append("snapcraft")/#packages.append("snapcraft")/g' /setup/install-build-deps.py \
&& chmod +x /setup/install-build-deps.sh \
&& chmod +x /setup/install-build-deps.py \
&& bash /setup/install-build-deps.sh --no-syms --no-prompt --no-chromeos-fonts --no-arm --no-nacl \
&& rm -rf /var/lib/apt/lists/*
# Yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt-get install -y yarn
# No Sudo Prompt
RUN echo 'builduser ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-builduser \
&& echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep
# Dotnet
RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN apt-get update && apt-get install -y dotnet-sdk-2.1
# Set python3 as default
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
RUN python --version
# Add xvfb init script
COPY xvfb-init.sh /etc/init.d/xvfb
RUN chmod a+x /etc/init.d/xvfb
# Setup dbus path
RUN sudo mkdir -p /var/run/dbus
# Check compiler toolchain
RUN gcc --version
RUN g++ --version
USER builduser
WORKDIR /home/builduser

3
bionic-x64/xvfb-init.sh Executable file
Просмотреть файл

@ -0,0 +1,3 @@
XVFB=/usr/bin/Xvfb
XVFBARGS=":10 -ac -screen 0 1280x800x24 -nolisten tcp -dpi 96 +extension RANDR"
/sbin/start-stop-daemon --start --quiet --background --exec $XVFB -- $XVFBARGS