Created
July 15, 2024 06:32
-
-
Save katrinafyi/59a10338f58016bea0a84a34a81c7229 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 1c0d426700fe52da7e46bc17a111e103ded0f91b Mon Sep 17 00:00:00 2001 | |
From: rina <k@rina.fyi> | |
Date: Mon, 15 Jul 2024 16:32:32 +1000 | |
Subject: [PATCH] ci: discover histogram parts dynamically | |
untested | |
--- | |
.github/workflows/run-examples.yml | 20 ++++++++++++++++++-- | |
1 file changed, 18 insertions(+), 2 deletions(-) | |
diff --git a/.github/workflows/run-examples.yml b/.github/workflows/run-examples.yml | |
index 5255acd7..e76a0cca 100644 | |
--- a/.github/workflows/run-examples.yml | |
+++ b/.github/workflows/run-examples.yml | |
@@ -53,6 +53,22 @@ jobs: | |
src/test/*.csv | |
src/test/*.svg | |
- run: | | |
- tail -n+1 src/test/summary-*.csv | |
- paste src/test/headers.md.part src/test/summary-*.md.part | sed -s "s@HISTOtestresult-GTIRBHISTO@$(curl -F'file=@src/test/verifyTime-testresult-GTIRB.svg' -Fexpires=1920 http://0x0.st)@" | sed -s "s@HISTOtestresult-BAPHISTO@$(curl -F'file=@src/test/verifyTime-testresult-BAP.svg' -Fexpires=1920 http://0x0.st)@" > $GITHUB_STEP_SUMMARY | |
+ pushd src/test | |
+ tail -n+1 summary-*.csv | |
+ pasted="$(paste headers.md.part summary-*.md.part)" | |
+ for part in summary-*.md.part; do | |
+ # basename, then everything after "summary-", then everything before ".md.part" (via two rev passes) | |
+ testname="$(basename $part | cut -d- -f2- | rev | cut -d. -f3- | rev)" | |
+ | |
+ svg="verifyTime-$testname.svg" | |
+ ls -l $svg | |
+ | |
+ # 1920 hours = 80 days | |
+ url="$(curl -F"file=@$svg' -Fexpires=1920 http://0x0.st)" | |
+ | |
+ pasted="$(echo "$pasted" | sed "s#HISTO${testname}HISTO#$url#g")" | |
+ done | |
+ popd | |
+ | |
+ echo "$pasted" > $GITHUB_STEP_SUMMARY | |
-- | |
2.45.2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment