Skip to content

Commit 9959e54

Browse files
committed
this will be dropped
Added a t_cose local version with the TF-M patches, this will be dropped and probably a fork library will be created. Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
1 parent 2507670 commit 9959e54

122 files changed

Lines changed: 41168 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
main:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
c-compiler: [gcc, clang]
11+
12+
config:
13+
# OpenSSL 1.1.1 (Ubuntu 20.04)
14+
- os-image: ubuntu-latest
15+
container: ubuntu:20.04
16+
crypto-provider: OpenSSL
17+
18+
# OpenSSL 3.0 (Ubuntu 22.04)
19+
- os-image: ubuntu-latest
20+
container: ubuntu:22.04
21+
crypto-provider: OpenSSL
22+
23+
- os-image: ubuntu-latest
24+
container: ubuntu:20.04
25+
crypto-provider: MbedTLS
26+
crypto-provider-version: 'v2.28.0'
27+
crypto-provider-extra: ''
28+
crypto-provider-build-extra: ''
29+
30+
- os-image: ubuntu-latest
31+
container: ubuntu:20.04
32+
crypto-provider: MbedTLS
33+
crypto-provider-version: 'v3.1.0'
34+
crypto-provider-extra: ''
35+
crypto-provider-build-extra: ''
36+
37+
- os-image: ubuntu-latest
38+
container: ubuntu:20.04
39+
crypto-provider: MbedTLS
40+
crypto-provider-version: 'v3.4.0'
41+
crypto-provider-extra: ''
42+
crypto-provider-build-extra: ''
43+
44+
- os-image: ubuntu-latest
45+
container: ubuntu:20.04
46+
crypto-provider: MbedTLS
47+
crypto-provider-version: 'v3.4.0'
48+
crypto-provider-extra: ''
49+
crypto-provider-build-extra: 'python3 scripts/config.py set MBEDTLS_ECP_RESTARTABLE'
50+
51+
- os-image: ubuntu-latest
52+
container: ubuntu:20.04
53+
crypto-provider: Test
54+
55+
name: ${{ matrix.config.crypto-provider }} ${{ matrix.config.crypto-provider-version }} • ${{ matrix.c-compiler }} • ${{ matrix.config.container }}
56+
57+
runs-on: ${{ matrix.config.os-image }}
58+
container: ${{ matrix.config.container }}
59+
60+
steps:
61+
- uses: actions/checkout@v3
62+
63+
- name: Install build tools
64+
run: |
65+
set -ex
66+
export DEBIAN_FRONTEND=noninteractive
67+
apt-get update
68+
apt-get install -y build-essential cmake python3 ${{ matrix.c-compiler }} \
69+
python3-jinja2 python3-jsonschema
70+
echo "CC=${{ matrix.c-compiler }}" >> $GITHUB_ENV
71+
72+
- name: Install OpenSSL
73+
if: matrix.config.crypto-provider == 'OpenSSL'
74+
run: apt-get install -y libssl-dev
75+
76+
- name: Fetch MbedTLS
77+
if: matrix.config.crypto-provider == 'MbedTLS'
78+
uses: actions/checkout@v3
79+
with:
80+
repository: ARMmbed/mbedtls
81+
ref: ${{ matrix.config.crypto-provider-version }}
82+
path: mbedtls
83+
84+
- name: Install MbedTLS
85+
if: matrix.config.crypto-provider == 'MbedTLS'
86+
run: |
87+
cd mbedtls
88+
${{ matrix.config.crypto-provider-build-extra }}
89+
make -j $(nproc)
90+
make install
91+
92+
- name: Fetch QCBOR
93+
uses: actions/checkout@v3
94+
with:
95+
repository: laurencelundblade/QCBOR
96+
path: QCBOR
97+
98+
- name: Install QCBOR
99+
run: |
100+
cd QCBOR
101+
make -j$(nproc)
102+
make install
103+
104+
- name: Build t_cose
105+
run: |
106+
set -ex
107+
mkdir build
108+
cd build
109+
cmake -DCRYPTO_PROVIDER=${{ matrix.config.crypto-provider }} \
110+
${{ matrix.config.crypto-provider-extra }} \
111+
${{ matrix.config.defines }} \
112+
..
113+
make -j $(nproc)
114+
115+
- name: Run examples
116+
run: build/t_cose_examples
117+
118+
- name: Run tests
119+
if: matrix.config.crypto-provider == 'MbedTLS' &&
120+
matrix.config.crypto-provider-version == 'v3.4.0' &&
121+
matrix.config.crypto-provider-build-extra == ''
122+
# This Mbed TLS version has the option of restartable ECP, however it is
123+
# not turned on. In this case the restartable testcase should fail.
124+
run: build/t_cose_test | grep 'restart_test_2_step FAILED'
125+
126+
- name: Run tests
127+
if: ${{ ! ( matrix.config.crypto-provider == 'MbedTLS' &&
128+
matrix.config.crypto-provider-version == 'v3.4.0' &&
129+
matrix.config.crypto-provider-build-extra == '' ) }}
130+
run: build/t_cose_test
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
workflow_dispatch:
8+
9+
permissions: read-all
10+
11+
jobs:
12+
main:
13+
runs-on: ubuntu-latest
14+
15+
permissions:
16+
contents: write
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Install Doxygen
22+
run: sudo apt-get install doxygen
23+
24+
- name: Run Doxygen
25+
run: doxygen doxygen/t_cose_doxyfile
26+
27+
- name: Deploy to GitHub Pages
28+
uses: peaceiris/actions-gh-pages@v3
29+
with:
30+
github_token: ${{ secrets.GITHUB_TOKEN }}
31+
publish_dir: doxygen/output/html
32+
publish_branch: gh-pages
33+
force_orphan: true
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Prerequisites
2+
*.d
3+
4+
# Object files
5+
*.o
6+
*.ko
7+
*.obj
8+
*.elf
9+
10+
# Linker output
11+
*.ilk
12+
*.map
13+
*.exp
14+
15+
# Precompiled Headers
16+
*.gch
17+
*.pch
18+
19+
# Libraries
20+
*.lib
21+
*.a
22+
*.la
23+
*.lo
24+
25+
# Shared objects (inc. Windows DLLs)
26+
*.dll
27+
*.so
28+
*.so.*
29+
*.dylib
30+
31+
# Executables
32+
*.exe
33+
*.out
34+
*.app
35+
*.i*86
36+
*.x86_64
37+
*.hex
38+
39+
# Debug files
40+
*.dSYM/
41+
*.su
42+
*.idb
43+
*.pdb
44+
45+
# Kernel Module Compile Results
46+
*.mod*
47+
*.cmd
48+
.tmp_versions/
49+
modules.order
50+
Module.symvers
51+
Mkfile.old
52+
dkms.conf
53+
54+
# Compiled binaries
55+
t_cose_test
56+
t_cose_basic_example_ossl
57+
t_cose_basic_example_psa
58+
t_cose_encryption_example_psa
59+
60+
# CMake build folder
61+
build/
62+
63+
# Doxygen output folder
64+
doxygen/output

0 commit comments

Comments
 (0)