Skip to content

Commit 9c1d39d

Browse files
committed
Use dune logs
1 parent 8c356dd commit 9c1d39d

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

.github/workflows/main.yml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@ jobs:
264264
source ${{ env.BOILERPLATE }}
265265
ulimit -S -s
266266
267+
- name: "Build dune-report tool"
268+
run: |
269+
opam install -y fmdeps/skylabs-fm/ocaml-dune-report/
270+
267271
- id: build-job-asts
268272
name: "Build Job ASTs"
269273
run: |
@@ -289,6 +293,7 @@ jobs:
289293
needs.gen-job.outputs.compare == '1'
290294
run: |
291295
source ${{ env.BOILERPLATE }}
296+
dune-report --json > ${{ env.SCRATCHDIR }}/dune-log-job.json
292297
# Print information on the size of the _build directory.
293298
du -hs _build
294299
du -hc $(find _build -type f -name "*.v") | tail -n 1
@@ -297,9 +302,12 @@ jobs:
297302
# Extract data.
298303
find _build/ -name '*.vo'| sort | xargs md5sum > ${{ env.SCRATCHDIR }}/md5sums.txt
299304
dune exec -- globfs.extract-all ${NJOBS} _build/default
300-
# echo -e "\e[0Ksection_start:`date +%s`:section_9[collapsed=true]\r\e[0KGenerate code quality report"
301-
(cd _build/default; dune exec -- coqc-perf.report .) > ${{ env.SCRATCHDIR }}/code-quality-job.txt
302-
# echo -e "\e[0Ksection_end:`date +%s`:section_9\r\e[0K"
305+
# Logs from glob files
306+
mkdir ${{ env.SCRATCHDIR }}/globs-job/
307+
find _build/ -type f -! -empty -name '*.glob.std*' > files_to_rsync
308+
rsync -a --prune-empty-dirs --files-from=files_to_rsync ${{ env.SCRATCHDIR}}/globs-job/
309+
ls -al ${{ env.SCRATCHDIR }}/globs-job
310+
#
303311
dune exec -- coqc-perf.extract-all _build/default perf-data
304312
dune exec -- hint-data.extract-all ${NJOBS} perf-data
305313
du -hs _build
@@ -337,6 +345,7 @@ jobs:
337345
needs.gen-job.outputs.compare == '1'
338346
run: |
339347
source ${{ env.BOILERPLATE }}
348+
dune-report --json > ${{ env.SCRATCHDIR }}/dune-log-base.json
340349
# Print information on the size of the _build directory.
341350
du -hs _build
342351
du -hc $(find _build -type f -name "*.v") | tail -n 1
@@ -345,7 +354,12 @@ jobs:
345354
# Extract data.
346355
find _build/ -name '*.vo'| sort | xargs md5sum > ${{ env.SCRATCHDIR }}/md5sums_ref.txt
347356
dune exec -- globfs.extract-all ${NJOBS} _build/default
348-
(cd _build/default; dune exec -- coqc-perf.report .) > ${{ env.SCRATCHDIR }}/code-quality-base.txt
357+
# Logs from glob files
358+
mkdir ${{ env.SCRATCHDIR }}/globs-base/
359+
find _build/ -type f -! -empty -name '*.glob.std*' > files_to_rsync
360+
rsync -a --prune-empty-dirs --files-from=files_to_rsync ${{ env.SCRATCHDIR}}/globs-base/
361+
ls -al ${{ env.SCRATCHDIR }}/globs-job
362+
#
349363
dune exec -- coqc-perf.extract-all _build/default perf-data
350364
dune exec -- hint-data.extract-all ${NJOBS} perf-data
351365
du -hs _build
@@ -398,7 +412,15 @@ jobs:
398412
# python3 support/fm-perf/post_fm_perf.py --access-token ${PROOF_PERF_TOKEN} --project-id 74911021 --mr-id 3913 -f ${{ env.SCRATCHDIR }}/perf_analysis_gitlab.md --pipe-url "https://gitlab.com/skylabs_ai/FM/auto/-/pipelines/2116778517"
399413
400414
# Code Quality diff
401-
dune exec -- coqc-perf.code-quality-diff ${{ env.SCRATCHDIR }}/code-quality-base.txt ${{ env.SCRATCHDIR }}/code-quality-job.txt >> $GITHUB_STEP_SUMMARY || true
415+
find ${{ env.SCRATCHDIR }}/globs-job -type f -! -empty -name '*.glob.std*' > globs-job
416+
find ${{ env.SCRATCHDIR }}/globs-base -type f -! -empty -name '*.glob.std*' > globs-base
417+
(dune exec -- coqc-perf.code-quality-diff \
418+
--before-globs-from-file=globs-base \
419+
--after-globs-from-file=globs-job \
420+
--before-dune=${{ env.SCRATCHDIR }}/dune-log-base.json \
421+
--after-dune=${{ env.SCRATCHDIR }}/dune-log-job.json \
422+
>> $GITHUB_STEP_SUMMARY) \
423+
|| true
402424
echo -e "\n" >> $GITHUB_STEP_SUMMARY
403425
404426
- name: "Post Performance Analysis Comment"

0 commit comments

Comments
 (0)