[Openvpn-devel] GitHub actions: add MSVC build

Message ID 20210615125616.344-1-lstipakov@gmail.com
State Accepted
Headers show
Series
  • [Openvpn-devel] GitHub actions: add MSVC build
Related show

Commit Message

Lev Stipakov June 15, 2021, 12:56 p.m.
From: Lev Stipakov <lev@openvpn.net>

Signed-off-by: Lev Stipakov <lev@openvpn.net>
---
 .github/workflows/build.yaml | 46 ++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

Comments

Gert Doering June 15, 2021, 1:27 p.m. | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

Looks reasonable.  Getting more test coverage on MSVC is good.

Will this put build artefacts somewhere where people can download
and test MSVC builds?  Or is it "just openvpn.exe", but not a complete
installer?  The file looks like "*.exe and *.dll" (but at least this).

Where does it report compile errors to?

Your patch has been applied to the master and release/2.5 branch.

commit e007cc260edb0f24ad8f8468fbe7daf9efde85dc (master)
commit 1ca147bd716b4f756072c44fe7713f05f147bfc6 (release/2.5)
Author: Lev Stipakov
Date:   Tue Jun 15 15:56:16 2021 +0300

     GitHub actions: add MSVC build

     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>


--
kind regards,

Gert Doering
Lev Stipakov June 15, 2021, 2:31 p.m. | #2
Hi,

> Will this put build artefacts somewhere where people can download
> and test MSVC builds?  Or is it "just openvpn.exe", but not a complete
> installer?  The file looks like "*.exe and *.dll" (but at least this).

One could download artifacts from https://github.com/OpenVPN/openvpn/actions,
for example https://github.com/OpenVPN/openvpn/actions/runs/939447024
(latest master).
At the moment it is .exe and .dll.

Building installer requires openvpn-build. I think this is something
Samuli works on (related to buildbot).

> Where does it report compile errors to?

At the moment to GitHub Actions page
(https://github.com/OpenVPN/openvpn/actions). If needed we could
look into email notifications (and maybe IRC?).

-Lev
Gert Doering June 15, 2021, 3 p.m. | #3
Hi,

On Tue, Jun 15, 2021 at 05:31:02PM +0300, Lev Stipakov wrote:
> > Where does it report compile errors to?
> 
> At the moment to GitHub Actions page
> (https://github.com/OpenVPN/openvpn/actions). If needed we could
> look into email notifications (and maybe IRC?).

That would be cool indeed (e-mail and/or IRC :) ).

gert

Patch

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 410d6e1d..5d7dd37b 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -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