From d27a07b2b05abb6b147c2accf42643a077145038 Mon Sep 17 00:00:00 2001 From: Afshin Arani Date: Mon, 21 Aug 2023 12:32:26 +0330 Subject: [PATCH] CI: build snap packages with stockdotnet6+xbuild --- .github/workflows/CI.yml | 9 ++++----- scripts/snap_build.sh | 2 +- scripts/snap_install_as_docker.sh | 2 -- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6978d3f7a..d64fa2de3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -640,15 +640,14 @@ jobs: - name: Install snap tools run: | sudo apt update - sudo ./scripts/install_mono_from_microsoft_deb_packages.sh ./scripts/install_snapcraft.sh - # hack to disable dotnet detection (can't use apt purge because github VM seems to have it installed in different way) - # NOTE: you might think an easier way to do this would be use container:\nimage: ubuntu22.04 and then not install dotnet pkg, + # hack to disable msbuild detection + # NOTE: you might think an easier way to do this would be use container:\nimage: ubuntu22.04 and then not install msbuild, # but that doesn't work because we get the following error when trying to install snapcraft via `snap install --classic`: # > error: cannot communicate with server: Post "http://localhost/v2/snaps/snapcraft": dial unix /run/snapd.socket: connect: no such file or directory - - name: HACK to emulate dotnet uninstall - run: sudo rm `which dotnet` + - name: HACK to emulate msbuild uninstall + run: sudo rm `which msbuild` - name: Generate snap package run: | diff --git a/scripts/snap_build.sh b/scripts/snap_build.sh index f73636d6c..2a6c07e3a 100755 --- a/scripts/snap_build.sh +++ b/scripts/snap_build.sh @@ -3,7 +3,7 @@ set -euxo pipefail # this is the equivalent of using the 'build-packages' (not stage-packages) section in snapcraft # but as we're not using the 'make' plugin, we need to this manually now -DEBIAN_FRONTEND=noninteractive sudo apt install -y fsharp build-essential pkg-config cli-common-dev mono-devel libgtk2.0-cil-dev +DEBIAN_FRONTEND=noninteractive sudo apt install -y fsharp build-essential pkg-config cli-common-dev mono-devel libgtk2.0-cil-dev dotnet6 # just in case this is a retry-run, we want to clean artifacts from previous try rm -rf ./staging diff --git a/scripts/snap_install_as_docker.sh b/scripts/snap_install_as_docker.sh index 3d54327a4..92ea1cd26 100755 --- a/scripts/snap_install_as_docker.sh +++ b/scripts/snap_install_as_docker.sh @@ -133,7 +133,5 @@ echo " done" $SUDO docker exec $CONTNAME snap install core || clean_up echo "container $CONTNAME started ..." -$SUDO docker exec $CONTNAME scripts/install_mono_from_microsoft_deb_packages.sh - print_info rm_builddir