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+ include :
23+ - os : ubuntu-latest
24+ version : stable-20210308
25+ - os : macos-latest
26+ version : stable-20210308
27+ - os : ubuntu-latest
28+ version : stable-20210319
29+ - os : macos-latest
30+ version : stable-20210319
31+ - os : ubuntu-latest
32+ version : stable-20210809
33+ - os : macos-latest
34+ version : stable-20210809
35+ - os : ubuntu-latest
36+ version : cached
37+ - os : macos-latest
38+ version : cached
39+ - os : ubuntu-latest
40+ version : latest
41+ - os : macos-latest
42+ version : latest
43+ - os : ubuntu-latest
44+ version : nightly-latest
45+ - os : macos-latest
46+ version : nightly-latest
47+ name : Upload debug artifacts
48+ timeout-minutes : 45
49+ runs-on : ${{ matrix.os }}
50+ steps :
51+ - name : Check out repository
52+ uses : actions/checkout@v3
53+ - name : Prepare test
54+ id : prepare-test
55+ uses : ./.github/prepare-test
56+ with :
57+ version : ${{ matrix.version }}
58+ - uses : ./../action/init
59+ with :
60+ tools : ${{ steps.prepare-test.outputs.tools-url }}
61+ debug : true
62+ debug-artifact-name : my-debug-artifacts
63+ debug-database-name : my-db
64+ - name : Build code
65+ shell : bash
66+ run : ./build.sh
67+ - uses : ./../action/analyze
68+ id : analysis
69+ download-and-check-artifacts :
70+ strategy :
71+ matrix :
72+ include :
73+ - os : ubuntu-latest
74+ version : stable-20210308
75+ - os : macos-latest
76+ version : stable-20210308
77+ - os : ubuntu-latest
78+ version : stable-20210319
79+ - os : macos-latest
80+ version : stable-20210319
81+ - os : ubuntu-latest
82+ version : stable-20210809
83+ - os : macos-latest
84+ version : stable-20210809
85+ - os : ubuntu-latest
86+ version : cached
87+ - os : macos-latest
88+ version : cached
89+ - os : ubuntu-latest
90+ version : latest
91+ - os : macos-latest
92+ version : latest
93+ - os : ubuntu-latest
94+ version : nightly-latest
95+ - os : macos-latest
96+ version : nightly-latest
97+ name : Download and check debug artifacts
98+ needs : upload-artifacts
99+ timeout-minutes : 45
100+ runs-on : ${{ matrix.os }}
101+ steps :
102+ - uses : actions/download-artifact@v3
103+ with :
104+ name : my-debug-artifacts-${{ matrix.os }}-${{ matrix.version }}
105+ - shell : bash
106+ run : |
107+ LANGUAGES="cpp csharp go java javascript python"
108+ for language in $LANGUAGES; do
109+ echo "Checking $language"
110+ if [[ ! -f "$language.sarif" ]] ; then
111+ echo "Missing a SARIF file for $language"
112+ exit 1
113+ fi
114+ if [[ ! -f "my-db-$language.zip" ]] ; then
115+ echo "Missing a database bundle for $language"
116+ exit 1
117+ fi
118+ if [[ ! -d "$language/log" ]] ; then
119+ echo "Missing logs for $language"
120+ exit 1
121+ fi
122+ done
123+ env :
124+ INTERNAL_CODEQL_ACTION_DEBUG_LOC : true
0 commit comments