-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare for OneBranch Support (#202)
- Loading branch information
Showing
6 changed files
with
153 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
param ( | ||
[Parameter(Mandatory = $false)] | ||
[ValidateSet("x86", "x64", "arm", "arm64", "arm64ec")] | ||
[string]$Arch = "x64", | ||
|
||
[Parameter(Mandatory = $false)] | ||
[ValidateSet("Debug", "Release")] | ||
[string]$Config = "Release" | ||
) | ||
|
||
Set-StrictMode -Version 'Latest' | ||
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop' | ||
|
||
function Execute([String]$Name, [String]$Arguments) { | ||
Write-Debug "$Name $Arguments" | ||
$process = Start-Process $Name $Arguments -PassThru -NoNewWindow -WorkingDirectory "./build" | ||
$handle = $process.Handle # Magic work around. Don't remove this line. | ||
$process.WaitForExit(); | ||
if ($process.ExitCode -ne 0) { | ||
Write-Error "$Name exited with status code $($process.ExitCode)" | ||
} | ||
} | ||
|
||
if ($env:ONEBRANCH_ARCH) { | ||
$Arch = $env:ONEBRANCH_ARCH | ||
} | ||
if ($env:ONEBRANCH_CONFIG) { | ||
$Config = $env:ONEBRANCH_CONFIG | ||
} | ||
|
||
$platform = "$($Arch)fre" | ||
if ($Config -eq "Debug") { | ||
$platform = "$($Arch)chk" | ||
} | ||
|
||
Execute 'C:/Program Files (x86)/WiX Toolset v3.14/bin/candle.exe' "../src/installer.wxs -o bin/$platform/quicreach.wixobj" | ||
Execute 'C:/Program Files (x86)/WiX Toolset v3.14/bin/light.exe' "-b bin/$($Arch)fre/Release -o bin/$platform/quicreach.msi bin/$($Arch)fre/quicreach.wixobj" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
param ( | ||
[Parameter(Mandatory = $false)] | ||
[ValidateSet("x86", "x64", "arm", "arm64", "arm64ec")] | ||
[string]$Arch = "x64", | ||
|
||
[Parameter(Mandatory = $false)] | ||
[ValidateSet("Debug", "Release")] | ||
[string]$Config = "Release", | ||
|
||
[Parameter(Mandatory = $false)] | ||
[ValidateSet("schannel", "openssl")] | ||
[string]$Tls = "schannel", | ||
|
||
[Parameter(Mandatory = $false)] | ||
[ValidateSet("static", "shared")] | ||
[string]$Link = "static" | ||
) | ||
|
||
Set-StrictMode -Version 'Latest' | ||
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop' | ||
|
||
function Execute([String]$Name, [String]$Arguments) { | ||
Write-Debug "$Name $Arguments" | ||
$process = Start-Process $Name $Arguments -PassThru -NoNewWindow -WorkingDirectory "./build" | ||
$handle = $process.Handle # Magic work around. Don't remove this line. | ||
$process.WaitForExit(); | ||
if ($process.ExitCode -ne 0) { | ||
Write-Error "$Name exited with status code $($process.ExitCode)" | ||
} | ||
} | ||
|
||
if ($env:ONEBRANCH_ARCH) { | ||
$Arch = $env:ONEBRANCH_ARCH | ||
} | ||
if ($env:ONEBRANCH_CONFIG) { | ||
$Config = $env:ONEBRANCH_CONFIG | ||
} | ||
|
||
if (!(Test-Path "./build")) { | ||
New-Item -Path "./build" -ItemType Directory -Force | Out-Null | ||
} | ||
|
||
$_Arch = $Arch | ||
if ($_Arch -eq "x86") { $_Arch = "Win32" } | ||
|
||
$Shared = "off" | ||
if ($Link -ne "static") { $Shared = "on" } | ||
|
||
Execute "cmake" "-G ""Visual Studio 17 2022"" -A $_Arch -DREACH_ARCH=$_Arch -DQUIC_TLS=$Tls -DQUIC_BUILD_SHARED=$Shared .." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: main | ||
pull_request: | ||
branches: main | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
arch: [x64, arm64] | ||
name: Build | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 | ||
with: | ||
submodules: 'recursive' | ||
- name: Setup MSBuild | ||
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce | ||
- name: Pre-Build | ||
shell: pwsh | ||
run: ./.azure/pre-build.ps1 -Arch ${{ matrix.arch }} | ||
- name: Build | ||
run: msbuild ./build/ALL_BUILD.vcxproj /p:Configuration=Release /p:Platform=${{ matrix.arch }} | ||
- name: Post-Build | ||
shell: pwsh | ||
run: ./.azure/post-build.ps1 -Arch ${{ matrix.arch }} | ||
- name: Upload | ||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 | ||
with: | ||
name: bin-windows-${{ matrix.arch }} | ||
path: | | ||
build/bin/**/*.so | ||
build/bin/**/*.dll | ||
build/bin/**/quicreach | ||
build/bin/**/quicreach.exe | ||
build/bin/**/quicreach.msi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters