-
Notifications
You must be signed in to change notification settings - Fork 8
81 lines (71 loc) · 2.64 KB
/
Copy pathcmdline-test.yml
File metadata and controls
81 lines (71 loc) · 2.64 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
name: Command-Line Tool Test
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
discover:
uses: ./.github/workflows/_resolve-wolfssl.yml
cmdline:
name: Command-line tool (wolfSSL ${{ matrix.wolfssl-version }})
needs: discover
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.discover.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y autoconf automake libtool
- name: Cache wolfSSL (${{ matrix.wolfssl-version }})
if: matrix.wolfssl-version != 'master'
id: cache-wolfssl
uses: actions/cache@v4
with:
path: ~/wolfssl-install
key: wolfssl-clitest-${{ matrix.wolfssl-version }}-v3
- name: Build wolfSSL (${{ matrix.wolfssl-version }})
if: matrix.wolfssl-version == 'master' || steps.cache-wolfssl.outputs.cache-hit != 'true'
env:
PQC: ${{ matrix.pqc }}
run: |
cd ~
git clone --depth 1 --branch ${{ matrix.wolfssl-ref }} \
https://github.com/wolfSSL/wolfssl.git
cd wolfssl
./autogen.sh
if [ "$PQC" = "true" ]; then
PQC_FLAGS="--enable-mldsa"
else
PQC_FLAGS=""
fi
# Full algorithm set so the command-line tool test covers every path.
./configure --enable-ecc --enable-ed25519 --enable-ed448 \
--enable-curve25519 --enable-curve448 \
--enable-aesgcm --enable-aesccm --enable-aescbc \
--enable-sha384 --enable-sha512 \
--enable-keygen --enable-hkdf --enable-aeskeywrap \
--enable-chacha --enable-poly1305 \
$PQC_FLAGS --enable-rsapss \
--prefix=$HOME/wolfssl-install
make -j$(nproc)
make install
- name: Build wolfCOSE command-line tool
run: |
export WOLFSSL_DIR=$HOME/wolfssl-install
make tool CFLAGS="-std=c99 -DHAVE_ANONYMOUS_INLINE_AGGREGATES=1 -Os -Wall -Wextra -Wpedantic -Wshadow -Wconversion -I./include -isystem $WOLFSSL_DIR/include" \
LDFLAGS="-L$WOLFSSL_DIR/lib -lwolfssl"
- name: Run command-line tool test (all algorithms, all subcommands)
env:
EXPECT_PQC: ${{ matrix.pqc }}
run: |
export WOLFSSL_DIR=$HOME/wolfssl-install
export LD_LIBRARY_PATH=$WOLFSSL_DIR/lib
./scripts/cmdline-test.sh ./tools/wolfcose_tool