-
Notifications
You must be signed in to change notification settings - Fork 463
123 lines (108 loc) · 4.83 KB
/
Copy pathmsbuild.yml
File metadata and controls
123 lines (108 loc) · 4.83 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Build
on: [push, pull_request]
jobs:
msvc:
strategy:
matrix:
arch: [x86, x64, arm64]
include:
- arch: x64
cmake_dir: amd64
- arch: x86
cmake_dir: x86
- arch: arm64
cmake_dir: arm64
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
VCPKG_DEFAULT_TRIPLET: ${{ matrix.arch }}-windows
VCPKG_GIT_COMMIT_ID: d7b75fa8a30478ae5b5eb86ac730f851ef036875
BUILD_CONFIGURATION: Release
runs-on: windows-2025
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: lukka/get-cmake@591817e96fcad43505fb4eae36172462abb3a42e # v4.3.3
- name: Install vcpkg
uses: lukka/run-vcpkg@b1a0dd252f06b9e25b3c022a9a03bd7a427fb6a2 # v11.6
env:
VCPKG_BINARY_SOURCES: default,rw
with:
vcpkgGitCommitId: ${{ env.VCPKG_GIT_COMMIT_ID }}
vcpkgJsonGlob: '**/windows/vcpkg.json'
- name: Set up vcpkg binary cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: ${{ runner.os }}-${{ matrix.arch }}-vcpkg-binary-cache-${{ hashFiles('**/windows/vcpkg.json') }}-${{ env.VCPKG_GIT_COMMIT_ID }}
restore-keys: |
${{ runner.os }}-${{ matrix.arch }}-vcpkg-binary-cache-${{ hashFiles('**/windows/vcpkg.json') }}-
${{ runner.os }}-${{ matrix.arch }}-vcpkg-binary-cache-
- name: Run CMake with vcpkg.json manifest
uses: lukka/run-cmake@5d55ea7949e25f69f0ecb516d8d572297e03a956 # v10.9
if: ${{ matrix.arch != 'arm64' }}
env:
# make sure legacy provider is available for UTs
OPENSSL_MODULES: ${{ github.workspace }}\build\msvc\${{ matrix.cmake_dir }}\vcpkg_installed\${{ env.VCPKG_DEFAULT_TRIPLET }}\bin
with:
configurePreset: win-${{ matrix.arch }}-release
buildPreset: win-${{ matrix.arch }}-release
testPreset: win-${{ matrix.arch }}-release
testPresetAdditionalArgs: "['--output-on-failure']"
- name: Run CMake with vcpkg.json manifest (NO TESTS)
uses: lukka/run-cmake@5d55ea7949e25f69f0ecb516d8d572297e03a956 # v10.9
if: ${{ matrix.arch == 'arm64' }}
with:
configurePreset: win-${{ matrix.arch }}-release
buildPreset: win-${{ matrix.arch }}-release
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: openvpn3-msvc-${{ matrix.arch }}
path: |
${{ github.workspace }}/build/**/*.exe
${{ github.workspace }}/build/**/*.dll
!${{ github.workspace }}/build/**/test/ssl/**
!${{ github.workspace }}/build/**/test/unittests/**
!${{ github.workspace }}/build/**/CMakeFiles/**
!${{ github.workspace }}/build/**/vcpkg_installed/**
mingw:
strategy:
matrix:
arch: [x86, x64]
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
VCPKG_GIT_COMMIT_ID: d7b75fa8a30478ae5b5eb86ac730f851ef036875
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: lukka/get-cmake@591817e96fcad43505fb4eae36172462abb3a42e # v4.3.3
- name: Install dependencies
run: sudo apt update && sudo apt install -y mingw-w64 unzip cmake build-essential
- name: Install vcpkg
uses: lukka/run-vcpkg@b1a0dd252f06b9e25b3c022a9a03bd7a427fb6a2 # v11.6
env:
VCPKG_BINARY_SOURCES: default,rw
with:
vcpkgGitCommitId: ${{ env.VCPKG_GIT_COMMIT_ID }}
vcpkgJsonGlob: '**/mingw/vcpkg.json'
- name: Set up vcpkg binary cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: ${{ runner.os }}-${{ matrix.arch }}-vcpkg-binary-cache-${{ hashFiles('**/mingw/vcpkg.json') }}-${{ env.VCPKG_GIT_COMMIT_ID }}
restore-keys: |
${{ runner.os }}-${{ matrix.arch }}-vcpkg-binary-cache-${{ hashFiles('**/mingw/vcpkg.json') }}-
${{ runner.os }}-${{ matrix.arch }}-vcpkg-binary-cache-
- name: Run CMake with vcpkg.json manifest
uses: lukka/run-cmake@5d55ea7949e25f69f0ecb516d8d572297e03a956 # v10.9
with:
configurePreset: mingw-${{ matrix.arch }}-release
buildPreset: mingw-${{ matrix.arch }}-release
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: openvpn3-mingw-${{ matrix.arch }}
path: |
${{ github.workspace }}/build/**/*.exe
${{ github.workspace }}/build/**/*.dll
!${{ github.workspace }}/build/**/test/ssl/**
!${{ github.workspace }}/build/**/test/unittests/**
!${{ github.workspace }}/build/**/CMakeFiles/**
!${{ github.workspace }}/build/**/vcpkg_installed/**