Skip to content

Commit b3e795c

Browse files
committed
Add jwt-cpp action
1 parent 7224330 commit b3e795c

1 file changed

Lines changed: 85 additions & 0 deletions

File tree

.github/workflows/jwt-cpp.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: jwt-cpp Tests
2+
3+
# START OF COMMON SECTION
4+
on:
5+
push:
6+
branches: [ 'master', 'main', 'release/**' ]
7+
pull_request:
8+
branches: [ '*' ]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
# END OF COMMON SECTION
14+
15+
jobs:
16+
build_wolfssl:
17+
name: Build wolfSSL
18+
# Just to keep it the same as the testing target
19+
runs-on: ubuntu-latest
20+
# This should be a safe limit for the tests to run.
21+
timeout-minutes: 4
22+
steps:
23+
- name: Build wolfSSL
24+
uses: wolfSSL/actions-build-autotools-project@v1
25+
with:
26+
path: wolfssl
27+
configure: --enable-all
28+
install: true
29+
# Don't run tests as this config is tested in many other places
30+
check: false
31+
32+
- name: Upload built lib
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: wolf-install-jwt-cpp
36+
path: build-dir
37+
retention-days: 5
38+
39+
build_pam-ipmi:
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
ref: [ 0.6.0 ]
44+
name: ${{ matrix.ref }}
45+
runs-on: ubuntu-latest
46+
needs: build_wolfssl
47+
steps:
48+
- name: Install dependencies
49+
run: |
50+
# Don't prompt for anything
51+
export DEBIAN_FRONTEND=noninteractive
52+
sudo apt-get update
53+
sudo apt-get install libgtest-dev
54+
55+
- name: Download lib
56+
uses: actions/download-artifact@v4
57+
with:
58+
name: wolf-install-jwt-cpp
59+
path: build-dir
60+
61+
- name: Checkout OSP
62+
uses: actions/checkout@v4
63+
with:
64+
repository: wolfssl/osp
65+
path: osp
66+
67+
- name: Checkout jwt-cpp
68+
uses: actions/checkout@v4
69+
with:
70+
repository: Thalhammer/jwt-cpp
71+
path: jwt-cpp
72+
ref: v${{ matrix.ref }}
73+
74+
- name: Build pam-ipmi
75+
working-directory: jwt-cpp
76+
run: |
77+
patch -p1 < ../osp/jwt-cpp/${{ matrix.ref }}.patch
78+
PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build-dir/lib/pkgconfig \
79+
cmake -B build -DJWT_SSL_LIBRARY:STRING=wolfSSL -DJWT_BUILD_TESTS=ON .
80+
make -j -C build
81+
ldd ./build/tests/jwt-cpp-test | grep wolfssl
82+
83+
- name: Run jwt-cpp tests
84+
working-directory: jwt-cpp
85+
run: ./build/tests/jwt-cpp-test

0 commit comments

Comments
 (0)