Skip to content

Commit

Permalink
Add version select to haddock index page (#6499)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeme-wana authored Sep 24, 2024
1 parent 4b61b6c commit 24e3cfc
Showing 1 changed file with 49 additions and 3 deletions.
52 changes: 49 additions & 3 deletions scripts/combined-haddock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,54 @@ time linkchecker "${OUTPUT_DIR}/index.html" \
--no-warnings \
--output failures \
--file-output text


if [[ "$?" != "0" ]]; then
echo "Found broken or unreachable 'href=' links in the files above (also see ./linkchecker-out.txt)"
fi
fi


# Add a <select> element into the prologue for navigating to other haddock versions.
echo "Injecting additional prologue html"

list-valid-plutus-versions() {
local versions="$(git tag | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | sort -rV | uniq | tr ' ' '\n')"
local min_ver="1.27.0.0"
echo master
echo latest
for ver in $versions; do
if [[ "$(echo -ne "$ver\n$min_ver" | sort -V | head -n 1 | tr -d '\n')" == "$min_ver" ]]; then
echo "$ver"
fi
done
}

inject-text-at-char() {
local file="$1"
local char="$2"
local text="$3"
cat <<EOF > "$file"
$(cut -c 1-$char "$file")
$(echo -n "$text")
$(cut -c $((char+1))- "$file")
EOF
}

build-version-select-html() {
html+='<p>Select another plutus version: '
html+='<select name="page" onchange="window.location.href = this.value;">'
for version in $(list-valid-plutus-versions); do
if [[ "$version" == "$PLUTUS_VERSION" ]]; then
html+='<option selected'
else
html+='<option'
fi
html+=" value=\"https://plutus.cardano.intersectmbo.org/haddock/$version/\">$version</option>"
done
html+="</select></p>"
echo "$html"
}

inject-text-at-char "$OUTPUT_DIR/index.html" 1465 "$(build-version-select-html)"




1 comment on commit 24e3cfc

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Plutus Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05.

Benchmark suite Current: 24e3cfc Previous: 4b61b6c Ratio
validation-auction_1-1 257.2 μs 197.5 μs 1.30
validation-auction_1-2 914.2 μs 628.1 μs 1.46
validation-auction_1-3 897.8 μs 622.6 μs 1.44
validation-auction_1-4 332.2 μs 230 μs 1.44
validation-auction_2-1 257.1 μs 180.5 μs 1.42
validation-auction_2-2 912.4 μs 635.5 μs 1.44
validation-auction_2-3 1183 μs 824.4 μs 1.43
validation-auction_2-4 899.6 μs 624.7 μs 1.44
validation-auction_2-5 330.2 μs 232.8 μs 1.42
validation-crowdfunding-success-3 297.8 μs 277 μs 1.08
validation-escrow-redeem_1-1 481.1 μs 346 μs 1.39
validation-multisig-sm-1 562.3 μs 493.9 μs 1.14
validation-multisig-sm-2 515.4 μs 387.9 μs 1.33
validation-decode-auction_1-1 240.7 μs 189.4 μs 1.27
validation-decode-escrow-redeem_1-2 367.1 μs 305.3 μs 1.20
validation-decode-escrow-redeem_2-1 443.8 μs 305.7 μs 1.45
validation-decode-escrow-redeem_2-2 442.2 μs 307 μs 1.44
validation-decode-escrow-redeem_2-3 443.2 μs 306.6 μs 1.45
validation-decode-escrow-refund-1 443.7 μs 307.3 μs 1.44
validation-decode-future-increase-margin-1 325.3 μs 226.7 μs 1.43
validation-decode-future-increase-margin-2 443.2 μs 329.1 μs 1.35
validation-decode-game-sm-success_1-1 726.6 μs 514.9 μs 1.41
validation-decode-stablecoin_2-1 1189 μs 1086 μs 1.09
validation-decode-stablecoin_2-2 230.6 μs 158.7 μs 1.45
validation-decode-uniswap-3 1018.9999999999999 μs 812.1 μs 1.25
nofib-clausify/formula1 3395 μs 3019 μs 1.12
nofib-clausify/formula2 5806 μs 4061 μs 1.43
nofib-clausify/formula3 15240 μs 11120 μs 1.37
nofib-knights/8x8 85150 μs 80060 μs 1.06
nofib-primetest/05digits 14460 μs 10080 μs 1.43
nofib-primetest/10digits 28240 μs 19670 μs 1.44
nofib-primetest/30digits 86840 μs 60400 μs 1.44
nofib-primetest/50digits 129900 μs 99460 μs 1.31
nofib-queens4x4/fc 14670 μs 13560 μs 1.08
nofib-queens5x5/bt 102800 μs 72160 μs 1.42
nofib-queens5x5/bm 106900 μs 75170 μs 1.42
nofib-queens5x5/bjbt1 111200 μs 84280 μs 1.32
nofib-queens5x5/bjbt2 116500 μs 81810 μs 1.42
nofib-queens5x5/fc 245100 μs 172100 μs 1.42
marlowe-semantics/0000020002010200020101020201000100010001020101020201010000020102 462 μs 323.8 μs 1.43
marlowe-semantics/0001000101000000010101000001000001010101010100000001000001010000 628.7 μs 443.9 μs 1.42
marlowe-semantics/0003040402030103010203030303000200000104030002040304020400000102 1482 μs 1041 μs 1.42
marlowe-semantics/004025fd712d6c325ffa12c16d157064192992faf62e0b991d7310a2f91666b8 1157 μs 818.4 μs 1.41
marlowe-semantics/0101010001010101010101000100010100000001010000010001000001000101 1305 μs 918.4 μs 1.42
marlowe-semantics/0101020201010201010200010102000201000201010102000102010201010000 430 μs 304 μs 1.41
marlowe-semantics/0101080808040600020306010000000302050807010208060100070207080202 1102 μs 772.5 μs 1.43
marlowe-semantics/0104010200020000040103020102020004040300030304040400010301040303 1112 μs 783 μs 1.42
marlowe-semantics/04000f0b04051006000e060f09080d0b090d0104050a0b0f0506070f0a070008 1063 μs 749.6 μs 1.42
marlowe-semantics/0543a00ba1f63076c1db6bf94c6ff13ae7d266dd7544678743890b0e8e1add63 1495 μs 1048 μs 1.43
marlowe-semantics/0705030002040601010206030604080208020207000101060706050502040301 1453 μs 1020 μs 1.42
marlowe-semantics/07070c070510030509010e050d00040907050e0a0d06030f1006030701020607 1471 μs 1029 μs 1.43
marlowe-semantics/0bcfd9487614104ec48de2ea0b2c0979866a95115748c026f9ec129384c262c4 1628 μs 1138 μs 1.43
marlowe-semantics/0be82588e4e4bf2ef428d2f44b7687bbb703031d8de696d90ec789e70d6bc1d8 1960 μs 1371 μs 1.43
marlowe-semantics/0f1d0110001b121d051e15140c0c05141d151c1f1d201c040f10091b020a0e1a 682 μs 480.1 μs 1.42
marlowe-semantics/119fbea4164e2bf21d2b53aa6c2c4e79414fe55e4096f5ce2e804735a7fbaf91 1095 μs 767.4 μs 1.43
marlowe-semantics/12910f24d994d451ff379b12c9d1ecdb9239c9b87e5d7bea570087ec506935d5 710.8 μs 498.3 μs 1.43
marlowe-semantics/18cefc240debc0fcab14efdd451adfd02793093efe7bc76d6322aed6ddb582ad 1081 μs 759.5 μs 1.42
marlowe-semantics/1a2f2540121f09321216090b2b1f211e3f020c2c133a1a3c3f3c232a26153a04 431.4 μs 304.5 μs 1.42
marlowe-semantics/1a573aed5c46d637919ccb5548dfc22a55c9fc38298d567d15ee9f2eea69d89e 1291 μs 906.6 μs 1.42
marlowe-semantics/1d56060c3b271226064c672a282663643b1b0823471c67737f0b076870331260 1118 μs 788.6 μs 1.42
marlowe-semantics/1d6e3c137149a440f35e0efc685b16bfb8052ebcf66ec4ad77e51c11501381c7 395.7 μs 305.6 μs 1.29
marlowe-semantics/322acde099bc34a929182d5b894214fc87ec88446e2d10625119a9d17fa3ec3d 433.4 μs 304.5 μs 1.42
marlowe-semantics/331e4a1bb30f28d7073c54f9a13c10ae19e2e396c299a0ce101ee6bf4b2020db 661 μs 466.7 μs 1.42
marlowe-semantics/33c3efd79d9234a78262b52bc6bbf8124cb321a467dedb278328215167eca455 899.4 μs 636.5 μs 1.41
marlowe-semantics/383683bfcecdab0f4df507f59631c702bd11a81ca3841f47f37633e8aacbb5de 1090 μs 766.8 μs 1.42
marlowe-semantics/3bb75b2e53eb13f718eacd3263ab4535f9137fabffc9de499a0de7cabb335479 432.4 μs 302.3 μs 1.43
marlowe-semantics/3db496e6cd39a8b888a89d0de07dace4397878958cab3b9d9353978b08c36d8a 1193 μs 838.2 μs 1.42
marlowe-semantics/44a9e339fa25948b48637fe7e10dcfc6d1256319a7b5ce4202cb54dfef8e37e7 418.8 μs 304.2 μs 1.38
marlowe-semantics/4d7adf91bfc93cebe95a7e054ec17cfbb912b32bd8aecb48a228b50e02b055c8 995.1 μs 705.2 μs 1.41
marlowe-semantics/4f9e8d361b85e62db2350dd3ae77463540e7af0d28e1eb68faeecc45f4655f57 565.2 μs 399.1 μs 1.42
marlowe-semantics/52df7c8dfaa5f801cd837faa65f2fd333665fff00a555ce8c55e36ddc003007a 524.2 μs 367.6 μs 1.43
marlowe-semantics/53ed4db7ab33d6f907eec91a861d1188269be5ae1892d07ee71161bfb55a7cb7 528.8 μs 370.8 μs 1.43
marlowe-semantics/55dfe42688ad683b638df1fa7700219f00f53b335a85a2825502ab1e0687197e 430.9 μs 304.6 μs 1.41
marlowe-semantics/56333d4e413dbf1a665463bf68067f63c118f38f7539b7ba7167d577c0c8b8ce 1106 μs 779.7 μs 1.42
marlowe-semantics/57728d8b19b0e06412786f3dfed9e1894cd0ad1d2bc2bd497ec0ecb68f989d2b 430.8 μs 304.5 μs 1.41
marlowe-semantics/5abae75af26f45658beccbe48f7c88e74efdfc0b8409ba1e98f95fa5b6caf999 704.2 μs 494.2 μs 1.42
marlowe-semantics/5d0a88250f13c49c20e146819357a808911c878a0e0a7d6f7fe1d4a619e06112 1495 μs 1055 μs 1.42
marlowe-semantics/5e274e0f593511543d41570a4b03646c1d7539062b5728182e073e5760561a66 1456 μs 1026 μs 1.42
marlowe-semantics/5e2c68ac9f62580d626636679679b97109109df7ac1a8ce86d3e43dfb5e4f6bc 748 μs 527.8 μs 1.42
marlowe-semantics/5f130d19918807b60eab4c03119d67878fb6c6712c28c54f5a25792049294acc 433.7 μs 305.6 μs 1.42
marlowe-semantics/5f306b4b24ff2b39dab6cdc9ac6ca9bb442c1dc6f4e7e412eeb5a3ced42fb642 1087 μs 766.3 μs 1.42
marlowe-semantics/5f3d46c57a56cef6764f96c9de9677ac6e494dd7a4e368d1c8dd9c1f7a4309a5 706.1 μs 497.7 μs 1.42
marlowe-semantics/64c3d5b43f005855ffc4d0950a02fd159aa1575294ea39061b81a194ebb9eaae 954.4 μs 672.7 μs 1.42
marlowe-semantics/65bc4b69b46d18fdff0fadbf00dd5ec2b3e03805fac9d5fb4ff2d3066e53fc7e 3312 μs 2370 μs 1.40
marlowe-semantics/66af9e473d75e3f464971f6879cc0f2ef84bafcb38fbfa1dbc31ac2053628a38 1778 μs 1256 μs 1.42
marlowe-semantics/675d63836cad11b547d1b4cddd498f04c919d4342612accf40913f9ae9419fac 1486 μs 1051 μs 1.41
marlowe-semantics/67ba5a9a0245ee3aff4f34852b9889b8c810fccd3dce2a23910bddd35c503b71 7928 μs 5795 μs 1.37
marlowe-semantics/6d88f7294dd2b5ce02c3dc609bc7715bd508009738401d264bf9b3eb7c6f49c1 706.2 μs 495 μs 1.43
marlowe-semantics/70f65b21b77ddb451f3df9d9fb403ced3d10e1e953867cc4900cc25e5b9dec47 1130 μs 795.9 μs 1.42
marlowe-semantics/71965c9ccae31f1ffc1d85aa20a356d4ed97a420954018d8301ec4f9783be0d7 680.6 μs 479.6 μs 1.42
marlowe-semantics/74c67f2f182b9a0a66c62b95d6fac5ace3f7e71ea3abfc52ffbe3ecb93436ea2 1144 μs 808 μs 1.42
marlowe-semantics/7529b206a78becb793da74b78c04d9d33a2540a1abd79718e681228f4057403a 1143 μs 804.7 μs 1.42

This comment was automatically generated by workflow using github-action-benchmark.

CC: @IntersectMBO/plutus-core

Please sign in to comment.