Skip to content

Commit 9990b40

Browse files
authored
Merge pull request #1160 from github/angelapwen/refactor-debug-artifacts-pr-check
Split debug artifacts PR check into two jobs
2 parents 1a0331c + 2a582eb commit 9990b40

File tree

3 files changed

+83
-132
lines changed

3 files changed

+83
-132
lines changed

.github/workflows/__debug-artifacts.yml

Lines changed: 0 additions & 96 deletions
This file was deleted.

.github/workflows/debug-artifacts.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Checks logs, SARIF, and database bundle debug artifacts exist.
2+
name: PR Check - Debug artifact upload
3+
env:
4+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5+
on:
6+
push:
7+
branches:
8+
- main
9+
- releases/v1
10+
- releases/v2
11+
pull_request:
12+
types:
13+
- opened
14+
- synchronize
15+
- reopened
16+
- ready_for_review
17+
workflow_dispatch: {}
18+
jobs:
19+
upload-artifacts:
20+
strategy:
21+
matrix:
22+
os: [ubuntu-latest, macos-latest]
23+
version: [stable-20210308, stable-20210319, stable-20210809, cached, latest, nightly-latest]
24+
name: Upload debug artifacts
25+
timeout-minutes: 45
26+
runs-on: ${{ matrix.os }}
27+
steps:
28+
- name: Check out repository
29+
uses: actions/checkout@v3
30+
- name: Prepare test
31+
id: prepare-test
32+
uses: ./.github/prepare-test
33+
with:
34+
version: ${{ matrix.version }}
35+
- uses: ./../action/init
36+
with:
37+
tools: ${{ steps.prepare-test.outputs.tools-url }}
38+
debug: true
39+
debug-artifact-name: my-debug-artifacts
40+
debug-database-name: my-db
41+
- name: Build code
42+
shell: bash
43+
run: ./build.sh
44+
- uses: ./../action/analyze
45+
id: analysis
46+
download-and-check-artifacts:
47+
name: Download and check debug artifacts
48+
needs: upload-artifacts
49+
timeout-minutes: 45
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: Download all artifacts
53+
uses: actions/download-artifact@v3
54+
- name: Check expected artifacts exist
55+
shell: bash
56+
run: |
57+
OPERATING_SYSTEMS="ubuntu-latest macos-latest"
58+
VERSIONS="stable-20210308 stable-20210319 stable-20210809 cached latest nightly-latest"
59+
LANGUAGES="cpp csharp go java javascript python"
60+
for os in $OPERATING_SYSTEMS; do
61+
for version in $VERSIONS; do
62+
pushd "./my-debug-artifacts-$os-$version"
63+
echo "Artifacts from version $version on $os:"
64+
for language in $LANGUAGES; do
65+
echo "- Checking $language"
66+
if [[ ! -f "$language.sarif" ]] ; then
67+
echo "Missing a SARIF file for $language"
68+
exit 1
69+
fi
70+
if [[ ! -f "my-db-$language.zip" ]] ; then
71+
echo "Missing a database bundle for $language"
72+
exit 1
73+
fi
74+
if [[ ! -d "$language/log" ]] ; then
75+
echo "Missing logs for $language"
76+
exit 1
77+
fi
78+
done
79+
popd
80+
done
81+
done
82+
env:
83+
INTERNAL_CODEQL_ACTION_DEBUG_LOC: true

pr-checks/checks/debug-artifacts.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy