Skip to content

Initialise PSA signing context #1107

Initialise PSA signing context

Initialise PSA signing context #1107

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
main:
strategy:
fail-fast: false
matrix:
c-compiler: [gcc, clang]
config:
# OpenSSL 1.1.1 (Ubuntu 20.04)
- os-image: ubuntu-latest
container: ubuntu:20.04
crypto-provider: OpenSSL
# OpenSSL 3.0 (Ubuntu 22.04)
- os-image: ubuntu-latest
container: ubuntu:22.04
crypto-provider: OpenSSL
- os-image: ubuntu-latest
container: ubuntu:20.04
crypto-provider: MbedTLS
crypto-provider-version: 'v2.28.0'
crypto-provider-extra: ''
crypto-provider-build-extra: ''
- os-image: ubuntu-latest
container: ubuntu:20.04
crypto-provider: MbedTLS
crypto-provider-version: 'v3.1.0'
crypto-provider-extra: ''
crypto-provider-build-extra: ''
- os-image: ubuntu-latest
container: ubuntu:20.04
crypto-provider: MbedTLS
crypto-provider-version: 'v3.4.0'
crypto-provider-extra: ''
crypto-provider-build-extra: ''
- os-image: ubuntu-latest
container: ubuntu:20.04
crypto-provider: MbedTLS
crypto-provider-version: 'v3.4.0'
crypto-provider-extra: ''
crypto-provider-build-extra: 'python3 scripts/config.py set MBEDTLS_ECP_RESTARTABLE'
- os-image: ubuntu-latest
container: ubuntu:20.04
crypto-provider: Test
name: ${{ matrix.config.crypto-provider }} ${{ matrix.config.crypto-provider-version }} • ${{ matrix.c-compiler }} • ${{ matrix.config.container }}
runs-on: ${{ matrix.config.os-image }}
container: ${{ matrix.config.container }}
steps:
- uses: actions/checkout@v3
- name: Install build tools
run: |
set -ex
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y build-essential cmake python3 ${{ matrix.c-compiler }} \
python3-jinja2 python3-jsonschema
echo "CC=${{ matrix.c-compiler }}" >> $GITHUB_ENV
- name: Install OpenSSL
if: matrix.config.crypto-provider == 'OpenSSL'
run: apt-get install -y libssl-dev
- name: Fetch MbedTLS
if: matrix.config.crypto-provider == 'MbedTLS'
uses: actions/checkout@v3
with:
repository: ARMmbed/mbedtls
ref: ${{ matrix.config.crypto-provider-version }}
path: mbedtls
- name: Install MbedTLS
if: matrix.config.crypto-provider == 'MbedTLS'
run: |
cd mbedtls
${{ matrix.config.crypto-provider-build-extra }}
make -j $(nproc)
make install
- name: Fetch QCBOR
uses: actions/checkout@v3
with:
repository: laurencelundblade/QCBOR
path: QCBOR
- name: Install QCBOR
run: |
cd QCBOR
make -j$(nproc)
make install
- name: Build t_cose
run: |
set -ex
mkdir build
cd build
cmake -DCRYPTO_PROVIDER=${{ matrix.config.crypto-provider }} \
${{ matrix.config.crypto-provider-extra }} \
${{ matrix.config.defines }} \
..
make -j $(nproc)
- name: Run examples
run: build/t_cose_examples
- name: Run tests
if: matrix.config.crypto-provider == 'MbedTLS' &&
matrix.config.crypto-provider-version == 'v3.4.0' &&
matrix.config.crypto-provider-build-extra == ''
# This Mbed TLS version has the option of restartable ECP, however it is
# not turned on. In this case the restartable testcase should fail.
run: build/t_cose_test | grep 'restart_test_2_step FAILED'
- name: Run tests
if: ${{ ! ( matrix.config.crypto-provider == 'MbedTLS' &&
matrix.config.crypto-provider-version == 'v3.4.0' &&
matrix.config.crypto-provider-build-extra == '' ) }}
run: build/t_cose_test