Skip to content

Commit

Permalink
GitHub actions: add MSVC build
Browse files Browse the repository at this point in the history
Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20210615125616.344-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22556.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
  • Loading branch information
lstipakov authored and cron2 committed Jun 15, 2021
1 parent 7421234 commit e007cc2
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build.yaml
Expand Up @@ -181,3 +181,49 @@ jobs:
run: make -j4
- name: make check
run: make check

msvc:
strategy:
matrix:
plat: [ARM64, Win32, x64]
include:
- plat: ARM64
triplet: arm64
- plat: Win32
triplet: x86
- plat: x64
triplet: x64

env:
BUILD_CONFIGURATION: Release
VCPKG_OVERLAY_PORTS: ${{ github.workspace }}/contrib/vcpkg-ports
VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}/contrib/vcpkg-triplets

runs-on: windows-latest
steps:
- uses: actions/checkout@v2

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1

- name: Restore artifacts, or run vcpkg, build and cache artifacts
uses: lukka/run-vcpkg@main
with:
vcpkgArguments: 'openssl lz4 lzo pkcs11-helper tap-windows6'
vcpkgTriplet: '${{ matrix.triplet }}-windows-ovpn'
vcpkgGitCommitId: '7d472dd25830da92108eb76642c667aaa40512cb'
cleanAfterBuild: false

- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
vcpkg integrate install
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform="${{ matrix.plat }}" .
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: artifacts-${{ matrix.plat }}
path: |
${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.exe
${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.dll

0 comments on commit e007cc2

Please sign in to comment.