Skip to content

Commit cc06150

Browse files
committed
fix ci
1 parent f4c1b74 commit cc06150

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

.github/workflows/test-wolfhsm-simulator.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,34 @@ jobs:
1616
config:
1717
- name: "wolfHSM client ECC"
1818
file: "config/examples/sim-wolfHSM-client-ecc.config"
19+
needs_posix_server: true
20+
posix_server_nvminit: false
21+
needs_nvm_image: false
1922
- name: "wolfHSM client ML-DSA"
2023
file: "config/examples/sim-wolfHSM-client-mldsa.config"
24+
needs_posix_server: true
25+
posix_server_nvminit: false
26+
needs_nvm_image: false
2127
- name: "wolfHSM client cert chain verify ECC"
2228
file: "config/examples/sim-wolfHSM-client-certchain-ecc.config"
29+
needs_posix_server: true
30+
posix_server_nvminit: true
31+
needs_nvm_image: false
2332
- name: "wolfHSM client cert chain verify RSA4096"
2433
file: "config/examples/sim-wolfHSM-client-certchain-rsa4096.config"
34+
needs_posix_server: true
35+
posix_server_nvminit: true
36+
needs_nvm_image: false
2537
- name: "wolfHSM server cert chain verify ECC"
2638
file: "config/examples/sim-wolfHSM-server-certchain-ecc.config"
39+
needs_posix_server: false
40+
posix_server_nvminit: false
41+
needs_nvm_image: true
2742
- name: "wolfHSM server cert chain verify RSA4096"
2843
file: "config/examples/sim-wolfHSM-server-certchain-rsa4096.config"
44+
needs_posix_server: false
45+
posix_server_nvminit: false
46+
needs_nvm_image: true
2947

3048
fail-fast: false
3149

@@ -102,15 +120,15 @@ jobs:
102120
make clean && make test-sim-internal-flash-with-update
103121
104122
- name: Build example POSIX TCP server
105-
if: matrix.config.name != 'wolfHSM server cert chain verify'
123+
if: matrix.config.needs_posix_server
106124
run: cd lib/wolfHSM/examples/posix/wh_posix_server && make WOLFSSL_DIR=../../../../wolfssl
107125

108126
# Start the server in the background
109127
- name: Run POSIX TCP server
110-
if: matrix.config.name != 'wolfHSM server cert chain verify'
128+
if: matrix.config.needs_posix_server
111129
run: |
112130
cd lib/wolfHSM/examples/posix/wh_posix_server
113-
if [ "${{ matrix.config.name }}" = "wolfHSM cert chain verify" ]; then
131+
if [ "${{ matrix.config.posix_server_nvminit }}" = "true" ]; then
114132
tmpfile=$(mktemp)
115133
echo "obj 1 0xFFFF 0x0000 \"cert CA\" ../../../../../test-dummy-ca/root-cert.der" >> $tmpfile
116134
./Build/wh_posix_server.elf --type tcp --nvminit $tmpfile &
@@ -124,7 +142,7 @@ jobs:
124142
# For testing the wolfHSM server cert chain verify feature, we need to create an NVM image containing our root CA that
125143
# the internal wolfHSM server can load.
126144
- name: Create NVM image for wolfHSM server cert chain verify
127-
if: matrix.config.name == 'wolfHSM server cert chain verify'
145+
if: matrix.config.needs_nvm_image
128146
run: |
129147
make -C lib/wolfHSM/tools/whnvmtool
130148
tmpfile=$(mktemp)
@@ -138,6 +156,6 @@ jobs:
138156
139157
# Kill the server if it is still running
140158
- name: Kill POSIX TCP server
141-
if: always() && matrix.config.name != 'wolfHSM server cert chain verify'
159+
if: always() && matrix.config.needs_posix_server
142160
run: |
143161
kill $TCP_SERVER_PID || true

0 commit comments

Comments
 (0)