Repository navigation
115 lines (94 loc) · 4.1 KB
/
Copy pathwin-test.yml
File metadata and controls
115 lines (94 loc) · 4.1 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Windows Build Test
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
jobs:
build:
runs-on: windows-latest
# This should be a safe limit for the tests to run.
timeout-minutes: 6
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: wolfpkcs11\IDE\VisualStudio\wolfpkcs11.sln
# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Debug
BUILD_PLATFORM: x64
steps:
- name: Pull wolfPKCS11
uses: actions/checkout@master
with:
repository: wolfssl/wolfpkcs11
path: wolfpkcs11
- name: Pull wolfTPM
uses: actions/checkout@master
with:
repository: wolfssl/wolftpm
path: wolftpm
- name: Pull wolfSSL
uses: actions/checkout@master
with:
repository: wolfssl/wolfssl
path: wolfssl
- name: Create FIPS stub files (autogen)
working-directory: wolfssl
run: |
echo $null >> wolfcrypt\src\fips.c
echo $null >> wolfcrypt\src\fips_test.c
echo $null >> wolfcrypt\src\wolfcrypt_first.c
echo $null >> wolfcrypt\src\wolfcrypt_last.c
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:PlatformToolset=v142 /p:Platform=${{env.BUILD_PLATFORM}} /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
# The GitHub CI runners do not have a TPM.
# Failure 0x8028400f: unknown error number
# TBS_E_TPM_NOT_FOUND (0x8028400F) A compatible Trusted Platform Module (TPM) Security Device cannot be found on this computer.
#- name: Run Wrap Test
# working-directory: ${{env.GITHUB_WORKSPACE}}
# run: wolfpkcs11\IDE\VisualStudio\Debug\x64\pkcs11test.exe
# The solution above enables wolfTPM, so its tests cannot run on the CI
# runners. Build with CMake and MSVC without wolfTPM instead and run
# token_path_test, which covers the Windows default token path
# (%APPDATA%\wolfPKCS11).
cmake-token-path:
runs-on: windows-latest
timeout-minutes: 20
defaults:
run:
shell: bash
steps:
- name: Pull wolfPKCS11
uses: actions/checkout@v4
with:
path: wolfpkcs11
- name: Pull wolfSSL
uses: actions/checkout@v4
with:
repository: wolfssl/wolfssl
path: wolfssl
- name: Build wolfSSL
working-directory: wolfssl
run: |
cmake -B build -DCMAKE_INSTALL_PREFIX="$(cygpath -m "$GITHUB_WORKSPACE/install")" \
-DBUILD_SHARED_LIBS=OFF -DWOLFSSL_EXAMPLES=no -DWOLFSSL_CRYPT_TESTS=no \
-DWOLFSSL_KEYGEN=yes -DWOLFSSL_RSA_PSS=yes -DWOLFSSL_HKDF=yes \
-DWOLFSSL_MD5=yes -DWOLFSSL_SHA224=yes -DWOLFSSL_SHA3=yes \
-DWOLFSSL_PWDBASED=yes -DWOLFSSL_PUBLIC_MP=yes -DWOLFSSL_WC_RSA_DIRECT=yes
cmake --build build --config Release
cmake --install build --config Release
- name: Build token_path_test
working-directory: wolfpkcs11
run: |
cmake -B build -DCMAKE_PREFIX_PATH="$(cygpath -m "$GITHUB_WORKSPACE/install")" \
-DBUILD_SHARED_LIBS=OFF -DWOLFPKCS11_PBKDF2=yes -DWOLFPKCS11_EXAMPLES=no
cmake --build build --config Release --target token_path_test
- name: Run token_path_test
working-directory: wolfpkcs11
run: ctest --test-dir build -C Release -R '^token_path_test$' --no-tests=error --output-on-failure