From 69960c6ca406face65e4f0959e1d5b4437a2bd39 Mon Sep 17 00:00:00 2001 From: Rene Meusel Date: Wed, 11 Oct 2023 15:17:37 +0200 Subject: [PATCH] MOCK: remove everything except artifact mgmt --- .github/workflows/ci.yml | 148 ++++++++++++++++++---------------- .github/workflows/release.yml | 148 ++++++++++++++++++++-------------- 2 files changed, 165 insertions(+), 131 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d453783..d7a639a8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,9 +26,9 @@ jobs: name: Build PDF - ${{ matrix.element.name }} runs-on: ubuntu-22.04 - defaults: - run: - working-directory: ${{matrix.element.dir }} + # defaults: + # run: + # working-directory: ${{matrix.element.dir }} steps: - uses: actions/checkout@v3 @@ -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 }}-mock.pdf - name: Upload artifacts uses: actions/upload-artifact@v3 with: @@ -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 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 80e07949..04b4d224 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -81,7 +90,7 @@ jobs: # basic configuration combinations should run on all target platforms target: [ static, shared ] platform: [ - { host_os: windows-2022, compiler: msvc, make_tool: ninja }, + # { 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 } @@ -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 @@ -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 @@ -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 @@ -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