Skip to content

Merge pull request #302 from dgarske/stm32_i2c #123

Merge pull request #302 from dgarske/stm32_i2c

Merge pull request #302 from dgarske/stm32_i2c #123

name: WolfTPM Build Tests
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
jobs:
build:
runs-on: ubuntu-latest
steps:
#pull wolfTPM
- uses: actions/checkout@master
#setup wolfssl
- uses: actions/checkout@master
with:
repository: wolfssl/wolfssl
path: wolfssl
- name: wolfssl autogen
working-directory: ./wolfssl
run: ./autogen.sh
- name: wolfssl configure
working-directory: ./wolfssl
run: ./configure --enable-wolftpm
- name: wolfssl make install
working-directory: ./wolfssl
run: sudo make install
#setup ibmswtpm2
- uses: actions/checkout@master
with:
repository: kgoldman/ibmswtpm2
path: ibmswtpm2
- name: ibmswtpm2 make
working-directory: ./ibmswtpm2/src
run: |
make
./tpm_server &
#setup and test defaults (with simulator)
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure --enable-swtpm
- name: make
run: make
- name: make check
run: |
make check
WOLFSSL_PATH=./wolfssl ./examples/run_examples.sh
#test no wolfcrypt
- name: configure no wolfCrypt
run: ./configure --enable-swtpm --disable-wolfcrypt
- name: make no wolfCrypt
run: make
- name: make check no wolfCrypt
run: |
make check
WOLFSSL_PATH=./wolfssl WOLFCRYPT_ENABLE=0 ./examples/run_examples.sh
#test no wrapper
- name: configure no wrapper
run: ./configure --enable-swtpm --disable-wrapper
- name: make no wrapper
run: make
- name: make check no wrapper
run: ./examples/native/native_test
# test small stack
- name: configure smallstack
run: ./configure --enable-swtpm --enable-smallstack
- name: make smallstack
run: make
- name: make check smallstack
run: |
make check
WOLFSSL_PATH=./wolfssl ./examples/run_examples.sh
# test tislock
- name: configure tislock
run: ./configure --enable-tislock
- name: make tislock
run: make
# build debug
- name: configure debug
run: ./configure --enable-debug
- name: make debug
run: make
# build verbose
- name: configure debug verbose
run: ./configure --enable-debug=verbose
- name: make debug verbose
run: make
# build io
- name: configure debug io
run: ./configure --enable-debug=io CFLAGS="-DWOLFTPM_DEBUG_TIMEOUT"
- name: make debug io
run: make
# build advio
- name: configure advio
run: ./configure --enable-advio
- name: make debug io
run: make
# capture logs on failure
- name: Upload failure logs
if: failure()
uses: actions/upload-artifact@v3
with:
name: wolftpm-test-logs
path: |
run.out
test-suite.log
retention-days: 5