Skip to content

Fedora 41

Fedora 41 #396

Workflow file for this run

name: gcc-distcheck
on:
[push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install curl autoconf-archive lcov libtss2-dev libtss2-tcti-tabrmd0 tpm2-abrmd tpm2-tools
- name: Build TPM2 simulator
run: |
mkdir ibmtpm
curl -Ls https://downloads.sourceforge.net/project/ibmswtpm2/ibmtpm1682.tar.gz | tar xz -C ibmtpm
cd ibmtpm/src
make
- name: Configure tpm2-openssl
run: |
./bootstrap
./configure CC=gcc --enable-op-digest --enable-op-cipher --enable-code-coverage --enable-debug
- name: Build tpm2-openssl
run: |
make
sudo make install
- name: Start TPM2 simulator
run: |
export DBUS_SESSION_BUS_ADDRESS=`dbus-daemon --session --print-address --fork`
echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" >> $GITHUB_ENV
ibmtpm/src/tpm_server &
timeout 20 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' localhost 2321
tpm2-abrmd --session --tcti mssim:host=localhost,port=2321 &
echo "TCTI_ADDRESS=tabrmd:bus_name=com.intel.tss2.Tabrmd,bus_type=session" >> $GITHUB_ENV
sleep 1
- name: Check code coverage
run: |
openssl version
tpm2_getcap properties-fixed | head -n 20
make check-code-coverage
env:
TPM2TOOLS_TCTI: ${{ env.TCTI_ADDRESS }}
TPM2OPENSSL_TCTI: ${{ env.TCTI_ADDRESS }}
- name: Submit code coverage
uses: codecov/[email protected]
- name: Check the distribution
# AM_DISTCHECK_CONFIGURE_FLAGS are not ready for clang and asan
run: |
make distcheck
env:
TPM2TOOLS_TCTI: ${{ env.TCTI_ADDRESS }}
TPM2OPENSSL_TCTI: ${{ env.TCTI_ADDRESS }}
- name: Archive log files
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v4
with:
name: test-report-gcc
path: |
*.log
test/*.log
test/*/*.log
tpm2-openssl-*/_build/sub/test/*.log
tpm2-openssl-*/_build/sub/test/*/*.log