-
Notifications
You must be signed in to change notification settings - Fork 4
165 lines (146 loc) · 6.3 KB
/
msbuild.yml
File metadata and controls
165 lines (146 loc) · 6.3 KB
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: windows build workflows
on:
push:
branches:
- develop
paths:
- 'XEngine_Source/**'
- 'XEngine_Release/**'
- '.github/**'
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
configuration: [Debug ,Release]
platform: [x86 ,x64 ,ARM64]
runs-on: windows-latest
steps:
- name: Checkout main repository code
uses: actions/checkout@v6
with:
ref: 'develop'
- name: Checkout dependency repository (xengine)
uses: actions/checkout@v6
with:
repository: libxengine/libxengine
path: libxengine
- name: sub module checkout (opensource)
run: |
git submodule init
git submodule update
shell: pwsh
- name: vcpkg dependency repository
uses: actions/checkout@v6
with:
repository: microsoft/vcpkg
path: vcpkg
- name: vcpkg install (x86)
if: matrix.platform == 'x86'
run: |
cd vcpkg
./bootstrap-vcpkg.bat
./vcpkg.exe install libsrt:x86-windows libsrtp:x86-windows
./vcpkg.exe integrate install
shell: pwsh
- name: vcpkg install (x64)
if: matrix.platform == 'x64'
run: |
cd vcpkg
./bootstrap-vcpkg.bat
./vcpkg.exe install libsrt:x64-windows libsrtp:x64-windows
./vcpkg.exe integrate install
shell: pwsh
- name: vcpkg install (ARM64)
if: matrix.platform == 'ARM64'
run: |
cd vcpkg
./bootstrap-vcpkg.bat
./vcpkg.exe install libsrt:Arm64-windows libsrtp:Arm64-windows
./vcpkg.exe integrate install
shell: pwsh
- name: Set up Dependency x86_64 Environment
if: matrix.platform == 'x64'
run: |
echo "XENGINE_INCLUDE=${{ github.workspace }}/libxengine" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "XENGINE_LIB64=${{ github.workspace }}/libxengine/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
shell: pwsh
- name: Set up Dependency x86_32 Environment
if: matrix.platform == 'x86'
run: |
$response = Invoke-RestMethod -Uri "https://api.github.com/repos/libxengine/libxengine/releases/latest" -Headers @{"Accept"="application/vnd.github.v3+json"}
$latest_tag = $response.tag_name
Write-Host "Latest Tag: $latest_tag"
$url = "https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Windows_x86-32.zip"
Invoke-WebRequest -Uri $url -OutFile "XEngine_Windows_x86-32.zip"
Expand-Archive -Path ./XEngine_Windows_x86-32.zip -DestinationPath ./XEngine_Windows -Force
echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "XENGINE_LIB32=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
shell: pwsh
- name: Set up Dependency ARM64 Environment
if: matrix.platform == 'ARM64'
run: |
$response = Invoke-RestMethod -Uri "https://api.github.com/repos/libxengine/libxengine/releases/latest" -Headers @{"Accept"="application/vnd.github.v3+json"}
$latest_tag = $response.tag_name
Write-Host "Latest Tag: $latest_tag"
$url = "https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Windows_Arm64.zip"
Invoke-WebRequest -Uri $url -OutFile "XEngine_Windows_Arm64.zip"
Expand-Archive -Path ./XEngine_Windows_Arm64.zip -DestinationPath ./XEngine_Windows -Force
echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "XENGINE_LIBARM64=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
shell: pwsh
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v3
- name: Build Solution
run: msbuild XEngine_Source/XEngine.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}
- name: Conditional Step for x86 Release
if: matrix.configuration == 'Release' && matrix.platform == 'x86'
run: |
cp -r XEngine_Source/Release/*.dll XEngine_Release/
cp -r XEngine_Source/Release/*.exe XEngine_Release/
cp -r XEngine_Source/VSCopy_x86.bat XEngine_Release/
cd XEngine_Release
.\VSCopy_x86.bat
# ./XEngine_StreamMediaApp -t
shell: pwsh
- name: Conditional Step for x64 Release
if: matrix.configuration == 'Release' && matrix.platform == 'x64'
run: |
cp -r XEngine_Source/x64/Release/*.dll XEngine_Release/
cp -r XEngine_Source/x64/Release/*.exe XEngine_Release/
cp -r XEngine_Source/VSCopy_x64.bat XEngine_Release/
cd XEngine_Release
.\VSCopy_x64.bat
shell: pwsh
- name: Conditional Step for ARM64 Release
if: matrix.configuration == 'Release' && matrix.platform == 'ARM64'
run: |
cp -r XEngine_Source/ARM64/Release/*.dll XEngine_Release/
cp -r XEngine_Source/ARM64/Release/*.exe XEngine_Release/
cp -r XEngine_Source/VSCopy_Arm64.bat XEngine_Release/
cd XEngine_Release
.\VSCopy_Arm64.bat
shell: pwsh
- name: Upload folder as artifact with x86
if: matrix.configuration == 'Release' && matrix.platform == 'x86'
uses: actions/upload-artifact@v6
with:
name: XEngine_StreamMediaApp-Windows_x86_32
path: XEngine_Release/
retention-days: 1
- name: Upload folder as artifact with x64
if: matrix.configuration == 'Release' && matrix.platform == 'x64'
uses: actions/upload-artifact@v6
with:
name: XEngine_StreamMediaApp-Windows_x86_64
path: XEngine_Release/
retention-days: 1
- name: Upload folder as artifact with ARM64
if: matrix.configuration == 'Release' && matrix.platform == 'ARM64'
uses: actions/upload-artifact@v6
with:
name: XEngine_StreamMediaApp-Windows_Arm64
path: XEngine_Release/
retention-days: 1