87 lines (73 loc) · 3.77 KB
/
win.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
name: win
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
runs-on: windows-2016
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout nunchuk-qt
working-directory: ${{runner.workspace}}
env:
GITLAB_AT: ${{ secrets.GITLAB_AT }}
run: |
git clone -b online https://bakaoh:$env:GITLAB_AT@gitlab.com/nunchuck/nunchuck-qt nunchuk-qt --depth 1
cd nunchuk-qt
git submodule update --init --recursive
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Restore from cache and install vcpkg
uses: lukka/run-vcpkg@v5
with:
vcpkgArguments: 'boost libevent berkeleydb sqlite3 sqlcipher zeromq qt5 qt5-graphicaleffects qt5-quickcontrols'
vcpkgDirectory: '${{ runner.workspace }}/vcpkg'
vcpkgTriplet: 'x64-windows'
vcpkgGitCommitId: '539a182d3773b9a84807b978c9684ba471446bf4'
- name: Config Bitcoin Core
working-directory: ${{runner.workspace}}/nunchuk-qt/contrib/libnunchuk/contrib/bitcoin/build_msvc
run: |
& "$env:VCPKG_ROOT\vcpkg" integrate install
git config user.email "you@example.com"
git config user.name "Your Name"
git am ${{runner.workspace}}\windeploynunchuk\patches\0001-Unload-qt.patch
py -3 msvc-autogen.py -toolset v141
- name: Build Bitcoin Core
if: steps.cache-contrib.outputs.cache-hit != 'true'
working-directory: ${{runner.workspace}}/nunchuk-qt/contrib/libnunchuk/contrib/bitcoin/build_msvc
shell: cmd
run: |
set CL=/D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
msbuild /m bitcoin.sln /p:Platform=x64 /p:Configuration=Release /t:build /m:8 /p:DefineConstants=_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
del /q ${{runner.workspace}}\nunchuk-qt\contrib\libnunchuk\contrib\bitcoin\build_msvc\x64\Release
- name: Build nunchuk-qt
working-directory: ${{runner.workspace}}
shell: cmd
run: |
copy /Y %VCPKG_ROOT%\installed\x64-windows\bin\event* %VCPKG_ROOT%\installed\x64-windows\lib
cmake -E make_directory ${{runner.workspace}}\build
cd build
cmake ${{runner.workspace}}\nunchuk-qt -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DUR__DISABLE_TESTS=ON -DCMAKE_GENERATOR_PLATFORM=x64
cmake --build . --config Release -j8
- name: Create Zip
working-directory: ${{runner.workspace}}/windeploynunchuk
shell: powershell
run: |
curl "https://github.com/bitcoin-core/HWI/releases/download/1.2.1/hwi-1.2.1-windows-amd64.zip" -O hwi.zip
Expand-Archive -Force .\hwi.zip .
Copy-Item -Path "${{runner.workspace}}\build\Release" -Destination ".\nunchuk-windows\app" -Recurse
Copy-Item -Path ".\hwi.exe" -Destination ".\nunchuk-windows\app"
Rename-Item -Path ".\nunchuk-windows\app\nunchuck-client-qt.exe" -NewName "nunchuk-client-qt.exe"
Copy-Item -Path "$env:VCPKG_ROOT\installed\x64-windows\bin\Qt5*.dll" -Destination ".\nunchuk-windows\app"
Copy-Item -Path "C:\Windows\System32\msvcp*.dll" -Destination ".\nunchuk-windows\app"
Copy-Item -Path "C:\Windows\System32\vccorlib*.dll" -Destination ".\nunchuk-windows\app"
Copy-Item -Path "C:\Windows\System32\vcruntime*.dll" -Destination ".\nunchuk-windows\app"
Compress-Archive -Path ".\nunchuk-windows" -DestinationPath ".\nunchuk-windows.zip"
- name: Upload Artifact
uses: 'actions/upload-artifact@v2.2.4'
with:
name: nunchuk-windows
path: ${{runner.workspace}}/windeploynunchuk/nunchuk-windows/