From f22db17272b3d70ce9914fe18df7cdf4a59954a5 Mon Sep 17 00:00:00 2001 From: Lev Stipakov Date: Thu, 13 May 2021 15:03:29 +0300 Subject: [PATCH] add github actions Signed-off-by: Lev Stipakov --- .github/workflows/msbuild.yml | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/msbuild.yml diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml new file mode 100644 index 0000000..1d1f1d7 --- /dev/null +++ b/.github/workflows/msbuild.yml @@ -0,0 +1,45 @@ +# The name of our workflow +name: Build +on: [push, pull_request] + +jobs: + msvc: + strategy: + matrix: + arch: [amd64, amd64_arm64] + + env: + # Indicates the location of the vcpkg as a Git submodule of the project repository. + VCPKG_ROOT: ${{ github.workspace }}/vcpkg + SOLUTION_FILE_PATH: . + BUILD_CONFIGURATION: Release + buildDir: '${{ github.workspace }}/build' + + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: lukka/get-cmake@latest + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.arch }} + + - name: Restore from cache and install vcpkg + uses: lukka/run-vcpkg@v6 + with: + setupOnly: true + vcpkgGitCommitId: 'a267ab118c09f56f3dae96c9a4b3410820ad2f0b' + additionalCachedPaths: ${{ env.buildDir }}/vcpkg_installed + appendedCacheKey: ${{ matrix.arch }}-${{ hashFiles( '**/vcpkg.json' ) }} + + - name: Run CMake with vcpkg.json manifest + uses: lukka/run-cmake@v3 + with: + useVcpkgToolchainFile: true + buildWithCMake: true + buildDirectory: ${{ env.buildDir }} + cmakeAppendedArgs: '-GNinja' + + - uses: actions/upload-artifact@v2 + with: + name: openvpn-gui ${{ matrix.arch }} + path: '${{ env.buildDir }}/openvpn-gui.exe'