Skip to content

Commit

Permalink
Temporary fix for Linux CI build
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stakx committed May 1, 2020
1 parent db192c0 commit f90c5d9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
7 changes: 4 additions & 3 deletions appveyor.yml
Expand Up @@ -20,9 +20,10 @@ for:

# build and run tests
build_script:
- uname -a
- mono --version
- ./build.sh
- docker run --rm -i -v "$APPVEYOR_BUILD_FOLDER":/project ubuntu:18.04 /project/build.sh
# - uname -a
# - mono --version
# - ./build.sh

# upload test results
after_build:
Expand Down
29 changes: 29 additions & 0 deletions build.sh
Expand Up @@ -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"
Expand Down

0 comments on commit f90c5d9

Please sign in to comment.