-
Notifications
You must be signed in to change notification settings - Fork 54
124 lines (103 loc) · 3.97 KB
/
windows_build.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
name: Windows Build
# This machine tests building the software on a both 32 and 64 Windows architecture.
on: [push]
jobs:
job_1:
name: Build dist with Linux
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Install prerequisites
run: |
set -x
sudo apt -q update
sudo apt install libpcsclite-dev gengetopt help2man libedit-dev libcurl4-openssl-dev libssl-dev libusb-1.0-0-dev
- name: Create tar.gz
run: |
set -x
./resources/make_src_dist.sh
cd ..
mkdir artifact
mv $GITHUB_WORKSPACE/yubihsm-shell-.tar.gz artifact/
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: yubihsm-shell-src
path: ../artifact
job_2:
name: Build Windows x86
needs: job_1
runs-on: windows-latest
steps:
- name: Download source from job_1
uses: actions/download-artifact@v1
with:
name: yubihsm-shell-src
- name: Extract source
run: |
Set-PSDebug -Trace 1
cd yubihsm-shell-src
tar xf yubihsm-shell-.tar.gz
- name: Build and make MSI installer
run: |
Set-PSDebug -Trace 1
$YHSHELL_SRC_DIR="$env:GITHUB_WORKSPACE\yubihsm-shell-src\yubihsm-shell-"
$MERGEDPATH = Get-ChildItem "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\14.*\MergeModules\Microsoft_VC141_CRT_x86.msm"
cd $YHSHELL_SRC_DIR/resources/release/win
./make_release_binaries.ps1 Win32 C:/vcpkg
cd $YHSHELL_SRC_DIR/resources/release/win
./repack_installer.ps1 x86 $env:WIX\bin "$MERGEDPATH"
cd yubihsm-shell-x86/bin
./yubihsm-shell.exe --version
./yubihsm-shell.exe --help
mkdir $env:GITHUB_WORKSPACE/artifact
cp -r $YHSHELL_SRC_DIR/resources/release/win/yubihsm-shell-x86.msi $env:GITHUB_WORKSPACE/artifact/
- name: Install yubihsm-shell
run: |
Set-PSDebug -Trace 1
cd "$env:GITHUB_WORKSPACE\yubihsm-shell-src\yubihsm-shell-\resources\release\win"
msiexec /i yubihsm-shell-x86.msi /quiet /log $env:GITHUB_WORKSPACE/artifact/log_x86.txt
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: yubihsm-shell-win32
path: artifact
job_3:
name: Build Windows x64
needs: job_1
runs-on: windows-latest
steps:
- name: Download source from job_1
uses: actions/download-artifact@v1
with:
name: yubihsm-shell-src
- name: Extract source
run: |
Set-PSDebug -Trace 1
cd yubihsm-shell-src
tar xf yubihsm-shell-.tar.gz
- name: Build and make MSI installer
run: |
Set-PSDebug -Trace 1
$YHSHELL_SRC_DIR="$env:GITHUB_WORKSPACE\yubihsm-shell-src\yubihsm-shell-"
$MERGEDPATH = Get-ChildItem "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\14.*\MergeModules\Microsoft_VC141_CRT_x86.msm"
cd $YHSHELL_SRC_DIR/resources/release/win
./make_release_binaries.ps1 x64 C:/vcpkg
cd $YHSHELL_SRC_DIR/resources/release/win
./repack_installer.ps1 x64 $env:WIX\bin "$MERGEDPATH"
cd yubihsm-shell-x64/bin
./yubihsm-shell.exe --version
./yubihsm-shell.exe --help
mkdir $env:GITHUB_WORKSPACE/artifact
cp -r $YHSHELL_SRC_DIR/resources/release/win/yubihsm-shell-x64.msi $env:GITHUB_WORKSPACE/artifact/
- name: Install yubihsm-shell
run: |
Set-PSDebug -Trace 1
cd "$env:GITHUB_WORKSPACE\yubihsm-shell-src\yubihsm-shell-\resources\release\win"
msiexec /i yubihsm-shell-x64.msi /quiet /log $env:GITHUB_WORKSPACE/artifact/log_x64.txt
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: yubihsm-shell-win64
path: artifact