1
+ name : CI/CD
2
+
3
+ on :
4
+ push :
5
+ branches : [ "master" ]
6
+ pull_request :
7
+ branches : [ "master" ]
8
+
9
+ jobs :
10
+ build :
11
+ strategy :
12
+ fail-fast : false
13
+ matrix :
14
+ configuration : [Debug, Release]
15
+ os : [windows-latest, ubuntu-22.04]
16
+ include :
17
+ - os : windows-latest
18
+ native : win-x64
19
+ arm64 : win-arm64
20
+ - os : ubuntu-22.04
21
+ native : linux-x64
22
+ arm64 : linux-arm64
23
+
24
+ runs-on : ${{ matrix.os }}
25
+ steps :
26
+ - name : Checkout
27
+ uses : actions/checkout@v4
28
+ with :
29
+ fetch-depth : 0
30
+
31
+ - name : Build/Publish app (native)
32
+ run : dotnet publish -c ${{ matrix.configuration }}
33
+
34
+ - name : Upload Artifact (native)
35
+ uses : actions/upload-artifact@v4
36
+ with :
37
+ name : OpenPHD2-MultiScope-${{ matrix.configuration }}-${{ matrix.native }}
38
+ path : ' bin/${{ matrix.configuration }}/net8.0/${{ matrix.native }}/publish/'
39
+ retention-days : 5
40
+
41
+ - name : Install prerequisites for Linux ARM64 cross-compile
42
+ run : |
43
+ sudo dpkg --add-architecture arm64
44
+ sudo bash -c 'cat > /etc/apt/sources.list.d/arm64.list <<EOF
45
+ deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc 2>/dev/null) main restricted
46
+ deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc 2>/dev/null)-updates main restricted
47
+ deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc 2>/dev/null)-backports main restricted universe multiverse
48
+ EOF'
49
+ sudo sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
50
+ sudo sed -i -e 's/deb mirror/deb [arch=amd64] mirror/g' /etc/apt/sources.list
51
+ sudo apt-get update
52
+ sudo apt-get install -y clang llvm binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu zlib1g-dev:arm64
53
+ if : runner.os == 'Linux'
54
+
55
+ - name : Build/Publish app (arm64)
56
+ run : dotnet publish -c ${{ matrix.configuration }} -r ${{ matrix.arm64 }}
57
+
58
+ - name : Upload Artifact (arm64)
59
+ uses : actions/upload-artifact@v4
60
+ with :
61
+ name : OpenPHD2-MultiScope-${{ matrix.configuration }}-${{ matrix.arm64 }}
62
+ path : ' bin/${{ matrix.configuration }}/net8.0/${{ matrix.arm64 }}/publish/'
63
+ retention-days : 5
0 commit comments