bundle the coverage HTML report folder into a zip #106
Workflow file for this run
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: Release | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- .github/** | |
- docs/testreport/** | |
- config/botan.env | |
permissions: | |
contents: read | |
# implicitly all other scopes not listed become none | |
jobs: | |
utility: | |
name: "Utility" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- jobname: Documentation | |
target: pdf_docs | |
artifact_name: Upstream Documentation | |
artifacts: | | |
build/build/docs/handbook/botan.pdf | |
build/build/docs/doxygen.zip | |
host_os: ubuntu-latest | |
- jobname: Coverage Report | |
target: coverage | |
artifact_name: Coverage Report | |
artifacts: build/coverage.zip | |
host_os: ubuntu-latest | |
runs-on: ${{ matrix.host_os }} | |
steps: | |
- name: Fetch Audit Repository | |
uses: actions/checkout@v3 | |
with: | |
path: ./source | |
- name: Setup Environment Configuration | |
uses: ./source/.github/actions/setup-environment | |
with: | |
env_file: ./source/config/botan.env | |
- name: Fetch Botan Repository | |
uses: actions/checkout@v3 | |
with: | |
path: ./botan | |
repository: ${{ env.BOTAN_REPO }} | |
fetch-depth: 0 | |
ref: ${{ env.BOTAN_REF }} | |
- name: Setup Build Agent | |
uses: ./source/.github/actions/setup-build-agent | |
with: | |
target: ${{ matrix.target }} | |
cache-key: bsi-${{ matrix.host_os }}-${{ matrix.target }} | |
- name: Build and Test Botan | |
run: >- | |
python3 ./source/.github/scripts/ci_build.py | |
--root-dir=${{ github.workspace }}/botan --build-dir=${{ github.workspace }}/build | |
${{ matrix.target }} | |
- name: Archive Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Botan ${{ env.BOTAN_VERSION }} ${{ matrix.artifact_name }} | |
path: ${{ matrix.artifacts }} | |
if: ${{ matrix.artifacts != '' }} | |
bsi_tests: | |
name: "BSI Build Policy Tests" | |
strategy: | |
fail-fast: false | |
matrix: | |
# basic configuration combinations should run on all target platforms | |
target: [ static, shared ] | |
platform: [ | |
{ host_os: windows-2022, compiler: msvc, make_tool: ninja }, | |
{ host_os: ubuntu-latest, compiler: gcc, make_tool: make }, | |
{ host_os: ubuntu-latest, compiler: clang, make_tool: make }, | |
{ host_os: macos-13, compiler: clang, make_tool: make } | |
] | |
runs-on: ${{ matrix.platform.host_os }} | |
steps: | |
- name: Fetch Audit Repository | |
uses: actions/checkout@v3 | |
with: | |
path: ./source | |
- name: Setup Environment Configuration | |
uses: ./source/.github/actions/setup-environment | |
with: | |
env_file: ./source/config/botan.env | |
- name: Fetch Botan Repository | |
uses: actions/checkout@v3 | |
with: | |
path: ./botan | |
repository: ${{ env.BOTAN_REPO }} | |
fetch-depth: 0 | |
ref: ${{ env.BOTAN_REF }} | |
- name: Setup Build Agent | |
uses: ./source/.github/actions/setup-build-agent | |
with: | |
target: ${{ matrix.target }} | |
cache-key: bsi-${{ matrix.platform.host_os }}-${{ matrix.platform.compiler }}-${{ matrix.target }} | |
- name: Build and Test Botan | |
run: >- | |
python3 ./source/.github/scripts/ci_build.py | |
--root-dir=${{ github.workspace }}/botan --build-dir=${{ github.workspace }}/build | |
--cc='${{ matrix.platform.compiler }}' --make-tool='${{ matrix.platform.make_tool }}' | |
--test-results-dir=junit_reports | |
${{ matrix.target }} | |
- name: Store JUnit Report | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: junit | |
path: junit_reports/*.xml | |
if-no-files-found: error | |
test_report: | |
name: "Generate Test Report" | |
needs: bsi_tests | |
if: always() | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: docs/testreport | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Environment Configuration | |
uses: ./.github/actions/setup-environment | |
with: | |
env_file: ./config/botan.env | |
- name: Fetch JUnit Reports | |
uses: actions/download-artifact@v3 | |
with: | |
name: junit | |
path: ${{ github.workspace }}/junit_reports | |
- name: Install Build Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get -qq install python3-poetry texlive-latex-extra texlive-fonts-recommended tex-gyre texlive-lang-german latexmk | |
- name: Install Python Dependencies | |
run: poetry install --no-dev | |
- name: Build pdf | |
run: poetry run make latexpdf | |
env: | |
TEST_REPORT_JUNIT_INPUT_DIRECTORY: ${{ github.workspace }}/junit_reports | |
- name: Store Test Report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Botan ${{ env.BOTAN_VERSION }} Test Report | |
path: docs/testreport/_build/latex/testreport-*.pdf | |
if-no-files-found: error | |
source_archive: | |
name: "Source Archive" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch Audit Repository | |
uses: actions/checkout@v3 | |
with: | |
path: ./source | |
- name: Setup Environment Configuration | |
uses: ./source/.github/actions/setup-environment | |
with: | |
env_file: ./source/config/botan.env | |
- name: Fetch Botan Repository | |
uses: actions/checkout@v3 | |
with: | |
path: ./botan | |
repository: ${{ env.BOTAN_REPO }} | |
fetch-depth: 0 | |
ref: ${{ env.BOTAN_REF }} | |
- name: Generate Archive | |
run: python3 ${{ github.workspace }}/source/.github/scripts/tarball.py --output-dir build --source-dir botan | |
- name: Archive Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Botan ${{ env.BOTAN_VERSION }} Source Archive | |
path: build/*.zip |