Improve locking and peer lifetime management #201
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
name: MSBuild | |
on: [push, pull_request] | |
env: | |
SOLUTION_FILE_PATH: . | |
jobs: | |
build: | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
arch: [x64, x86, ARM64] | |
build_conf: [Debug, Release, Debug-Win11, Release-Win11] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Add MSBuild to PATH | |
uses: microsoft/setup-msbuild@v1 | |
- name: Restore artifacts, or run vcpkg, build and cache artifacts | |
uses: lukka/[email protected] | |
with: | |
vcpkgGitCommitId: 'cafd398be781144787573ca78390e951673c7055' | |
vcpkgArguments: 'asio' | |
vcpkgTriplet: '${{ matrix.arch }}-windows' | |
- name: Install Wix 3.14 | |
run: | | |
Invoke-WebRequest -Uri "https://build.openvpn.net/downloads/temp/wix314-toolset.zip" -OutFile wix.zip | |
Expand-Archive -Path .\wix.zip -DestinationPath wix | |
Move-Item '.\wix\WiX Toolset v3.14\bin' .\wix | |
- name: vcpkg integrate install | |
shell: cmd | |
run: | | |
cd vcpkg && vcpkg.exe integrate install | |
- name: Build | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
msbuild /m /p:Configuration=${{ matrix.build_conf }} /p:Platform="${{ matrix.arch }}" ${{env.SOLUTION_FILE_PATH}} | |
- name: Build MSM | |
working-directory: msm | |
if: ${{ matrix.build_conf == 'Release' }} | |
run: | | |
New-Item -Path dist\${{ matrix.arch }}\win10 -type directory -Force | |
New-Item -Path dist\${{ matrix.arch }}\win11 -type directory -Force | |
Copy-Item -Path ..\${{ matrix.arch }}\${{ matrix.build_conf }}\ovpn-dco\* -Destination dist\${{ matrix.arch }}\win10\ -Recurse | |
Copy-Item -Path ..\${{ matrix.arch }}\${{ matrix.build_conf }}\ovpn-dco\* -Destination dist\${{ matrix.arch }}\win11\ -Recurse | |
.\build.ps1 -Arch ${{ matrix.arch }} -Wix ..\wix | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ovpn-dco_${{ matrix.arch }}_${{ matrix.build_conf }} | |
path: | | |
${{ matrix.arch }}\${{matrix.build_conf}}\ovpn-dco\ovpn-dco.* | |
${{ matrix.arch }}\${{matrix.build_conf}}\ovpn-dco-cli.exe | |
msm\${{ matrix.arch }}\${{matrix.build_conf}}\installer.dll | |
msm\*.msi | |
msm\*.msm |