Skip to content

Botan 3.1.1 Audit Report Document (#89) #468

Botan 3.1.1 Audit Report Document (#89)

Botan 3.1.1 Audit Report Document (#89) #468

Workflow file for this run

name: CI
on:
push
permissions:
contents: read
# implicitly all other scopes not listed become none
jobs:
pdf_creation:
strategy:
matrix:
element: [ {name: Crypto Documentation, dir: cryptodoc, out_name: crypto},
{name: Audit Method Description, dir: audit_method, out_name: audit_method},
{name: Test Specification, dir: testspec, out_name: testspec},
{name: Architecture Overview, dir: architecture, out_name: architecture} ]
name: Build PDF - ${{ matrix.element.name }}
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ${{matrix.element.dir }}
steps:
- uses: actions/checkout@v3
- name: Install Build Dependencies
run: |
sudo apt-get update
sudo apt-get -qq install texlive-latex-extra texlive-fonts-recommended tex-gyre texlive-lang-german latexmk
- name: Install Python Dependencies
run: pip install -r requirements.txt
- name: Build pdf
run: make latexpdf
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: botan_${{ matrix.element.out_name }}-${{ github.sha }}
path: ${{ matrix.element.dir }}/_build/latex/${{ matrix.element.out_name }}.pdf
url_check:
strategy:
matrix:
element:
- {name: Crypto Documentation, dir: cryptodoc}
- {name: Test Specification, dir: testspec}
- {name: Architecture, dir: architecture}
name: Check source URLs - ${{ matrix.element.name }}
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ${{matrix.element.dir }}
steps:
- uses: actions/checkout@v3
- name: Install Python Dependencies
run: pip install -r requirements.txt
- name: Build with URL check enabled
run: make SPHINXOPTS="-D src_ref_check_url=True -W --keep-going" html
audit_generation:
name: Build PDF - Audit Report 3.1.0
runs-on: ubuntu-22.04
steps:
- name: Fetch Audit Repository
uses: actions/checkout@v3
with:
path: ./source
- name: Fetch Botan Repository
uses: actions/checkout@v3
with:
path: ./botan
repository: randombit/botan
fetch-depth: 0
- name: Install Build Dependencies
run: |
sudo apt-get update
sudo apt-get -qq install texlive-latex-extra texlive-fonts-recommended tex-gyre latexmk
pip install -r source/audit_generator/requirements.txt
pip install -r source/audit_report/3.1.0/requirements.txt
- name: Handle the Audit Generator Cache
uses: actions/cache@v3
with:
path: ./audit_generator_cache
key: audit_3.1-${{ github.run_id }}
restore-keys: audit_3.1
- name: Verify Patch Coverage
working-directory: source/audit_report/3.1.0
run: python3 -m audit unrefed --yaml changes
env:
PYTHONPATH: ${{ github.workspace }}/source/audit_generator
AUDIT_CACHE_LOCATION: ${{ github.workspace }}/audit_generator_cache
AUDIT_REPO_LOCATION: ${{ github.workspace }}/botan
BASIC_GH_TOKEN: ${{ github.token }}
- name: Build Document
working-directory: source/audit_report/3.1.0
run: make latexpdf
env:
PYTHONPATH: ${{ github.workspace }}/source/audit_generator
AUDIT_CACHE_LOCATION: ${{ github.workspace }}/audit_generator_cache
AUDIT_REPO_LOCATION: ${{ github.workspace }}/botan
BASIC_GH_TOKEN: ${{ github.token }}
- name: Query the API Rate Limit
run: ${{ github.workspace }}/source/.github/scripts/query_rate_limit.sh
if: always()
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Store Audit Generator Cache on Rate Limit Exceeded
uses: actions/cache/save@v3
if: ${{ failure() && env.API_RATE_LIMIT_EXCEEDED == 'true' }}
with:
path: ./audit_generator_cache
key: audit_3.1-${{ github.run_id }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: botan_audit_3.1.0_${{ github.sha }}
path: source/audit_report/3.1.0/_build/latex/*.pdf