Skip to content

Merge pull request #77 from GiacomoPope/drbg_doc #162

Merge pull request #77 from GiacomoPope/drbg_doc

Merge pull request #77 from GiacomoPope/drbg_doc #162

Workflow file for this run

name: GitHub CI
on:
push:
branches:
- main
pull_request:
jobs:
benchmark-kyber:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Verify git status
run: |
git status
git remote -v
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Display installed python package versions
run: |
pip list || :
- name: Install build dependencies
run: |
pip install -r requirements.txt
- name: Display installed python package versions
run: |
pip list || :
- name: Run kyber benchmark
run: PYTHONPATH=src python benchmarks/benchmark_kyber.py
benchmark-ml-kem:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Verify git status
run: |
git status
git remote -v
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Display installed python package versions
run: |
pip list || :
- name: Install build dependencies
run: |
pip install -r requirements.txt
- name: Display installed python package versions
run: |
pip list || :
- name: Run ML-KEM benchmark
run: PYTHONPATH=src python benchmarks/benchmark_ml_kem.py
docs-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Verify git status
run: |
git status
git remote -v
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Display installed python package versions
run: |
pip list || :
- name: Install build dependencies
run: |
pip install -r requirements.txt
- name: Install docs dependencies
run: |
pip install Sphinx -r docs/requirements.txt
- name: Display installed python package versions
run: |
pip list || :
- name: Check docs
run: |
pushd docs
# -W for turn warnings into errors
# --keep-going to not abort on first error
# -n for nitpicky
make html SPHINXOPTS="-W --keep-going -n"
code-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Verify git status
run: |
git status
git remote -v
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Display installed python package versions
run: |
pip list || :
- name: Install build dependencies
run: |
pip install -r requirements.txt
- name: Install black
run: |
pip install black==24.4.2
- name: Display installed python package versions
run: |
pip list || :
- name: Check formatting
run: |
black --check --line-length 79 .
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: py3.9
os: ubuntu-latest
python-version: "3.9"
- name: py3.10
os: ubuntu-latest
python-version: "3.10"
- name: py3.11
os: ubuntu-latest
python-version: "3.11"
- name: py3.12
os: ubuntu-latest
python-version: "3.12"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Verify git status
run: |
git status
git remote -v
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Display installed python package versions
run: |
pip list || :
- name: Install test requirements
run: |
pip install pytest coverage coveralls
- name: Install build dependencies
run: |
pip install -r requirements.txt
- name: Display installed python package versions
run: |
pip list || :
- name: Run unit tests
run: |
coverage run --branch -m pytest
- name: Print collected coverage
run: |
coverage report
- name: Publish coverage to Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.name }}
COVERALLS_PARALLEL: true
COVERALLS_SERVICE_NAME: github
run: |
coveralls
coveralls:
name: Indicate completion to coveralls
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Install coveralls
run: |
pip3 install --upgrade coveralls
- name: Report to Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
run: coveralls --finish