mirror of
https://github.com/amnezia-vpn/openvpn3.git
synced 2026-06-28 21:17:32 +03:00
- build for x86/x64/arm64 - fix run-cmake step - fix caching - add upload artifacts - update vcpkg commit Signed-off-by: Lev Stipakov <lev@openvpn.net>
53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
name: Build
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
msvc:
|
|
strategy:
|
|
matrix:
|
|
arch: [x86, amd64, amd64_arm64]
|
|
|
|
env:
|
|
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
|
|
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: 'd8d61c941c333a147edffdcbdc9964dc0c0962f5'
|
|
additionalCachedPaths: ${{ env.buildDir }}/vcpkg_installed
|
|
appendedCacheKey: ${{ matrix.arch }}-${{ hashFiles( '**/vcpkg.json' ) }}
|
|
|
|
- name: Run CMake with vcpkg.json manifest
|
|
uses: lukka/run-cmake@v3
|
|
env:
|
|
VCPKG_OVERLAY_PORTS: '${{ github.workspace }}/deps/vcpkg-ports'
|
|
with:
|
|
useVcpkgToolchainFile: true
|
|
buildDirectory: '${{ env.buildDir }}'
|
|
buildWithCMake: true
|
|
cmakeAppendedArgs: '-DCLI_OVPNDCOWIN=ON'
|
|
cmakeBuildType: ${{env.BUILD_CONFIGURATION}}
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: openvpn3-${{ matrix.arch }}
|
|
path: |
|
|
${{ env.buildDir }}/**/*.exe
|
|
${{ env.buildDir }}/**/*.dll
|
|
!${{ env.buildDir }}/test/ssl/**
|
|
!${{ env.buildDir }}/test/unittests/**
|
|
!${{ env.buildDir }}/CMakeFiles/**
|
|
!${{ env.buildDir }}/vcpkg_installed/**
|