From 66d75eaf6aaed204ad2b7b3567f4165ace5e6db8 Mon Sep 17 00:00:00 2001 From: stakx Date: Fri, 1 May 2020 21:49:54 +0200 Subject: [PATCH] Temporary fix for Linux CI build Appveyor currently uses a Mono version (6.8) that is affected by a regression which fails our CI test run. We need to fall back to an older version. The last one known to not cause problems is 6.0.0.319. Uninstalling Mono on Appveyor's Ubuntu images turns out to be rather difficult, so I am giving up that approach for the moment. Let's use Docker to get a clean build environment. Unfortunately, this means having to install everything ourselves (Mono, .NET Core SDK and runtime), which adds several 1,000 lines of uninteresting garbage to the build log. But it appears to work. We might want to create a clean Docker image that has all dependencies preinstalled. --- appveyor.yml | 5 +++-- build.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 926c93a873..f75d5dfd24 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,8 +21,9 @@ for: # build and run tests build_script: - uname -a - - mono --version - - ./build.sh + # - mono --version + # - ./build.sh + - docker run --rm -i -v "$APPVEYOR_BUILD_FOLDER":/project ubuntu:18.04 /project/build.sh # upload test results after_build: diff --git a/build.sh b/build.sh index 930bb4b77e..f629a850cc 100755 --- a/build.sh +++ b/build.sh @@ -14,6 +14,35 @@ # limitations under the License. # **************************************************************************** +set -ex + +# Install Mono: +apt-get update +DEBIAN_FRONTEND=noninteractive apt-get -y install gnupg ca-certificates +apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic/snapshots/6.0.0.319 main" | tee /etc/apt/sources.list.d/mono-official-stable.list +apt update +DEBIAN_FRONTEND=noninteractive apt -y install mono-devel=6.0.0.* + +# Install .NET Core SDK: +DEBIAN_FRONTEND=noninteractive apt-get -y install software-properties-common wget +wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb +dpkg -i packages-microsoft-prod.deb +add-apt-repository universe +apt-get update +DEBIAN_FRONTEND=noninteractive apt-get -y install apt-transport-https +DEBIAN_FRONTEND=noninteractive apt-get -y install dotnet-sdk-3.1 + +# Install .NET Core 1.1 runtime: +apt-get update +DEBIAN_FRONTEND=noninteractive apt-get -y install libunwind-dev +cd /usr/share/dotnet +wget https://download.visualstudio.microsoft.com/download/pr/d3bbce9c-a15e-4224-a271-064546459e53/694a1c880d7140c80215acb5dceab3db/dotnet-ubuntu.18.04-x64.1.1.13.tar.gz -O dotnet-ubuntu.18.04-x64.1.1.13.tar.gz +tar xvzf dotnet-ubuntu.18.04-x64.1.1.13.tar.gz + + +cd /project + DOTNETPATH=$(which dotnet) if [ ! -f "$DOTNETPATH" ]; then echo "Please install Microsoft/netcore from: https://www.microsoft.com/net/core"