Skip to content

Commit 368caee

Browse files
committed
mono: switch to MSBuild
Mono version coming with Ubuntu 22.04 is an outdated and have bugs like inability to handle escaped semicolons (https://github.com/mono/mono/pull/1580/files). Bump to Mono 6.12 and switch to MSBuild (since xbuild is outdated). Signed-off-by: Lev Stipakov <[email protected]>
1 parent 3c3c47c commit 368caee

File tree

2 files changed

+28
-13
lines changed

2 files changed

+28
-13
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,30 @@ on:
66

77
jobs:
88
ubuntu:
9-
runs-on: ubuntu-latest
9+
runs-on: ubuntu-22.04
1010
steps:
11-
- uses: actions/checkout@v3
12-
- name: Install dependencies
13-
run: sudo apt-get update && sudo apt-get install mono-devel
14-
- name: Build
15-
run: ./build.sh
11+
- name: Checkout Repository
12+
uses: actions/checkout@v4
13+
14+
- name: Install Latest Mono & MSBuild
15+
run: |
16+
sudo apt update
17+
sudo apt install -y gnupg ca-certificates
18+
19+
sudo gpg --homedir /tmp --no-default-keyring \
20+
--keyring /usr/share/keyrings/mono-official-archive-keyring.gpg \
21+
--keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
22+
23+
echo \
24+
"deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | \
25+
sudo tee /etc/apt/sources.list.d/mono-official-stable.list
26+
27+
# Update and install Mono & MSBuild
28+
sudo apt update
29+
sudo apt install -y mono-devel msbuild
30+
31+
- name: Build
32+
run: ./build.sh
1633

1734
win:
1835
runs-on: windows-latest

build.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
set -eux
44

5-
xbuild /p:Configuration=Release "/p:Platform=Any CPU" OpenVpnService.sln
6-
xbuild /p:Configuration=Release "/p:Platform=x86" OpenVpnService.sln
7-
xbuild /p:Configuration=Release "/p:Platform=x64" OpenVpnService.sln
8-
9-
xbuild /p:Configuration=Debug "/p:Platform=Any CPU" OpenVpnService.sln
10-
xbuild /p:Configuration=Debug "/p:Platform=x86" OpenVpnService.sln
11-
xbuild /p:Configuration=Debug "/p:Platform=x64" OpenVpnService.sln
5+
for config in Release Debug; do
6+
for platform in "Any CPU" x86 x64; do
7+
msbuild /p:Configuration=$config /p:Platform="$platform" OpenVpnService.sln
8+
done
9+
done

0 commit comments

Comments
 (0)