Skip to content

Commit

Permalink
MOCK: remove everything except artifact mgmt
Browse files Browse the repository at this point in the history
  • Loading branch information
reneme committed Oct 11, 2023
1 parent 80da569 commit 2bfa54a
Show file tree
Hide file tree
Showing 2 changed files with 161 additions and 127 deletions.
142 changes: 76 additions & 66 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,18 @@ jobs:
with:
env_file: ./config/botan.env

- name: Install Build Dependencies
# - 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
- name: Mock Result
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
mkdir -p ${{ matrix.element.dir }}/_build/latex/
touch ${{ matrix.element.dir }}/_build/latex/${{ matrix.element.out_name }}-*.pdf
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -72,14 +76,15 @@ jobs:
with:
env_file: ./config/botan.env

- name: Install Build Dependencies
run: |
sudo apt-get update
sudo apt-get -qq install python3-poetry
- name: Install Python Dependencies
run: poetry install --no-dev
- name: Build with URL check enabled
run: poetry run make SPHINXOPTS="-D src_ref_check_url=True -W --keep-going" html
# - name: Install Build Dependencies
# run: |
# sudo apt-get update
# sudo apt-get -qq install python3-poetry
# - name: Install Python Dependencies
# run: poetry install --no-dev

# - name: Build with URL check enabled
# run: poetry run make SPHINXOPTS="-D src_ref_check_url=True -W --keep-going" html

audit_generation:
name: Build PDF - Audit Report
Expand All @@ -95,58 +100,63 @@ jobs:
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

- name: Install Build Dependencies
working-directory: source/docs/audit_report
# - name: Fetch Botan Repository
# uses: actions/checkout@v3
# with:
# path: ./botan
# repository: ${{ env.BOTAN_REPO }}
# fetch-depth: 0

# - name: Install Build Dependencies
# working-directory: source/docs/audit_report
# run: |
# sudo apt-get update
# sudo apt-get -qq install python3-poetry texlive-latex-extra texlive-fonts-recommended tex-gyre latexmk
# poetry install --no-dev

# - name: Install GitHub webflow GPG public key
# run: gpg --trusted-key 4AEE18F83AFDEB23 --import source/.github/resources/web-flow.gpg

# - 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/docs/audit_report
# run: poetry run python3 -m genaudit.cli unrefed --yaml changes
# env:
# 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/docs/audit_report
# run: poetry run make latexpdf
# env:
# 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: Mock Result
run: |
sudo apt-get update
sudo apt-get -qq install python3-poetry texlive-latex-extra texlive-fonts-recommended tex-gyre latexmk
poetry install --no-dev
- name: Install GitHub webflow GPG public key
run: gpg --trusted-key 4AEE18F83AFDEB23 --import source/.github/resources/web-flow.gpg

- 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/docs/audit_report
run: poetry run python3 -m genaudit.cli unrefed --yaml changes
env:
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/docs/audit_report
run: poetry run make latexpdf
env:
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 }}
mkdir -p source/docs/audit_report/_build/latex/
touch source/docs/audit_report/_build/latex/mocked-audit-report.pdf
- name: Upload Artifacts
uses: actions/upload-artifact@v3
Expand Down
146 changes: 85 additions & 61 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,34 @@ jobs:
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: 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: Mock Result
run: |
mkdir -p build/build/docs/handbook/
mkdir -p build/build/docs/
mkdir -p build
touch build/build/docs/handbook/botan.pdf
touch build/build/docs/doxygen.zip
touch build/coverage.zip
- name: Archive Artifacts
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -100,27 +109,32 @@ jobs:
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: 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: Mock Result
run: |
mkdir -p junit_reports
touch junit_reports/$(cat /dev/urandom | tr -dc 'a-z0-9' | head -c 10).xml
- name: Store JUnit Report
uses: actions/upload-artifact@v3
Expand All @@ -135,9 +149,9 @@ jobs:
needs: bsi_tests
if: always()
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs/testreport
# defaults:
# run:
# working-directory: docs/testreport
steps:
- uses: actions/checkout@v3

Expand All @@ -152,16 +166,21 @@ jobs:
name: junit
path: ${{ github.workspace }}/junit_reports

- name: Install Build Dependencies
# - 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: Mock Result
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
mkdir -p docs/testreport/_build/latex/
touch docs/testreport/_build/latex/testreport-mock.pdf
- name: Store Test Report
uses: actions/upload-artifact@v3
Expand All @@ -184,16 +203,21 @@ jobs:
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: 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: Generate Archive
# run: python3 ${{ github.workspace }}/source/.github/scripts/tarball.py --output-dir build --source-dir botan

- name: Mock Result
run: |
mkdir -p build
touch build/source.zip
- name: Archive Artifacts
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 2bfa54a

Please sign in to comment.