Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to use a different MSVC version #3347

Merged
merged 11 commits into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/templates/test-weaver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runtime: osx-x64
runs-on: ${{ matrix.os.runner }}
name: Weaver
timeout-minutes: 15
timeout-minutes: 30
steps:
- #@ template.replace(checkoutCode())
- #@ setupWorkloads("android ${{ (matrix.os.runner != 'ubuntu-latest' && 'tvos ios maccatalyst') || '' }}")
Expand Down
14 changes: 11 additions & 3 deletions .github/templates/wrappers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ with:
path: #@ "./" + path
key: #@ key
#@ end

---
#@ def setupMSVC():
- name: Setup MSVC
run: |
Start-Process "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" -ArgumentList 'modify --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" --quiet --add Microsoft.VisualStudio.Component.VC.14.35.17.5.${{ startswith(matrix.arch, 'ARM') && matrix.arch || 'x86.x64' }}' -Wait -PassThru
shell: pwsh
if: #@ wrappersCacheCondition
#@ end
---
#@ def buildWrappers(cmd, outputVar, intermediateSteps = [], enableLto = True, artifactsPath = "wrappers/build/**", cacheVariable = ""):
#@ if cacheVariable == "":
#@ cacheVariable = outputVar
Expand Down Expand Up @@ -135,7 +143,7 @@ jobs:
strategy:
matrix:
arch: #@ windowsArchs
_: #@ template.replace(buildWrappers("pwsh ./wrappers/build.ps1 Windows -Platforms ${{ matrix.arch }}", "wrappers-windows-${{ matrix.arch }}", cacheVariable = "wrappers-windows"))
_: #@ template.replace(buildWrappers("pwsh ./wrappers/build.ps1 Windows -Platforms ${{ matrix.arch }} -ExtraCMakeArgs \"-T v143,version=14.35\"", "wrappers-windows-${{ matrix.arch }}", cacheVariable = "wrappers-windows", intermediateSteps = [setupMSVC()]))
#@yaml/map-key-override
if: #@ " || ".join([ "needs.check-cache.outputs.wrappers-windows-" + x + " != 'true'" for x in windowsArchs ])
uwp:
Expand All @@ -144,6 +152,6 @@ jobs:
strategy:
matrix:
arch: #@ windowsUWPArchs
_: #@ template.replace(buildWrappers("pwsh ./wrappers/build.ps1 WindowsStore -Platforms ${{ matrix.arch }}", "wrappers-windows-uwp-${{ matrix.arch }}", cacheVariable = "wrappers-uwp"))
_: #@ template.replace(buildWrappers("pwsh ./wrappers/build.ps1 WindowsStore -Platforms ${{ matrix.arch }} -ExtraCMakeArgs \"-T v143,version=14.35\"", "wrappers-windows-uwp-${{ matrix.arch }}", cacheVariable = "wrappers-uwp", intermediateSteps = [setupMSVC()]))
#@yaml/map-key-override
if: #@ " || ".join([ "needs.check-cache.outputs.wrappers-windows-uwp-" + x + " != 'true'" for x in windowsUWPArchs ])
2 changes: 1 addition & 1 deletion .github/workflows/test-weaver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runtime: osx-x64
runs-on: ${{ matrix.os.runner }}
name: Weaver
timeout-minutes: 15
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/wrappers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,13 @@ jobs:
with:
path: ./wrappers/build/**
key: wrappers-windows-${{ matrix.arch }}-Release-${{hashFiles('./wrappers/**')}}
- name: Setup MSVC
run: |
Start-Process "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" -ArgumentList 'modify --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" --quiet --add Microsoft.VisualStudio.Component.VC.14.35.17.5.${{ startswith(matrix.arch, 'ARM') && matrix.arch || 'x86.x64' }}' -Wait -PassThru
shell: pwsh
if: steps.check-cache.outputs.cache-hit != 'true'
- name: Build wrappers
run: pwsh ./wrappers/build.ps1 Windows -Platforms ${{ matrix.arch }} -Configuration Release -EnableLTO
run: pwsh ./wrappers/build.ps1 Windows -Platforms ${{ matrix.arch }} -ExtraCMakeArgs "-T v143,version=14.35" -Configuration Release -EnableLTO
if: steps.check-cache.outputs.cache-hit != 'true'
- name: Store artifacts for wrappers-windows-${{ matrix.arch }}
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -619,8 +624,13 @@ jobs:
with:
path: ./wrappers/build/**
key: wrappers-windows-uwp-${{ matrix.arch }}-Release-${{hashFiles('./wrappers/**')}}
- name: Setup MSVC
run: |
Start-Process "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" -ArgumentList 'modify --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" --quiet --add Microsoft.VisualStudio.Component.VC.14.35.17.5.${{ startswith(matrix.arch, 'ARM') && matrix.arch || 'x86.x64' }}' -Wait -PassThru
shell: pwsh
if: steps.check-cache.outputs.cache-hit != 'true'
- name: Build wrappers
run: pwsh ./wrappers/build.ps1 WindowsStore -Platforms ${{ matrix.arch }} -Configuration Release -EnableLTO
run: pwsh ./wrappers/build.ps1 WindowsStore -Platforms ${{ matrix.arch }} -ExtraCMakeArgs "-T v143,version=14.35" -Configuration Release -EnableLTO
if: steps.check-cache.outputs.cache-hit != 'true'
- name: Store artifacts for wrappers-windows-uwp-${{ matrix.arch }}
uses: actions/upload-artifact@v3
Expand Down
9 changes: 6 additions & 3 deletions wrappers/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ param(
[string[]]$Platforms = ('Win32'),

[ValidateSet('Windows', 'WindowsStore')]
[Parameter(Position=0)]
[Parameter(Position = 0)]
[string]$Target = 'Windows',

[Switch]$Incremental,

[Switch]$EnableLTO
[Switch]$EnableLTO,

[string]$ExtraCMakeArgs = ''
)

Push-Location $PSScriptRoot
Expand Down Expand Up @@ -72,8 +74,9 @@ foreach ($platform in $Platforms) {
}
New-Item .\cmake\$Target\$Configuration-$platform -ItemType "Directory" | Out-Null
Push-Location .\cmake\$Target\$Configuration-$platform

if (-Not $Incremental) {
& $cmake $PSScriptRoot $cmakeArgs -DCMAKE_GENERATOR_PLATFORM="$platform"
& $cmake $PSScriptRoot $cmakeArgs -DCMAKE_GENERATOR_PLATFORM="$platform" $ExtraCMakeArgs
}

& $cmake --build . --target install --config $Configuration
Expand Down
Loading