Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangchf committed Mar 15, 2024
1 parent 34b55a2 commit 83ff985
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 75 deletions.
145 changes: 70 additions & 75 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:


steps:
- name: Modifying the registry
- name: Configure Environment
shell: powershell
run: |-
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1
Expand Down Expand Up @@ -70,37 +70,32 @@ jobs:
Add-AppxProvisionedPackage -Online -Package .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -LicensePath .\65f132d72c1d44518a19d1a9c3de8e1f_License1.xml
echo "---------------Install VisualStudio.2022---------------------- "
#winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--quiet --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended"
#winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--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"
#winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--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"
winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--quiet --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest --add Microsoft.VisualStudio.Component.VC.ASAN --add Microsoft.VisualStudio.Component.VC.DiagnosticTools --add Microsoft.VisualStudio.Component.Vcpkg --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended --wait"
winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--quiet --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest --add Microsoft.VisualStudio.Component.VC.ASAN --add Microsoft.VisualStudio.Component.VC.DiagnosticTools --add Microsoft.VisualStudio.Component.Vcpkg --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended --wait"
winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--quiet --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest --add Microsoft.VisualStudio.Component.VC.ASAN --add Microsoft.VisualStudio.Component.VC.DiagnosticTools --add Microsoft.VisualStudio.Component.Vcpkg --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended --wait"
# winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--quiet --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest --add Microsoft.VisualStudio.Component.VC.ASAN --add Microsoft.VisualStudio.Component.VC.DiagnosticTools --add Microsoft.VisualStudio.Component.Vcpkg --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended --wait"
# winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--quiet --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest --add Microsoft.VisualStudio.Component.VC.ASAN --add Microsoft.VisualStudio.Component.VC.DiagnosticTools --add Microsoft.VisualStudio.Component.Vcpkg --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended --wait"
winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--passive --config .\.vsconfig"
echo "----------------------Install sdk 8-------------------------------"
Get-ChildItem -Path 'C:\Program Files\Microsoft Visual Studio\2022\Community\'
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 ((Get-ChildItem -Path $targetDirectory -Directory).Count -lt 14) {
Write-Host "目录数量小于14个,等待1分钟..."
Start-Sleep -Seconds 60
}
Write-Host "-------------------------Visual Studio 2022 installation completed----------------------------"
Get-ChildItem -Path 'C:\Program Files\Microsoft Visual Studio\2022\Community\'
- uses: actions/checkout@v3
Expand All @@ -113,55 +108,55 @@ jobs:
with:
go-version: 'stable'

- name: Configure Environment
shell: powershell
run: |-
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 gn-------------------"
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\VC\Tools\Llvm\bin'
echo "--------------------Install Ninja-build.Ninja ---------------------------"
winget search ninja
winget install --source winget --id Ninja-build.Ninja
echo "---------------Install VisualStudio.2022---------------------- "
#winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--quiet --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended"
winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--quiet --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest --add Microsoft.VisualStudio.Component.Windows10SDK --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended --wait"
winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--quiet --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest --add Microsoft.VisualStudio.Component.Windows10SDK --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended --wait"
winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--quiet --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest --add Microsoft.VisualStudio.Component.Windows10SDK --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended --wait"
echo "----------------------Install sdk 8-------------------------------"
winget install --source winget --id Microsoft.DotNet.SDK.8
# - name: Configure Environment
# shell: powershell
# run: |-
# 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 gn-------------------"
# 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\VC\Tools\Llvm\bin'
# echo "--------------------Install Ninja-build.Ninja ---------------------------"
# winget search ninja
# winget install --source winget --id Ninja-build.Ninja
# echo "---------------Install VisualStudio.2022---------------------- "

# #winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--quiet --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended"
# winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--quiet --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest --add Microsoft.VisualStudio.Component.Windows10SDK --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended --wait"
# winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--quiet --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest --add Microsoft.VisualStudio.Component.Windows10SDK --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended --wait"
# winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--quiet --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest --add Microsoft.VisualStudio.Component.Windows10SDK --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended --wait"

# 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 DesktopRuntime.8--------------------------"
# winget install --source winget --id Microsoft.DotNet.DesktopRuntime.8

echo "---------------------Install cmake--------------------------"
winget install --source winget --id Kitware.CMake -e
# echo "---------------------Install cmake--------------------------"
# winget install --source winget --id Kitware.CMake -e

- name: Building Windows Package
shell: pwsh
Expand Down
44 changes: 44 additions & 0 deletions .vsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Component.CoreEditor",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.VisualStudio.Component.TypeScript.TSServer",
"Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions",
"Microsoft.VisualStudio.Component.JavaScript.TypeScript",
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
"Microsoft.Component.MSBuild",
"Microsoft.VisualStudio.Component.Roslyn.LanguageServices",
"Microsoft.VisualStudio.Component.TextTemplating",
"Microsoft.VisualStudio.Component.NuGet",
"Microsoft.VisualStudio.Component.Debugger.JustInTime",
"Component.Microsoft.VisualStudio.LiveShare.2022",
"Microsoft.VisualStudio.Component.IntelliCode",
"Microsoft.VisualStudio.Component.VC.CoreIde",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.Graphics.Tools",
"Microsoft.VisualStudio.Component.VC.DiagnosticTools",
"Microsoft.VisualStudio.Component.Windows11SDK.22621",
"Microsoft.VisualStudio.Component.VC.ATL",
"Microsoft.VisualStudio.Component.SecurityIssueAnalysis",
"Microsoft.VisualStudio.Component.VC.ATLMFC",
"Microsoft.VisualStudio.Component.VC.Modules.x86.x64",
"Component.IncredibuildMenu",
"Component.Incredibuild",
"Microsoft.VisualStudio.Component.VC.Redist.14.Latest",
"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core",
"Microsoft.VisualStudio.Component.Windows11Sdk.WindowsPerformanceToolkit",
"Microsoft.VisualStudio.Component.CppBuildInsights",
"Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.CMake",
"Microsoft.VisualStudio.Component.VC.CMake.Project",
"Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest",
"Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest",
"Microsoft.VisualStudio.Component.VC.ASAN",
"Microsoft.VisualStudio.Component.Vcpkg",
"Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset",
"Microsoft.VisualStudio.Component.VC.Llvm.Clang",
"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang",
"Microsoft.VisualStudio.Workload.NativeDesktop"
],
"extensions": []
}

0 comments on commit 83ff985

Please sign in to comment.