From a2338c49f5f6f5e284ebda27b8bf5bec452b22d9 Mon Sep 17 00:00:00 2001 From: Afshin Arani Date: Fri, 26 May 2023 17:12:31 +0330 Subject: [PATCH] DotNetRGS: add ci --- .github/workflows/CI.yaml | 24 +++++++++++++++++++ ...nstall_mono_from_microsoft_deb_packages.sh | 17 +++++++++++++ 2 files changed, 41 insertions(+) create mode 100755 scripts/install_mono_from_microsoft_deb_packages.sh diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index d2a75d6..5d8da90 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -19,3 +19,27 @@ jobs: run: dotnet restore ./DotNetRGS.Server/DotNetRGS.Server.fsproj - name: Build run: dotnet build ./DotNetRGS.Server/DotNetRGS.Server.fsproj --no-restore + build-dotnetrgs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: 'true' + - name: install missing dependencies + run: sudo apt install --yes fsharp + - name: install last version of mono (Microsoft APT repositories) + run: sudo ./scripts/install_mono_from_microsoft_deb_packages.sh + - name: check mono version + run: mono --version + - name: Build geewallet + run: | + cd geewallet + ./configure.sh + make release + - uses: nuget/setup-nuget@v1 + with: + nuget-version: '6.5.0' + - name: Restore dependencies + run: nuget restore ./DotNetRGS/DotNetRGS.fsproj + - name: Build + run: msbuild ./DotNetRGS/DotNetRGS.fsproj /p:Configuration=Release diff --git a/scripts/install_mono_from_microsoft_deb_packages.sh b/scripts/install_mono_from_microsoft_deb_packages.sh new file mode 100755 index 0000000..6dda675 --- /dev/null +++ b/scripts/install_mono_from_microsoft_deb_packages.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +set -euxo pipefail + +# Microsoft's APT repository for 20.04 is same as for 22.04 +#source /etc/os-release + +# required by apt-key +apt install -y gnupg2 +# required by apt-update when pulling from mono-project.com +apt install -y ca-certificates + +# taken from http://www.mono-project.com/download/stable/#download-lin +apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | tee /etc/apt/sources.list.d/mono-official-stable.list +apt update +DEBIAN_FRONTEND=noninteractive apt install -y mono-devel fsharp +mono --version