1+ name : Check Nightly Build Status
2+ on :
3+ workflow_dispatch :
4+ schedule :
5+ - cron : ' 0 9 * * 1-5' # runs at 10am CET on working days
6+
7+ permissions :
8+ contents : write
9+ issues : write
10+
11+ env :
12+ GH_TOKEN : ${{ github.token }}
13+ GH_REPO : duckdb/duckdb
14+ GH_ISSUE_REPO : ${{ github.repository }}
15+
16+ jobs :
17+ # check-wget:
18+ # name: Check in advance
19+ # runs-on: macos-13
20+ # steps:
21+ # - name: Checkout repo with the scripts
22+ # uses: actions/checkout@v4
23+ # - shell: bash
24+ # run: chmod +x scripts/check_ext.sh && ./scripts/check_ext.sh
25+ # - uses: actions/upload-artifact@v4
26+ # with:
27+ # path: log.csv
28+ get-run-info :
29+ name : Generate nightly build artifact json file
30+ runs-on : ubuntu-latest
31+ outputs :
32+ matrix : ${{ steps.set-outputs.outputs.matrix }}
33+ CURR_DATE : ${{ steps.curr-date.outputs.CURR_DATE }}
34+ steps :
35+ - id : curr-date
36+ run : echo "CURR_DATE=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
37+
38+ - name : Checkout repo with the script
39+ uses : actions/checkout@v4
40+
41+ - name : Set up Python
42+ uses : actions/setup-python@v5
43+ with :
44+ python-version : ' 3.11'
45+
46+ - name : Install DuckDB for Python
47+ shell : bash
48+ run : |
49+ python -m pip install --upgrade pip
50+ pip install duckdb
51+
52+ - name : Create Tables and Generate inputs.json
53+ shell : bash
54+ env :
55+ CURR_DATE : ${{ steps.curr-date.outputs.CURR_DATE }}
56+ run : |
57+ python scripts/create_tables_and_inputs.py
58+
59+ - name : Upload DuckDB file
60+ uses : actions/upload-artifact@v4
61+ with :
62+ name : run_info_tables.duckdb
63+ path : run_info_tables.duckdb
64+
65+ - name : Read JSON and create matrix
66+ id : set-outputs
67+ run : |
68+ matrix=$(cat inputs.json | jq -c '.')
69+ echo "matrix=$matrix" >> $GITHUB_OUTPUT
70+ echo "***"
71+ cat inputs.json
72+
73+ - name : Upload inputs.json
74+ uses : actions/upload-artifact@v4
75+ with :
76+ name : inputs.json
77+ path : inputs.json
78+ if-no-files-found : ignore
79+
80+ run-tests :
81+ name : ${{ matrix.inputs.nightly_build }} - ${{ matrix.inputs.duckdb_arch }} (${{ matrix.inputs.runs_on }})
82+ needs : get-run-info
83+ if : ${{ needs.get-run-info.outputs.matrix != '[]' }}
84+ strategy :
85+ matrix :
86+ inputs : ${{ fromJson(needs.get-run-info.outputs.matrix) }}
87+ continue-on-error : true
88+ runs-on : ${{ matrix.inputs.runs_on }}
89+ steps :
90+ - name : Set up Python
91+ uses : actions/setup-python@v5
92+ with :
93+ python-version : ' 3.11'
94+
95+ - name : Install Python dependencies
96+ run : pip install duckdb docker
97+
98+ - name : Checkout repo with the scripts
99+ uses : actions/checkout@v4
100+
101+ - name : Checkout repo with extensions config file
102+ uses : actions/checkout@v4
103+ with :
104+ repository : ${{ env.GH_REPO }}
105+ sparse-checkout : |
106+ .github/config
107+ path : ext
108+
109+ - name : Verify ${{ matrix.inputs.nightly_build }} build version and Test extensions
110+ id : verify-build
111+ shell : bash
112+ env :
113+ CURR_DATE : ${{ needs.get-run-info.outputs.CURR_DATE }}
114+ run : |
115+ uname -m
116+ if [[ ${{ matrix.inputs.nightly_build }} != 'python' ]]; then
117+ echo "Downloading duckdb-binaries-${{ matrix.inputs.duckdb_binary }} artifact..."
118+ if gh run download ${{ matrix.inputs.run_id }} --repo ${{ env.GH_REPO }} -n duckdb-binaries-${{ matrix.inputs.duckdb_binary }}; then
119+ echo "Artifact duckdb-binaries-${{ matrix.inputs.duckdb_binary }} is successfuly downloaded."
120+ if [[ ${{ matrix.inputs.nightly_build }} == 'osx' ]]; then
121+ unzip duckdb_cli-*.zip -d duckdb_path
122+ else
123+ unzip duckdb_cli-${{ matrix.inputs.duckdb_binary }}.zip -d duckdb_path
124+ fi
125+ fi
126+ fi
127+ echo "Verifying version and testing extensions..."
128+ python scripts/verify_and_test.py \
129+ --nightly_build ${{ matrix.inputs.nightly_build }} \
130+ --architecture ${{ matrix.inputs.duckdb_arch }} \
131+ --run_id ${{ matrix.inputs.run_id }} \
132+ --runs_on ${{ matrix.inputs.runs_on }}
133+
134+ - name : Upload actions for extensions
135+ if : always()
136+ uses : actions/upload-artifact@v4
137+ with :
138+ name : ext_${{ matrix.inputs.nightly_build }}_${{ matrix.inputs.duckdb_arch }}
139+ path : |
140+ list_failed_ext_${{ matrix.inputs.nightly_build }}_${{ matrix.inputs.duckdb_arch }}.csv
141+ non_matching_sha_${{ matrix.inputs.nightly_build }}_${{ matrix.inputs.duckdb_arch }}.txt
142+ if-no-files-found : ignore
143+
144+ report :
145+ name : Create complete report
146+ runs-on : ubuntu-latest
147+ if : always()
148+ needs :
149+ - get-run-info
150+ - run-tests
151+ steps :
152+ - name : Checkout repo
153+ uses : actions/checkout@v4
154+
155+ - name : Set up Python
156+ uses : actions/setup-python@v5
157+ with :
158+ python-version : ' 3.11'
159+
160+ - name : Install DuckDB for Python
161+ shell : bash
162+ run : |
163+ python -m pip install --upgrade pip
164+ pip install duckdb pandas tabulate requests
165+
166+ - name : Download inputs.json
167+ uses : actions/download-artifact@v4
168+ with :
169+ name : inputs.json
170+ path : .
171+
172+ - name : Download extensions artifacts
173+ uses : actions/download-artifact@v4
174+ with :
175+ pattern : ext_*
176+ path : failed_ext
177+
178+ - name : Download duckdb file
179+ uses : actions/download-artifact@v4
180+ with :
181+ name : run_info_tables.duckdb
182+ path : tables
183+
184+ - name : Generate report
185+ shell : bash
186+ env :
187+ CURR_DATE : ${{ needs.get-run-info.outputs.CURR_DATE }}
188+ run : |
189+ python scripts/create_build_report.py
190+
191+ - name : Upload REPORT
192+ uses : actions/upload-artifact@v4
193+ with :
194+ name : REPORT
195+ path : ${{ needs.get-run-info.outputs.CURR_DATE }}-report.md
196+
197+ - name : Upload REPORT to the _posts directory
198+ shell : bash
199+ env :
200+ CI_COMMIT_MESSAGE : " Add ${{ needs.get-run-info.outputs.CURR_DATE }}-report.md"
201+ CI_COMMIT_AUTHOR : " hmeriann"
202+ GH_TOKEN : ${{ github.token }}
203+ run : |
204+ git config --global user.name ${{ env.CI_COMMIT_AUTHOR }}
205+ git config --global user.email "zuleykha.pavlichenkova@gmail.com"
206+
207+ git config pull.rebase false
208+ git pull origin gh-pages --allow-unrelated-histories
209+ mv ${{ needs.get-run-info.outputs.CURR_DATE }}-report.md _posts
210+ ls -lah _posts
211+
212+ git add _posts/${{ needs.get-run-info.outputs.CURR_DATE }}-report.md
213+ git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
214+ git push origin main:gh-pages
0 commit comments