diff --git a/.github/workflows/build-ubuntu1604-native-container.yml b/.github/workflows/build-ubuntu1604-native-container.yml index 02a1c66074..8acb365b59 100644 --- a/.github/workflows/build-ubuntu1604-native-container.yml +++ b/.github/workflows/build-ubuntu1604-native-container.yml @@ -25,7 +25,7 @@ jobs: set -e docker build -t mybuildimage -f "./docker/ubuntu1604.dockerfile" ./docker docker run -e OS_TYPE=linux-glibc --rm --mount type=bind,source="${GITHUB_WORKSPACE}",target=/project mybuildimage \ - /bin/sh -c 'git config --global --add safe.directory /project && ./build.sh BuildNativeWorkflow' + /bin/sh -c 'export PATH="$PATH:/usr/share/dotnet" && git config --global --add safe.directory /project && ./build.sh BuildNativeWorkflow' - name: Publish native library Linux build if: (${{ job.status }} != 'cancelled') diff --git a/docker/ubuntu1604.dockerfile b/docker/ubuntu1604.dockerfile index 5f1b82332a..c9c1a25d72 100644 --- a/docker/ubuntu1604.dockerfile +++ b/docker/ubuntu1604.dockerfile @@ -1 +1,44 @@ FROM ubuntu:16.04@sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6ffee0d6 + +RUN apt-get update && \ + apt-get install -y \ + apt-transport-https \ + ca-certificates \ + curl \ + git \ + build-essential software-properties-common \ + gnupg \ + libicu-dev + +# Install newer clang +RUN apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main" && \ + apt-get update && \ + apt-get install -y --allow-unauthenticated clang-5.0 && \ + update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 100 && \ + update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-5.0 1000 && \ + update-alternatives --install /usr/bin/clang++ clang /usr/bin/clang-3.8 100 && \ + update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 100 && \ + update-alternatives --install /usr/bin/clang clang /usr/bin/clang-5.0 1000 && \ + update-alternatives --config clang && \ + update-alternatives --config clang++ + +# Install newer g++ +RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ + apt-get update && \ + apt-get install -y g++-9 && \ + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9 + +# Install newer cmake, based on https://apt.kitware.com/ +RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \ + echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ xenial main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null && \ + apt-get update && \ + apt-get install -y --allow-unauthenticated cmake + +RUN curl -sSL https://dot.net/v1/dotnet-install.sh --output dotnet-install.sh \ + && echo "SHA256: $(sha256sum dotnet-install.sh)" \ + && echo "c169af55281cd1e58cdbe3ec95c2480cfb210ee460b3ff1421745c8f3236b263 dotnet-install.sh" | sha256sum -c \ + && chmod +x ./dotnet-install.sh \ + && ./dotnet-install.sh -v 8.0.403 --install-dir /usr/share/dotnet --no-path \ + && rm dotnet-install.sh + +WORKDIR /project