-
Notifications
You must be signed in to change notification settings - Fork 35
535 lines (452 loc) · 26.2 KB
/
container.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
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
name: container build and push
on:
push:
branches: [ "*" ]
tags: [ '*.*.*' ]
pull_request:
branches: [ "*" ]
# env:
# REGISTRY: ghcr.io
# EULIX_REGISTRY: hub.eulix.xyz
# HUAWEICLOUD_REGISTRY_SH: swr.cn-east-3.myhuaweicloud.com
# HUAWEICLOUD_REGISTRY_BJ: swr.cn-north-4.myhuaweicloud.com
# HUAWEICLOUD_REGISTRY_GZ: swr.cn-south-1.myhuaweicloud.com
# HUAWEICLOUD_REGISTRY_HK: swr.ap-southeast-1.myhuaweicloud.com
# HUAWEICLOUD_REGISTRY_SG: swr.ap-southeast-3.myhuaweicloud.com
# HUAWEICLOUD_REGISTRY_AF: swr.af-south-1.myhuaweicloud.com
# HUAWEICLOUD_REGISTRY_LA: swr.la-north-2.myhuaweicloud.com
# IMAGE_NAME: ${{ github.repository }}
jobs:
build-windows:
runs-on: windows-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Configure Environment
shell: powershell
run: |-
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1
git config --system core.longpaths true
$PSVersionTable.PSVersion
# Invoke-WebRequest -Uri 'https://aka.ms/vs/17/release/vs_community.exe' -OutFile 'vs_community.exe'
# .\vs_community.exe --installPath 'C:\Program Files\Microsoft Visual Studio\' --passive --norestart --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended
# Get-ChildItem -Path 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\'
echo "--------------------Install Microsoft.UI.Xaml-------------------"
$SourceUrl = "https://www.nuget.org/api/v2/package/Microsoft.UI.Xaml/2.7.3"
$DestinationFile = ".\microsoft.ui.xaml.2.7.3.zip" # 保存到当前目录并保持.nupkg扩展名
$ExtractDirectory = ".\uixaml"
# 创建目标解压目录(如果不存在)
if (!(Test-Path -Path $ExtractDirectory)) {
New-Item -ItemType Directory -Path $ExtractDirectory | Out-Null
}
# 下载.nupkg文件
Invoke-WebRequest -Uri $SourceUrl -OutFile $DestinationFile
# 解压.nupkg文件到指定目录(PowerShell 5.0及以上版本支持)
Expand-Archive -Path $DestinationFile -DestinationPath $ExtractDirectory
Copy-Item -Path .\uixaml\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.7.appx -Destination .
Add-AppxPackage -Path .\Microsoft.UI.Xaml.2.7.appx
echo "------------------------Install vclibs--------------------------"
Invoke-WebRequest -Uri 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx' -OutFile '.\Microsoft.VCLibs.x64.14.00.Desktop.appx'
Add-AppxPackage -Path .\Microsoft.VCLibs.x64.14.00.Desktop.appx
echo "---------------------Install winget------------------------"
Invoke-WebRequest -Uri 'https://github.com/microsoft/winget-cli/releases/download/v1.6.3421/65f132d72c1d44518a19d1a9c3de8e1f_License1.xml' -OutFile '.\65f132d72c1d44518a19d1a9c3de8e1f_License1.xml'
Invoke-WebRequest -Uri 'https://github.com/microsoft/winget-cli/releases/download/v1.6.3421/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle' -OutFile '.\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle'
Add-AppxPackage .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
Add-AppxProvisionedPackage -Online -Package .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -LicensePath .\65f132d72c1d44518a19d1a9c3de8e1f_License1.xml
echo "---------------Install 7z---------------------- "
winget install --source winget --id 7zip.7zip
# Invoke-WebRequest -Uri 'https://commondatastorage.googleapis.com/chromium-browser-clang/Win/clang-llvmorg-18-init-16072-gc4146121e940-5.tar.xz' -OutFile 'clang-llvmorg-18-init-16072-gc4146121e940-5.tar.xz'
# & "C:\Program Files\7-Zip\7z.exe" x ".\clang-llvmorg-18-init-16072-gc4146121e940-5.tar.xz" -o"."
# & "C:\Program Files\7-Zip\7z.exe" x ".\clang-llvmorg-18-init-16072-gc4146121e940-5.tar" -o"."
echo "---------------Install VisualStudio 2022---------------------- "
winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--quiet --add Microsoft.VisualStudio.Component.CoreEditor --add Microsoft.VisualStudio.Workload.CoreEditor --add Microsoft.VisualStudio.Component.TypeScript.TSServer --add Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions --add Microsoft.VisualStudio.Component.JavaScript.TypeScript --add Microsoft.VisualStudio.Component.Roslyn.Compiler --add Microsoft.Component.MSBuild --add Microsoft.VisualStudio.Component.Roslyn.LanguageServices --add Microsoft.VisualStudio.Component.TextTemplating --add Microsoft.VisualStudio.Component.NuGet --add Microsoft.VisualStudio.Component.Debugger.JustInTime --add Component.Microsoft.VisualStudio.LiveShare.2022 --add Microsoft.VisualStudio.Component.IntelliCode --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Graphics.Tools --add Microsoft.VisualStudio.Component.VC.DiagnosticTools --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.ATL --add Microsoft.VisualStudio.Component.SecurityIssueAnalysis --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.VC.Modules.x86.x64 --add Component.IncredibuildMenu --add Component.Incredibuild --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core --add Microsoft.VisualStudio.Component.Windows11Sdk.WindowsPerformanceToolkit --add Microsoft.VisualStudio.Component.CppBuildInsights --add Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.CMake --add Microsoft.VisualStudio.Component.VC.CMake.Project --add Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest --add Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest --add Microsoft.VisualStudio.Component.VC.ASAN --add Microsoft.VisualStudio.Component.Vcpkg --add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset --add Microsoft.VisualStudio.Component.VC.Llvm.Clang --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --add Microsoft.VisualStudio.Workload.NativeDesktop"
winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--quiet --add Microsoft.VisualStudio.Component.CoreEditor --add Microsoft.VisualStudio.Workload.CoreEditor --add Microsoft.VisualStudio.Component.TypeScript.TSServer --add Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions --add Microsoft.VisualStudio.Component.JavaScript.TypeScript --add Microsoft.VisualStudio.Component.Roslyn.Compiler --add Microsoft.Component.MSBuild --add Microsoft.VisualStudio.Component.Roslyn.LanguageServices --add Microsoft.VisualStudio.Component.TextTemplating --add Microsoft.VisualStudio.Component.NuGet --add Microsoft.VisualStudio.Component.Debugger.JustInTime --add Component.Microsoft.VisualStudio.LiveShare.2022 --add Microsoft.VisualStudio.Component.IntelliCode --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Graphics.Tools --add Microsoft.VisualStudio.Component.VC.DiagnosticTools --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.ATL --add Microsoft.VisualStudio.Component.SecurityIssueAnalysis --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.VC.Modules.x86.x64 --add Component.IncredibuildMenu --add Component.Incredibuild --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core --add Microsoft.VisualStudio.Component.Windows11Sdk.WindowsPerformanceToolkit --add Microsoft.VisualStudio.Component.CppBuildInsights --add Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.CMake --add Microsoft.VisualStudio.Component.VC.CMake.Project --add Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest --add Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest --add Microsoft.VisualStudio.Component.VC.ASAN --add Microsoft.VisualStudio.Component.Vcpkg --add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset --add Microsoft.VisualStudio.Component.VC.Llvm.Clang --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --add Microsoft.VisualStudio.Workload.NativeDesktop"
echo "----------------------Install sdk 8-------------------------------"
winget install --source winget --id Microsoft.DotNet.SDK.8
echo "----------------------Install DesktopRuntime.8--------------------------"
winget install --source winget --id Microsoft.DotNet.DesktopRuntime.8
echo "---------------------Install cmake--------------------------"
winget install --source winget --id Kitware.CMake -e
echo "--------------------Install Ninja-build.Ninja ---------------------------"
# winget search ninja
winget install --source winget --id Ninja-build.Ninja
echo "--------------------Waiting Install VisualStudio 2022--------------------------------- "
$targetDirectory = "C:\Program Files\Microsoft Visual Studio\2022\Community"
# 循环判断目录数量是否大于等于 14
while (!(Test-Path $targetDirectory)) {
Write-Host "The directory does not exist, wait for 1 minute..."
Start-Sleep -Seconds 60
}
while (((Get-ChildItem -Path $targetDirectory -Directory).Count -lt 14)) {
Write-Host "The number of directories is less than 14, wait for 1 minute...."
Start-Sleep -Seconds 60
Get-ChildItem -Path $targetDirectory
}
Get-ChildItem -Path $targetDirectory
Write-Host "-------------------------Visual Studio 2022 installation completed----------------------------"
# Get-ChildItem -Path 'C:\Program Files\Microsoft Visual Studio\2022\Community\'
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Building Windows Package
shell: pwsh
run: |-
Rename-Item -Path 'D:\a\gt\gt\libcs\dep\_google-webrtc\src\third_party\llvm-build\Release+Asserts.win' -NewName 'D:\a\gt\gt\libcs\dep\_google-webrtc\src\third_party\llvm-build\Release+Asserts'
Get-ChildItem -Path 'D:\a\gt\gt\libcs\dep\_google-webrtc\src\third_party\llvm-build\'
Get-ChildItem -Path 'D:\a\gt\gt\libcs\dep\_google-webrtc\src\third_party\llvm-build\Release+Asserts\'
Invoke-WebRequest -Uri 'https://chrome-infra-packages.appspot.com/dl/gn/gn/windows-amd64/+/latest' -OutFile '.\gn-windows-amd64.zip'
Expand-Archive -Path '.\gn-windows-amd64.zip' -DestinationPath 'C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja'
Get-ChildItem -Path 'C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja\'
echo "-----------------Register environment variables------------------------"
$ninjaPath = "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja"
# $clangPath = "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\bin"
$clangPath = "D:\a\gt\gt\libcs\dep\_google-webrtc\src\third_party\llvm-build\Release+Asserts\bin"
$msvcPath = "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x64"
$env:Path = "$ninjaPath;$clangPath;$msvcPath;$Path"
$includePaths = @(
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include",
"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt",
"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um",
"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\winrt",
"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared",
"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\cppwinrt"
)
$libPaths = @(
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\lib\x64",
"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\ucrt\x64",
"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x64",
"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\ucrt_enclave\x64"
)
$env:INCLUDE = ($includePaths -join ";")
$env:LIB = ($libPaths -join ";")
$env:Path
echo "-----------------------Compilation package---------------------"
& '.\build.ps1'
# - name: Building Windows Package
# shell: pwsh
# run: |-
# $env:Path
# echo "-----------------------Compilation package---------------------"
# & '.\build.ps1'
- name: Archive GT artifacts
uses: actions/upload-artifact@v3
with:
name: gt-windows
path: |
release/*
target/*
# build-liunx:
# runs-on: ubuntu-22.04
# permissions:
# contents: read
# packages: write
# id-token: write
# steps:
# - name: clean-space
# run: |-
# sudo swapoff -a
# sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc
# sudo apt clean
# sudo df -Th
# # steps:
# - uses: actions/checkout@v3
# with:
# submodules: recursive
# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: 'stable'
# - name: package-gt
# run: |-
# sudo apt-get update && sudo apt-get install make git gn ninja-build python3 python3-pip libgtk-3-dev gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-x86-64-linux-gnu g++-x86-64-linux-gnu gcc-riscv64-linux-gnu g++-riscv64-linux-gnu rustc upx -y
# rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu riscv64gc-unknown-linux-gnu
# make
# - name: Archive GT artifacts
# uses: actions/upload-artifact@v3
# with:
# name: gt-linux
# path: |
# release/*
# - name: clean-space
# run: sudo rm -rf /home/runner/work/gt/gt/libcs/dep
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# - name: Setup Docker buildx
# uses: docker/setup-buildx-action@v2
# - run: echo "GITHUB_REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
# shell: bash
# - name: Inspect builder
# run: |
# echo "Name: ${{ steps.buildx.outputs.name }}"
# echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
# echo "Status: ${{ steps.buildx.outputs.status }}"
# echo "Flags: ${{ steps.buildx.outputs.flags }}"
# echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
# - name: Log into registry ${{ env.REGISTRY }}
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v2
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Log into registry ${{ env.EULIX_REGISTRY }}
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v2
# with:
# registry: ${{ env.EULIX_REGISTRY }}
# username: ${{ secrets.EULIX_REGISTRY_USERNAME }}
# password: ${{ secrets.EULIX_REGISTRY_PASSWORD }}
# - name: Log into registry Docker Hub
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKER_HUB_REGISTRY_USERNAME }}
# password: ${{ secrets.DOCKER_HUB_REGISTRY_PASSWORD }}
# - name: Log into registry ${{ env.HUAWEICLOUD_REGISTRY_SH }}
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v2
# with:
# registry: ${{ env.HUAWEICLOUD_REGISTRY_SH }}
# username: cn-east-3@${{ secrets.HUAWEICLOUD_USERNAME }}
# password: ${{ secrets.HUAWEICLOUD_PASSWORD }}
# - name: Log into registry ${{ env.HUAWEICLOUD_REGISTRY_BJ }}
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v2
# with:
# registry: ${{ env.HUAWEICLOUD_REGISTRY_BJ }}
# username: cn-north-4@${{ secrets.HUAWEICLOUD_USERNAME }}
# password: ${{ secrets.HUAWEICLOUD_PASSWORD }}
# - name: Log into registry ${{ env.HUAWEICLOUD_REGISTRY_GZ }}
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v2
# with:
# registry: ${{ env.HUAWEICLOUD_REGISTRY_GZ }}
# username: cn-south-1@${{ secrets.HUAWEICLOUD_USERNAME }}
# password: ${{ secrets.HUAWEICLOUD_PASSWORD }}
# - name: Log into registry ${{ env.HUAWEICLOUD_REGISTRY_SG }}
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v2
# with:
# registry: ${{ env.HUAWEICLOUD_REGISTRY_SG }}
# username: ap-southeast-3@${{ secrets.HUAWEICLOUD_USERNAME }}
# password: ${{ secrets.HUAWEICLOUD_PASSWORD }}
# - name: Log into registry ${{ env.HUAWEICLOUD_REGISTRY_HK }}
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v2
# with:
# registry: ${{ env.HUAWEICLOUD_REGISTRY_HK }}
# username: ap-southeast-1@${{ secrets.HUAWEICLOUD_USERNAME }}
# password: ${{ secrets.HUAWEICLOUD_PASSWORD }}
# - name: Log into registry ${{ env.HUAWEICLOUD_REGISTRY_AF }}
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v2
# with:
# registry: ${{ env.HUAWEICLOUD_REGISTRY_AF }}
# username: af-south-1@${{ secrets.HUAWEICLOUD_USERNAME }}
# password: ${{ secrets.HUAWEICLOUD_PASSWORD }}
# - name: Log into registry ${{ env.HUAWEICLOUD_REGISTRY_LA }}
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v2
# with:
# registry: ${{ env.HUAWEICLOUD_REGISTRY_LA }}
# username: la-north-2@${{ secrets.HUAWEICLOUD_USERNAME }}
# password: ${{ secrets.HUAWEICLOUD_PASSWORD }}
# - name: Extract Docker metadata for Server
# id: meta-server
# uses: docker/metadata-action@v2
# with:
# images: |
# ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# ${{ env.EULIX_REGISTRY }}/${{ env.IMAGE_NAME }}
# aospace/${{ env.GITHUB_REPOSITORY_NAME }}
# ${{ env.HUAWEICLOUD_REGISTRY_SH }}/${{ env.IMAGE_NAME }}
# ${{ env.HUAWEICLOUD_REGISTRY_BJ }}/${{ env.IMAGE_NAME }}
# ${{ env.HUAWEICLOUD_REGISTRY_GZ }}/${{ env.IMAGE_NAME }}
# ${{ env.HUAWEICLOUD_REGISTRY_HK }}/${{ env.IMAGE_NAME }}
# ${{ env.HUAWEICLOUD_REGISTRY_SG }}/${{ env.IMAGE_NAME }}
# ${{ env.HUAWEICLOUD_REGISTRY_AF }}/${{ env.IMAGE_NAME }}
# ${{ env.HUAWEICLOUD_REGISTRY_LA }}/${{ env.IMAGE_NAME }}
# flavor: |
# prefix=server-
# - name: Build and push Docker image for Server
# id: build-and-push-server
# uses: docker/[email protected]
# with:
# context: .
# push: ${{ github.event_name != 'pull_request' }}
# tags: ${{ steps.meta-server.outputs.tags }}
# labels: ${{ steps.meta-server.outputs.labels }}
# builder: ${{ steps.buildx.outputs.name }}
# platforms: linux/amd64,linux/arm64,linux/riscv64
# cache-from: type=gha
# cache-to: type=gha,mode=max
# file: Dockerfile-server
# provenance: false
# - name: Extract Docker metadata for Client
# id: meta-client
# uses: docker/metadata-action@v2
# with:
# images: |
# ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# ${{ env.EULIX_REGISTRY }}/${{ env.IMAGE_NAME }}
# aospace/${{ env.GITHUB_REPOSITORY_NAME }}
# ${{ env.HUAWEICLOUD_REGISTRY_SH }}/${{ env.IMAGE_NAME }}
# ${{ env.HUAWEICLOUD_REGISTRY_BJ }}/${{ env.IMAGE_NAME }}
# ${{ env.HUAWEICLOUD_REGISTRY_GZ }}/${{ env.IMAGE_NAME }}
# ${{ env.HUAWEICLOUD_REGISTRY_HK }}/${{ env.IMAGE_NAME }}
# ${{ env.HUAWEICLOUD_REGISTRY_SG }}/${{ env.IMAGE_NAME }}
# ${{ env.HUAWEICLOUD_REGISTRY_AF }}/${{ env.IMAGE_NAME }}
# ${{ env.HUAWEICLOUD_REGISTRY_LA }}/${{ env.IMAGE_NAME }}
# flavor: |
# prefix=client-
# - name: Build and push Docker image for Client
# id: build-and-push-client
# uses: docker/[email protected]
# with:
# context: .
# push: ${{ github.event_name != 'pull_request' }}
# tags: ${{ steps.meta-client.outputs.tags }}
# labels: ${{ steps.meta-client.outputs.labels }}
# builder: ${{ steps.buildx.outputs.name }}
# platforms: linux/amd64,linux/arm64,linux/riscv64
# cache-from: type=gha
# cache-to: type=gha,mode=max
# file: Dockerfile-client
# provenance: false
# - name: Extract Docker metadata for Server
# id: meta-opensource-server
# uses: docker/metadata-action@v2
# with:
# images: |
# ${{ env.EULIX_REGISTRY }}/cicada-private/aonetwork-server
# flavor: |
# prefix=opensource-server-
# - name: Build and push Docker image for Server
# id: build-and-push-opensource-server
# uses: docker/build-push-action@v2
# with:
# context: .
# push: ${{ github.event_name != 'pull_request' }}
# tags: ${{ steps.meta-opensource-server.outputs.tags }}
# labels: ${{ steps.meta-opensource-server.outputs.labels }}
# builder: ${{ steps.buildx.outputs.name }}
# platforms: linux/amd64,linux/arm64,linux/riscv64
# cache-from: type=gha
# cache-to: type=gha,mode=max
# file: Dockerfile-server
# - name: Extract Docker metadata for Client
# id: meta-opensource-client
# uses: docker/metadata-action@v2
# with:
# images: |
# ${{ env.EULIX_REGISTRY }}/cicada-private/aonetwork-client
# flavor: |
# prefix=opensource-client-
# - name: Build and push Docker image for Client
# id: build-and-push-opensource-client
# uses: docker/build-push-action@v2
# with:
# context: .
# push: ${{ github.event_name != 'pull_request' }}
# tags: ${{ steps.meta-opensource-client.outputs.tags }}
# labels: ${{ steps.meta-opensource-client.outputs.labels }}
# builder: ${{ steps.buildx.outputs.name }}
# platforms: linux/amd64,linux/arm64,linux/riscv64
# cache-from: type=gha
# cache-to: type=gha,mode=max
# file: Dockerfile-client
# build-x8664-macos:
# runs-on: macos-13
# permissions:
# contents: read
# packages: write
# id-token: write
# # steps:
# # - name: space
# # shell: bash
# # run: |-
# # sudo df -h
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: recursive
# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: 'stable'
# - name: package-gt
# run: |-
# sudo mkdir -pv /opt/homebrew/opt
# brew install make llvm@16 binutils ninja
# pip3 install --upgrade setuptools
# curl -LOJ https://chrome-infra-packages.appspot.com/dl/gn/gn/mac-amd64/+/latest
# unzip gn-mac-amd64.zip
# chmod +x gn && mv gn /usr/local/opt/llvm@16/bin/
# sudo ln -s /usr/local/opt/llvm@16 /opt/homebrew/opt/llvm
# ln -s /usr/local/opt/llvm@16 /usr/local/opt/llvm
# echo 'export PATH="/usr/local/opt/llvm@16/bin:$PATH"' >> ~/.bash_profile
# export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"
# echo 'export PATH="/usr/local/opt/binutils/bin:$PATH"' >> ~/.bash_profile
# source ~/.bash_profile
# mv /usr/local/opt/llvm/bin/llvm-libtool-darwin /usr/local/opt/llvm/bin/libtool
# rustup target add x86_64-apple-darwin aarch64-apple-darwin
# cd ./libcs && TARGET=x86_64-apple-darwin GOOS=darwin GOARCH=amd64 arch -arch x86_64 make release_lib
# cargo build --target x86_64-apple-darwin -r
# cd ..
# mkdir -p release
# cp target/x86_64-apple-darwin/release/gt release/gt-macos-x86_64
# - name: Archive GT artifacts
# uses: actions/upload-artifact@v3
# with:
# name: gt-macos-x86_64
# path: |
# release/*
# build-arm64-macos:
# runs-on: macos-14
# permissions:
# contents: read
# packages: write
# id-token: write
# # steps:
# # - name: space
# # shell: bash
# # run: |-
# # sudo df -h
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: recursive
# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: 'stable'
# - name: package-gt
# run: |-
# brew install make llvm@16 binutils ninja
# curl -LOJ https://chrome-infra-packages.appspot.com/dl/gn/gn/mac-amd64/+/latest
# unzip gn-mac-amd64.zip
# chmod +x gn && mv gn /opt/homebrew/opt/llvm@16/bin/
# ln -s /opt/homebrew/opt/llvm@16 /opt/homebrew/opt/llvm
# echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.bash_profile
# export PATH="/opt/homebrew/opt/make/libexec/gnubin:$PATH"
# echo 'export PATH="/opt/homebrew/opt/binutils/bin:$PATH"' >> ~/.bash_profile
# source ~/.bash_profile
# mv /opt/homebrew/opt/llvm/bin/llvm-libtool-darwin /opt/homebrew/opt/llvm/bin/libtool
# rustup target add x86_64-apple-darwin aarch64-apple-darwin
# cd ./libcs && TARGET=aarch64-apple-darwin GOOS=darwin GOARCH=arm64 arch -arch arm64 make release_lib
# cargo build --target aarch64-apple-darwin -r
# cd ..
# mkdir -p release
# cp target/aarch64-apple-darwin/release/gt release/gt-macos-aarch64
# - name: Archive GT artifacts
# uses: actions/upload-artifact@v3
# with:
# name: gt-macos-aarch64
# path: |
# release/*