Skip to content

github-actions: add gui build #170

github-actions: add gui build

github-actions: add gui build #170

Workflow file for this run

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 GUI
working-directory: ${{env.GITHUB_WORKSPACE}}\gui
shell: cmd
run: |
mkdir build&& cd build&& cmake ..&& cmake --build . --config Release
- 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.*
msm\${{ matrix.arch }}\${{matrix.build_conf}}\installer.dll
msm\*.msi
msm\*.msm