Skip to content

Commit

Permalink
Fix dotnet availability
Browse files Browse the repository at this point in the history
  • Loading branch information
Kielek committed Nov 19, 2024
1 parent b96aeec commit 698a86c
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build-ubuntu1604-native-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
43 changes: 43 additions & 0 deletions docker/ubuntu1604.dockerfile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 698a86c

Please sign in to comment.