This repository has been archived by the owner on May 23, 2021. It is now read-only.
forked from opentibiabr/otservbr-global-archived
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (83 loc) · 3.54 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Build on Windows
on:
push:
branches:
- master
- develop
- v*
tags:
- v*
pull_request:
paths:
- cmake/**
- src/**
- CMakeLists.txt
- .github/**
jobs:
job:
name: ${{ matrix.os }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
name: [windows]
buildtype: [Debug, Release]
luajit: [on, off]
include:
- os: windows
triplet: x64-windows
packages: >
boost-asio boost-iostreams boost-system boost-filesystem
boost-variant boost-lockfree cryptopp curl jsoncpp
luajit libmariadb pugixml
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Unshallow
run: git fetch --prune --unshallow
- name: Get latest CMake
# Using 'latest' branch, the latest CMake is installed.
uses: lukka/get-cmake@latest
- name: Windows - remove C:/mysql*
run: rm -r -fo C:/mysql-5.7.21-winx64
if: contains( matrix.os, 'windows')
- name: Run vcpkg
uses: lukka/run-vcpkg@v5
with:
vcpkgArguments: ${{ matrix.packages }}
vcpkgDirectory: ${{ runner.workspace }}/vcpkg/
vcpkgTriplet: ${{ matrix.triplet }}
vcpkgGitCommitId: 7db401cb1ef1fc559ec9f9ce814d064c328fd767
- name: Build with CMake
uses: lukka/run-cmake@v3.2
with:
useVcpkgToolchainFile: true
buildDirectory: ${{ runner.workspace }}/build
cmakeBuildType: ${{ matrix.buildtype }}
cmakeAppendedArgs: -DUSE_LUAJIT=${{ matrix.luajit }}
- name: dir
run: find $RUNNER_WORKSPACE
shell: bash
- name: Create datapack
shell: powershell
run: |
md ${{ runner.workspace }}\otservbr-global\otservbr-global
Copy-Item ${{ runner.workspace }}\otservbr-global\config.lua.dist ${{ runner.workspace }}\otservbr-global\otservbr-global
Copy-Item ${{ runner.workspace }}\otservbr-global\key.pem ${{ runner.workspace }}\otservbr-global\otservbr-global
Copy-Item ${{ runner.workspace }}\otservbr-global\LICENSE ${{ runner.workspace }}\otservbr-global\otservbr-global
Copy-Item ${{ runner.workspace }}\otservbr-global\README.md ${{ runner.workspace }}\otservbr-global\otservbr-global
Copy-Item ${{ runner.workspace }}\build\otbr.exe ${{ runner.workspace }}\otservbr-global\otservbr-global\otservbr-global.exe
get-childitem -path ${{ runner.workspace }}\build -filter *.dll -recurse | copy-item -destination ${{ runner.workspace }}\otservbr-global\otservbr-global
Copy-Item ${{ runner.workspace }}\otservbr-global\data -Destination ${{ runner.workspace }}\otservbr-global\otservbr-global\data
Copy-Item -Path ${{ runner.workspace }}\otservbr-global\data\* -Destination ${{ runner.workspace }}\otservbr-global\otservbr-global\data -Recurse
Compress-Archive -Path ${{ runner.workspace }}\otservbr-global\otservbr-global -DestinationPath ${{ runner.workspace }}\otservbr.zip
- name: dir
run: find $RUNNER_WORKSPACE
shell: bash
- name: Upload datapack
uses: actions/upload-artifact@v2
with:
name: otbr-${{ matrix.os }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }}
path: ${{ runner.workspace }}/otservbr.zip
if: contains( matrix.os, 'windows')