-
Notifications
You must be signed in to change notification settings - Fork 9
117 lines (96 loc) · 3.59 KB
/
build_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Build plugins in Release folder
on:
workflow_dispatch:
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Visual Studio
uses: microsoft/[email protected]
with:
vs-version: '15.0'
- name: Install Visual Studio Build Tools
run: |
choco install visualstudio2017-workload-vctools -y
choco install visualstudio2017buildtools -y
- name: Build solution
run: |
msbuild src/INAV-X-Plane-HITL-Plugin.sln /p:Configuration=Debug
- name: Delete win.ilk and win.pdb
run: |
if (Test-Path "release\Aircraft\Extra Aircraft\NK_FPVSurfwing\plugins\INAV-X-Plane-HITL\64\win.ilk") {
Remove-Item "release\Aircraft\Extra Aircraft\NK_FPVSurfwing\plugins\INAV-X-Plane-HITL\64\win.ilk" -Force
}
if (Test-Path "release\Aircraft\Extra Aircraft\NK_FPVSurfwing\plugins\INAV-X-Plane-HITL\64\win.pdb") {
Remove-Item "release\Aircraft\Extra Aircraft\NK_FPVSurfwing\plugins\INAV-X-Plane-HITL\64\win.pdb" -Force
}
- name: Commit win.xpl
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git add "release/Aircraft/Extra Aircraft/NK_FPVSurfwing/plugins/INAV-X-Plane-HITL/64/win.xpl"
git commit -m "Action - Update win.xpl" || echo "No changes to commit"
git pull origin main --rebase
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get update && sudo apt-get -y install -y make gcc g++ libgl-dev libglu1-mesa-dev libalut-dev libgtk-3-dev pkg-config
- name: Build the project
run: |
cd src
make lin64
- name: Commit lin.xpl
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git add "release/Aircraft/Extra Aircraft/NK_FPVSurfwing/plugins/INAV-X-Plane-HITL/64/lin.xpl"
git commit -m "Action - Update lin.xpl" || echo "No changes to commit"
git pull origin main --rebase
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-mac:
runs-on: macos-13
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Dependencies
run: brew install make gtk+3 openal-soft
- name: Build the project
run: |
cd src
make mac64
- name: Commit mac.xpl
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git add "release/Aircraft/Extra Aircraft/NK_FPVSurfwing/plugins/INAV-X-Plane-HITL/64/mac.xpl"
git commit -m "Action - Update mac.xpl" || echo "No changes to commit"
git pull origin main --rebase
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
create_zip:
runs-on: ubuntu-latest
needs: [build-windows, build-linux, build-mac]
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Zip Aircraft folder
run: |
# Navigate to the release directory and create the zip file
cd release
zip -r Aircraft.zip Aircraft
- name: Upload Aircraft.zip as an artifact
uses: actions/upload-artifact@v4
with:
name: Aircraft
path: release/Aircraft.zip