forked from vmangos/core
-
Notifications
You must be signed in to change notification settings - Fork 0
158 lines (144 loc) · 7.89 KB
/
dev-release.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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name: Windows Development Release
on:
push:
branches:
- development
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
- '.github/ISSUE_TEMPLATE.md'
- '.github/PULL_REQUEST_TEMPLATE.md'
- '.github/workflows/db_check.yml'
- '.github/workflows/db_dump.yml'
- 'sql/**'
- '.drone.yml'
- 'README.md'
- 'LICENSE'
- '.gitignore'
- 'CONTRIBUTING.md'
jobs:
build:
runs-on: windows-2019
steps:
#git checkout
- uses: actions/checkout@v4
- name: windows dependencies
#Sets versions for ACE/TBB
env:
ACE_VERSION: 6.5.11
ACE_VERSION2: 6_5_11
TBB_VERSION: 2020.3
run: |
#directory variables
export ACE_ROOT=$GITHUB_WORKSPACE/ACE_wrappers
export TBB_ROOT_DIR=$GITHUB_WORKSPACE/tbb
#ACE package download
curl -LOJ http://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-$ACE_VERSION2/ACE-$ACE_VERSION.zip
unzip ACE-$ACE_VERSION.zip
rm ACE-$ACE_VERSION.zip
#configuration of ACE header
echo "#include \"ace/config-win32.h\"" >> $ACE_ROOT/ace/config.h
#TBB package download
curl -LOJ https://github.com/oneapi-src/oneTBB/releases/download/v$TBB_VERSION/tbb-$TBB_VERSION-win.zip
unzip tbb-$TBB_VERSION-win.zip
rm tbb-$TBB_VERSION-win.zip
#git bash shell
shell: bash
#build and install
- name: windows build & install
run: |
#directory variables
export ACE_ROOT=$GITHUB_WORKSPACE/ACE_wrappers
cd $GITHUB_WORKSPACE/ACE_wrappers
/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2019/Enterprise/MSBuild/Current/Bin/MSBuild.exe "ACE_wrappers_vs2019.sln" //p:Configuration=Release //p:Platform=x64 //t:ACE //m:2
cd $GITHUB_WORKSPACE
mkdir build
cd build
cmake -D TBB_ROOT_DIR=$GITHUB_WORKSPACE/tbb -DWITH_WARNINGS=0 -DUSE_EXTRACTORS=1 -G "Visual Studio 16 2019" -A x64 ..
/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2019/Enterprise/MSBuild/Current/Bin/MSBuild.exe "MaNGOS.sln" //p:Platform=x64 //p:Configuration=Release //m:2
#git bash shell
shell: bash
- name: Create Upload File Name
run: |
echo "ARCHIVE_FILENAME=${{ github.event.repository.name }}-$(git rev-parse --short HEAD).zip" >> $env:GITHUB_ENV
- name: Archive files
run: |
#data is in Release folder
cd ${{github.workspace}}/bin
copy ${{github.workspace}}/tbb/bin/intel64/vc14/tbb.dll ${{github.workspace}}/bin/Release/tbb.dll
copy ${{github.workspace}}/tbb/bin/intel64/vc14/tbb_debug.dll ${{github.workspace}}/bin/Release/tbb_debug.dll
copy ${{github.workspace}}/tbb/bin/intel64/vc14/tbb_preview.dll ${{github.workspace}}/bin/Release/tbb_preview.dll
copy ${{github.workspace}}/tbb/bin/intel64/vc14/tbb_preview_debug.dll ${{github.workspace}}/bin/Release/tbb_preview_debug.dll
copy ${{github.workspace}}/tbb/bin/intel64/vc14/tbbmalloc.dll ${{github.workspace}}/bin/Release/tbbmalloc.dll
copy ${{github.workspace}}/tbb/bin/intel64/vc14/tbbmalloc_debug.dll ${{github.workspace}}/bin/Release/tbbmalloc_debug.dll
copy ${{github.workspace}}/tbb/bin/intel64/vc14/tbbmalloc_proxy.dll ${{github.workspace}}/bin/Release/tbbmalloc_proxy.dll
copy ${{github.workspace}}/tbb/bin/intel64/vc14/tbbmalloc_proxy_debug.dll ${{github.workspace}}/bin/Release/tbbmalloc_proxy_debug.dll
copy ${{github.workspace}}/ACE_wrappers/lib/ACE.dll ${{github.workspace}}/bin/Release/ACE.dll
copy ${{github.workspace}}/dep/windows/lib/x64_release/libmySQL.dll ${{github.workspace}}/bin/Release/libmySQL.dll
# copy "c:/Program Files/OpenSSL-Win64/bin/libssl-1_1-x64.dll" ${{github.workspace}}/bin/Release/libssl-1_1-x64.dll
# copy "c:/Program Files/OpenSSL-Win64/bin/libcrypto-1_1-x64.dll" ${{github.workspace}}/bin/Release/libcrypto-1_1-x64.dll
copy ${{github.workspace}}/dep/windows/lib/x64_release/libeay32.dll ${{github.workspace}}/bin/Release/libeay32.dll
7z a -tzip ${{env.ARCHIVE_FILENAME}} Release
- name: Archive this artefact
uses: actions/upload-artifact@v4
with:
name: snapshot-devbuild-without-anticheat
path: "${{github.workspace}}/bin/${{env.ARCHIVE_FILENAME}}"
#build with anticheat and install
- name: windows build with anticheat & install
run: |
#directory variables
export ACE_ROOT=$GITHUB_WORKSPACE/ACE_wrappers
cd $GITHUB_WORKSPACE/ACE_wrappers
/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2019/Enterprise/MSBuild/Current/Bin/MSBuild.exe "ACE_wrappers_vs2019.sln" //p:Configuration=Release //p:Platform=x64 //t:ACE //m:2
cd $GITHUB_WORKSPACE
mkdir buildac
cd buildac
cmake -D TBB_ROOT_DIR=$GITHUB_WORKSPACE/tbb -DWITH_WARNINGS=0 -DUSE_EXTRACTORS=1 -DUSE_ANTICHEAT=1 -G "Visual Studio 16 2019" -A x64 ..
/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2019/Enterprise/MSBuild/Current/Bin/MSBuild.exe "MaNGOS.sln" //p:Platform=x64 //p:Configuration=Release //m:2
#git bash shell
shell: bash
- name: Create Upload File Name
run: |
echo "ARCHIVE_FILENAME=${{ github.event.repository.name }}-$(git rev-parse --short HEAD)-with-anticheat.zip" >> $env:GITHUB_ENV
- name: Archive files
run: |
#data is in Release folder
cd ${{github.workspace}}/bin
copy ${{github.workspace}}/tbb/bin/intel64/vc14/tbb.dll ${{github.workspace}}/bin/Release/tbb.dll
copy ${{github.workspace}}/tbb/bin/intel64/vc14/tbb_debug.dll ${{github.workspace}}/bin/Release/tbb_debug.dll
copy ${{github.workspace}}/tbb/bin/intel64/vc14/tbb_preview.dll ${{github.workspace}}/bin/Release/tbb_preview.dll
copy ${{github.workspace}}/tbb/bin/intel64/vc14/tbb_preview_debug.dll ${{github.workspace}}/bin/Release/tbb_preview_debug.dll
copy ${{github.workspace}}/tbb/bin/intel64/vc14/tbbmalloc.dll ${{github.workspace}}/bin/Release/tbbmalloc.dll
copy ${{github.workspace}}/tbb/bin/intel64/vc14/tbbmalloc_debug.dll ${{github.workspace}}/bin/Release/tbbmalloc_debug.dll
copy ${{github.workspace}}/tbb/bin/intel64/vc14/tbbmalloc_proxy.dll ${{github.workspace}}/bin/Release/tbbmalloc_proxy.dll
copy ${{github.workspace}}/tbb/bin/intel64/vc14/tbbmalloc_proxy_debug.dll ${{github.workspace}}/bin/Release/tbbmalloc_proxy_debug.dll
copy ${{github.workspace}}/ACE_wrappers/lib/ACE.dll ${{github.workspace}}/bin/Release/ACE.dll
copy ${{github.workspace}}/dep/windows/lib/x64_release/libmySQL.dll ${{github.workspace}}/bin/Release/libmySQL.dll
# copy "c:/Program Files/OpenSSL-Win64/bin/libssl-1_1-x64.dll" ${{github.workspace}}/bin/Release/libssl-1_1-x64.dll
# copy "c:/Program Files/OpenSSL-Win64/bin/libcrypto-1_1-x64.dll" ${{github.workspace}}/bin/Release/libcrypto-1_1-x64.dll
copy ${{github.workspace}}/dep/windows/lib/x64_release/libeay32.dll ${{github.workspace}}/bin/Release/libeay32.dll
7z a -tzip ${{env.ARCHIVE_FILENAME}} Release
- name: Archive this artefact
uses: actions/upload-artifact@v4
with:
name: snapshot-devbuild-with-anticheat
path: "${{github.workspace}}/bin/${{env.ARCHIVE_FILENAME}}"
- name: Download artifact snapshot-Release
uses: actions/download-artifact@v4
with:
pattern: snapshot-devbuild-*
merge-multiple: true
path: all_snapshots
- name: Get current date
id: date
uses: Kaven-Universe/github-action-current-date-time@v1
with:
format: "YYYY-MM-DD"
- name: Upload snapshot
uses: "crowbarmaster/GH-Automatic-Releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build(${{ steps.date.outputs.time }})"
files: all_snapshots