forked from OpenVPN/ovpn-dco-win
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (54 loc) · 2.17 KB
/
msbuild.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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@v2
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