-
Notifications
You must be signed in to change notification settings - Fork 6
116 lines (108 loc) · 3.47 KB
/
build_openssl_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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
---
name: windows-openssl
on:
- push
jobs:
Build-Libs-OpenSSL-Win:
name: Build-OpenSSL-Lib-Windows
runs-on: windows-latest
if: |+
contains(github.event.head_commit.message, '[all]') ||
contains(github.event.head_commit.message, '[windows]') ||
contains(github.event.head_commit.message, '[windows-openssl]') ||
contains(github.event.head_commit.message, '[openssl]')
strategy:
matrix:
arch:
- amd64
- amd64_x86
shared:
- shared
- no-shared
steps:
- name: Get openssl
uses: actions/checkout@v3
with:
repository: openssl/openssl
ref: openssl-3.0.16
path: openssl
- name: Setup msbuild environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- uses: ilammy/[email protected]
name: Install NASM
- uses: shogo82148/actions-setup-perl@v1
name: Install PERL
with:
distribution: strawberry
- name: Build OpenSSL x86
if: matrix.arch == 'amd64_x86' && matrix.shared == 'no-shared'
run: |
cd openssl
perl Configure no-tests no-shared VC-WIN32
nmake
mkdir build
mkdir build/win32
move libcrypto.lib build/win32
move libssl.lib build/win32
- name: Build Shared OpenSSL x86
if: matrix.arch == 'amd64_x86' && matrix.shared == 'shared'
run: |
cd openssl
perl Configure no-tests VC-WIN32
nmake
mkdir build
mkdir build/win32
move libcrypto-3.dll build/win32
move libssl-3.dll build/win32
- name: Build OpenSSL x64
if: matrix.arch == 'amd64' && matrix.shared == 'no-shared'
run: |
cd openssl
perl Configure no-tests no-shared VC-WIN64A
nmake
mkdir build
mkdir build/win64
move libcrypto.lib build/win64
move libssl.lib build/win64
move include build/include
- name: Build Shared OpenSSL x64
if: matrix.arch == 'amd64' && matrix.shared == 'shared'
run: |
cd openssl
perl Configure no-tests VC-WIN64A
nmake
mkdir build
mkdir build/win64
move libcrypto-3-x64.dll build/win64
move libssl-3-x64.dll build/win64
- name: Archive Windows OpenSSL libs
uses: actions/upload-artifact@v4
with:
retention-days: 1
name: windows-openssl-${{ matrix.arch }}-${{ matrix.shared }}
path: openssl/build
github-release:
name: GitHub Release
needs: Build-Libs-OpenSSL-Win
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Setup | Checkout
uses: actions/checkout@v2
- name: Setup | Artifacts
uses: actions/download-artifact@v4
- name: Setup | Checksums
run: for file in $(find ./ -name '*.lib' -or -name '*.dll' ); do openssl dgst
-sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
- name: Zip ALL
run: for file in *; do zip -r ${file%.*}.zip $file; done
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "*.zip"
tag: ${{ github.ref }}
overwrite: true
file_glob: true