Skip to content

Commit

Permalink
.sync/workflows/leaf: CodeQL workflow changes for upload-artifact v4 (#…
Browse files Browse the repository at this point in the history
…291)

Two key new restrictions:

1. No more than 10 artifacts per job in a workflow run.
2. It is no longer possible to upload to the same named artifact
   multiple times.

These workflows can easily split their artifacts up under the 10
artifact limit while also not uploading to the same named artifact
in the process.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
  • Loading branch information
makubacki authored Dec 19, 2023
1 parent 6530aa8 commit 0daa8c1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions .sync/workflows/leaf/codeql-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@ jobs:
run: stuart_setup -c ${{ matrix.build_file }} -t DEBUG -a ${{ matrix.archs }} TOOL_CHAIN_TAG=${{ matrix.tool_chain_tag }}

- name: Upload Setup Log As An Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: (success() || failure()) && steps.get_platform_info.outputs.setup_supported == 'true'
with:
name: ${{ steps.get_platform_info.outputs.pkg_name }}-Logs
name: ${{ steps.get_platform_info.outputs.pkg_name }}-Setup-Log
path: |
**/SETUPLOG.txt
retention-days: 7
Expand All @@ -291,10 +291,10 @@ jobs:
run: stuart_ci_setup -c ${{ matrix.build_file }} -t DEBUG -a ${{ matrix.archs }} TOOL_CHAIN_TAG=${{ matrix.tool_chain_tag }}

- name: Upload CI Setup Log As An Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: (success() || failure()) && steps.get_platform_info.outputs.ci_setup_supported == 'true'
with:
name: ${{ steps.get_platform_info.outputs.pkg_name }}-Logs
name: ${{ steps.get_platform_info.outputs.pkg_name }}-CI-Setup-Log
path: |
**/CISETUP.txt
retention-days: 7
Expand All @@ -306,10 +306,10 @@ jobs:
run: stuart_update -c ${{ matrix.build_file }} -t DEBUG -a ${{ matrix.archs }} TOOL_CHAIN_TAG=${{ matrix.tool_chain_tag }}

- name: Upload Update Log As An Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: ${{ steps.get_platform_info.outputs.pkg_name }}-Logs
name: ${{ steps.get_platform_info.outputs.pkg_name }}-Update-Log
path: |
**/UPDATE_LOG.txt
retention-days: 7
Expand Down Expand Up @@ -424,10 +424,10 @@ jobs:
delete_dirs(build_path)
- name: Upload Build Logs As An Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: ${{ steps.get_platform_info.outputs.pkg_name }}-Logs
name: ${{ steps.get_platform_info.outputs.pkg_name }}-Build-Logs
path: |
**/BUILD_REPORT.TXT
**/OVERRIDELOG.TXT
Expand Down Expand Up @@ -455,7 +455,7 @@ jobs:
print(f'sarif_file_path={sarif_path}', file=fh)
- name: Upload CodeQL Results (SARIF) As An Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.get_platform_info.outputs.pkg_name }}-CodeQL-SARIF
path: ${{ steps.env_data.outputs.sarif_file_path }}
Expand Down
18 changes: 9 additions & 9 deletions .sync/workflows/leaf/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,10 @@ jobs:
run: stuart_setup -c .pytool/CISettings.py -t DEBUG -a ${{ matrix.archs }} TOOL_CHAIN_TAG=${{ matrix.tool_chain_tag }}

- name: Upload Setup Log As An Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: (success() || failure()) && steps.get_ci_file_operations.outputs.setup_supported == 'true'
with:
name: ${{ matrix.package }}-Logs
name: ${{ matrix.package }}-Setup-Log
path: |
**/SETUPLOG.txt
retention-days: 7
Expand All @@ -240,10 +240,10 @@ jobs:
run: stuart_ci_setup -c .pytool/CISettings.py -t DEBUG -a ${{ matrix.archs }} TOOL_CHAIN_TAG=${{ matrix.tool_chain_tag }}

- name: Upload CI Setup Log As An Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: (success() || failure()) && steps.get_ci_file_operations.outputs.ci_setup_supported == 'true'
with:
name: ${{ matrix.package }}-Logs
name: ${{ matrix.package }}-CI-Setup-Log
path: |
**/CISETUP.txt
retention-days: 7
Expand All @@ -253,10 +253,10 @@ jobs:
run: stuart_update -c .pytool/CISettings.py -t DEBUG -a ${{ matrix.archs }} TOOL_CHAIN_TAG=${{ matrix.tool_chain_tag }}

- name: Upload Update Log As An Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: ${{ matrix.package }}-Logs
name: ${{ matrix.package }}-Update-Log
path: |
**/UPDATE_LOG.txt
retention-days: 7
Expand Down Expand Up @@ -367,10 +367,10 @@ jobs:
delete_dirs(build_path)
- name: Upload Build Logs As An Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: ${{ matrix.package }}-Logs
name: ${{ matrix.package }}-Build-Logs
path: |
**/BUILD_REPORT.TXT
**/OVERRIDELOG.TXT
Expand Down Expand Up @@ -398,7 +398,7 @@ jobs:
print(f'sarif_file_path={sarif_path}', file=fh)
- name: Upload CodeQL Results (SARIF) As An Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.package }}-CodeQL-SARIF
path: ${{ steps.env_data.outputs.sarif_file_path }}
Expand Down

0 comments on commit 0daa8c1

Please sign in to comment.