Skip to content

Hopefully next

Hopefully next #1479

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
tss-version: ['master', '2.4.0', '3.0.0', '3.0.3', '3.2.0', '4.0.0']
with-fapi: [true]
tools-version: ['5.6']
include:
- python-version: '3.9'
tss-version: '3.1.0'
with-fapi: false
- python-version: '3.12'
tss-version: 'master'
tools-version: 'master'
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-${{ hashFiles('**/setup.cfg') }}
- name: cache swtpm
uses: actions/cache@v3
with:
path: |
~/cideps/lib/libtpms.so*
~/cideps/bin/swtpm
~/cideps/lib/swtpm/libswtpm_libtpms.so*
key: swtpm
- name: cache ibmswtpm2
uses: actions/cache@v3
with:
path: ~/cideps/bin/tpm_server
key: ibmswtpm2
- name: cache tpm2-tools
uses: actions/cache@v3
if: matrix.tools-version != 'master'
with:
path: ~/cideps/bin/tpm2*
key: tools-${{ matrix.tools-version }}-${{ matrix.tss-version }}
- name: cache tpm2-tss
uses: actions/cache@v3
if: matrix.tss-version != 'master'
with:
path: |
~/cideps/lib/libtss2-*
~/cideps/lib/pkgconfig/tss2-*
~/cideps/include/tss2
~/cideps/etc/tpm2-tss
key: tss2-${{ matrix.tss-version }}-c1
- name: Install dependencies
env:
TPM2_TSS_VERSION: ${{ matrix.tss-version }}
TPM2_TSS_FAPI: ${{ matrix.with-fapi }}
TPM2_TOOLS_VERSION: ${{ matrix.tools-version }}
run: ./.ci/install-deps.sh
- name: Check
env:
TEST: 1
run: ./.ci/run.sh
coverage:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
env:
TPM2_TSS_VERSION: 4.0.1
run: ./.ci/install-deps.sh
- name: Check
env:
TEST: 1
ENABLE_COVERAGE: true
run: ./.ci/run.sh
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: /tmp/coverage.xml
mypy:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
env:
TPM2_TSS_VERSION: 4.0.1
run: ./.ci/install-deps.sh
- name: Check
env:
MYPY: 1
run: ./.ci/run.sh
whitespace-check:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Check
env:
WHITESPACE: 1
run: ./.ci/run.sh
style-check:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Dependencies
run: |
python3 -m pip install --user --upgrade pip
python3 -m pip install --user --upgrade black==19.10b0
- name: Check
env:
STYLE: 1
run: ./.ci/run.sh