[wip] debug #150
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push] | |
jobs: | |
pytest: | |
runs-on: ubuntu-latest | |
container: ubuntu:24.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: apt install -y libpcap-dev libtss2-dev | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- uses: syphar/restore-virtualenv@v1 | |
id: cache-virtualenv | |
# looks for changes in requirements.txt | |
with: | |
requirement_files: requirements.txt | |
- uses: syphar/restore-pip-download-cache@v1 | |
if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
- run: for lib in tss2-esys tss2-tctildr tss2-rc tss2-mu tss2-fapi tss2-policy tss2-tcti-spi-helper; do echo "$lib=$(pkg-config --modversion $lib 2>/dev/null || echo -)"; done | |
- run: for lib in tss2-esys tss2-tctildr tss2-rc tss2-mu tss2-fapi tss2-policy tss2-tcti-spi-helper; do pkg-config --cflags $lib 2>/dev/null || true; done | |
- run: ls -la /usr/include/tss2 | |
# the package installation will only be executed when the | |
# requirements-files have changed. | |
- run: pip install --upgrade pip && pip install . && pip install pytest autoflake black isort cryptography==3.4.8 tpm2_pytss | |
#if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
- run: pip freeze | |
- name: Test | |
run: python -m pytest | |
bats: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Install dependencies | |
run: sudo apt install -y libpcap-dev bats | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- uses: syphar/restore-virtualenv@v1 | |
id: cache-virtualenv | |
# looks for changes in requirements.txt | |
with: | |
requirement_files: requirements.txt | |
- uses: syphar/restore-pip-download-cache@v1 | |
if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
# the package installation will only be executed when the | |
# requirements-files have changed. | |
- run: pip install . | |
#if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
- name: Test | |
run: bats test/*.bats | |
linters: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: sudo apt install -y libpcap-dev | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- uses: syphar/restore-virtualenv@v1 | |
id: cache-virtualenv | |
# looks for changes in requirements.txt | |
with: | |
requirement_files: requirements.txt | |
- uses: syphar/restore-pip-download-cache@v1 | |
if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
# the package installation will only be executed when the | |
# requirements-files have changed. | |
- run: pip install .; pip install pytest autoflake black isort | |
#if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
- name: Linting | |
run: scripts/linters.sh --check |