forked from wolfSSL/wolfPKCS11
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwolfssl-v5.6.6-build-workflow.yml
More file actions
97 lines (83 loc) · 2.56 KB
/
wolfssl-v5.6.6-build-workflow.yml
File metadata and controls
97 lines (83 loc) · 2.56 KB
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: wolfPKCS11 Build Workflow with wolfSSL v5.6.6-stable
on:
workflow_call:
inputs:
config:
required: false
type: string
check:
required: false
type: string
default: 'make check'
jobs:
build:
runs-on: ubuntu-latest
steps:
#pull wolfPKCS11
- uses: actions/checkout@v4
with:
submodules: true
#setup wolfssl at v5.6.6-stable tag
- uses: actions/checkout@v4
with:
repository: wolfssl/wolfssl
ref: v5.6.6-stable
path: wolfssl
# Cache wolfSSL build
- name: Cache wolfSSL build
id: cache-wolfssl
uses: actions/cache@v4
with:
path: |
wolfssl/src/.libs
wolfssl/wolfcrypt/src/.libs
wolfssl/wolfssl/*.h
wolfssl/wolfcrypt/wolfcrypt/*.h
/usr/local/lib/libwolfssl*
/usr/local/include/wolfssl
key: wolfssl-v5.6.6-stable-${{ hashFiles('wolfssl/configure.ac', 'wolfssl/wolfssl/version.h') }}
restore-keys: |
wolfssl-v5.6.6-stable-
# Build wolfSSL only if cache miss
- name: wolfssl autogen
if: steps.cache-wolfssl.outputs.cache-hit != 'true'
working-directory: ./wolfssl
run: ./autogen.sh
- name: wolfssl configure
if: steps.cache-wolfssl.outputs.cache-hit != 'true'
working-directory: ./wolfssl
run: |
./configure --enable-aescfb --enable-rsapss --enable-keygen --enable-pwdbased --enable-scrypt \
C_EXTRA_FLAGS="-DWOLFSSL_PUBLIC_MP -DWC_RSA_DIRECT -DHAVE_AES_ECB -DHAVE_AES_KEYWRAP"
- name: wolfssl make install
if: steps.cache-wolfssl.outputs.cache-hit != 'true'
working-directory: ./wolfssl
run: make
- name: wolfssl make install
if: steps.cache-wolfssl.outputs.cache-hit != 'true'
working-directory: ./wolfssl
run: |
sudo make install
sudo ldconfig
# Restore wolfSSL from cache if available
- name: Restore wolfSSL from cache
if: steps.cache-wolfssl.outputs.cache-hit == 'true'
run: sudo ldconfig
#setup wolfPKCS11
- name: wolfpkcs11 autogen
run: ./autogen.sh
- name: wolfpkcs11 configure
run: ./configure ${{inputs.config}}
- name: wolfpkcs11 make
run: make
- name: wolfpkcs11 make check
run: ${{inputs.check}}
# capture logs on failure
- name: Upload failure logs
if: failure() || cancelled()
uses: actions/upload-artifact@v4
with:
name: wolfpkcs11-v5.6.6-test-logs
path: |
test-suite.log
retention-days: 5