forked from opentibiabr/otservbr-global-archived
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (73 loc) · 3.21 KB
/
build-windows.yml
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
---
name: Build on Windows
on: [push, pull_request]
jobs:
job:
name: ${{ matrix.os }}-${{ matrix.buildtype }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
buildtype: [Debug, Release]
include:
- os: windows-latest
triplet: x64-windows
packages: >
boost-asio boost-iostreams boost-system boost-filesystem
boost-variant boost-lockfree cryptopp curl jsoncpp
luajit libmariadb pugixml spdlog
steps:
- uses: actions/checkout@v2
- uses: lukka/get-cmake@latest
- name: Windows - remove C:/mysql*
run: rm -r -fo C:/mysql*
if: contains( matrix.os, 'windows')
- name: Restore artifacts, or setup vcpkg (do not install any package)
uses: lukka/run-vcpkg@v7
with:
setupOnly: true
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
appendedCacheKey: ${{ hashFiles( '**/vcpkg.json' ) }}
vcpkgTriplet: ${{ matrix.triplet }}
additionalCachedPaths: ${{ github.workspace }}/build/vcpkg_installed
vcpkgGitCommitId: b9cd2a7958dec657fb869ec487d2a98cf39a8d48
- name: Run CMake to install the dependencies specified in the vcpkg.json manifest, generate project file and build the project
uses: lukka/run-cmake@v3
with:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
buildDirectory: ${{ github.workspace }}/build
useVcpkgToolchainFile: true
buildWithCMake: true
cmakeBuildType: ${{ matrix.buildtype }}
- name: Copy artifacts
if: ${{ matrix.buildtype == 'Release' && github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/test' }}
shell: pwsh
run: |
Copy-Item -Path ${{ github.workspace }}\build\bin\* -Destination ${{ github.workspace }} -Recurse
- name: Create and Upload Full Datapack
if: ${{ matrix.buildtype == 'Release' && github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/test' }}
uses: actions/upload-artifact@v2
with:
name: otbr-full-${{ matrix.os }}-${{ matrix.buildtype }}-${{ github.sha }}
path: |
${{ github.workspace }}
!${{ github.workspace }}/build/
!${{ github.workspace }}/vcpkg/
!${{ github.workspace }}/.git/
!${{ github.workspace }}/.github/
!${{ github.workspace }}/.appveyor.yml
!${{ github.workspace }}/.editorconfig
!${{ github.workspace }}/.gitignore
!${{ github.workspace }}/.reviewdog.yml
!${{ github.workspace }}/.travis.yml
!${{ github.workspace }}/tests/
!${{ github.workspace }}/cmake/
!${{ github.workspace }}/sonar-project.properties
!${{ github.workspace }}/Jenkinsfile
- name: Create and Upload Server Only
if: ${{ matrix.buildtype == 'Release' && github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/test' }}
uses: actions/upload-artifact@v2
with:
name: otbr-server-only-${{ matrix.os }}-${{ matrix.buildtype }}-${{ github.sha }}
path: |
${{ github.workspace }}/build/bin/