From 2d53120d882e2518f55eb2b4ccda67aeb6c91a81 Mon Sep 17 00:00:00 2001 From: "Project Mu UEFI Bot [bot]" <45776386+uefibot@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:11:30 -0400 Subject: [PATCH] Repo File Sync: Update CodeQL GitHub workflow (#314) --- .github/workflows/codeql.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 41c6770061..466bda220b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -342,6 +342,29 @@ jobs: STUART_CODEQL_PATH: ${{ steps.cache_key_gen.outputs.codeql_cli_ext_dep_dir }} run: stuart_ci_build -c .pytool/CISettings.py -t DEBUG -p ${{ matrix.package }} -a ${{ matrix.archs }} TOOL_CHAIN_TAG=${{ matrix.tool_chain_tag }} --codeql + - name: Build Cleanup + id: build_cleanup + shell: python + run: | + import os + import shutil + from pathlib import Path + + dirs_to_delete = ['ia32', 'x64', 'arm', 'aarch64'] + + def delete_dirs(path: Path): + if path.exists() and path.is_dir(): + if path.name.lower() in dirs_to_delete: + print(f'Removed {str(path)}') + shutil.rmtree(path) + return + + for child_dir in path.iterdir(): + delete_dirs(child_dir) + + build_path = Path(os.environ['GITHUB_WORKSPACE'], 'Build') + delete_dirs(build_path) + - name: Upload Build Logs As An Artifact uses: actions/upload-artifact@v3 if: success() || failure()