Skip to content

Commit

Permalink
Stronger docusaurus builds and general QOL improvements (#6287)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeme-wana authored Jul 5, 2024
1 parent 7a24d97 commit 3f60557
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 12 deletions.
1 change: 0 additions & 1 deletion .github/workflows/changelog-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:

- name: Enforce Label
uses: actions/github-script@main
# Don't require changelogs for draft PRs
if: github.event.pull_request.draft == false
with:
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cost-model-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
run:
name: Run
runs-on: [self-hosted, plutus-benchmark]
timeout-minutes: 14400
timeout-minutes: 1800 # (30 hours) These benchmarks take over 10 hours to run.
steps:
- name: Checkout
uses: actions/checkout@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflows checks for comments in PRs. If the comment has this format:
# /benchmark NAME
# Then this action will run the benchmark with the given NAME, first agains
# Then this action will run the benchmark with the given NAME, first against
# the current branch and then comparing the results against the master branch.

name: "🚀 Manual Benchmark"
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/metatheory-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# https://intersectmbo.github.io/plutus/metatheory/$version
# And optionally to:
# https://intersectmbo.github.io/plutus/metatheory/latest
# On push to master, this workflows publishes to:
# https://intersectmbo.github.io/plutus/metatheory/master

name: "🔮 Metatheory Site"

Expand Down Expand Up @@ -48,7 +50,7 @@ jobs:
- name: Checkout
uses: actions/checkout@main
with:
ref: ${{ inputs.ref }}
ref: ${{ inputs.ref || github.ref_name }}

- name: Build Site
run: |
Expand All @@ -60,7 +62,7 @@ jobs:
uses: JamesIves/[email protected]
with:
folder: _site
target-folder: metatheory/${{ inputs.destination }}
target-folder: metatheory/${{ inputs.destination || github.ref_name }}
single-commit: true

- name: Deploy Latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
schedule:
- cron: 0 0 * * * # Daily at midnight

workflow_dispatch: # Or manually dispatch the job
workflow_dispatch:
inputs:
hedgehog-tests:
description: Numer of tests to run (--hedgehog-tests XXXXX)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/slack-message-broker.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This workflow is triggered whenever any of the workflows listed in on.workflow_run.workflows
# has been cancelled or has failed, and will send a message to the specified Slack channel ids.
# has been cancelled or has failed, and will send a message to the plutus-ci channel.

name: "📮 Slack Message Broker"

Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
channel-id: C07A1GSNZEE
channel-id: C07A1GSNZEE # plutus-ci
payload: |
{
"text": "${{ steps.prepare-slack-message.outputs.message }}",
Expand Down
4 changes: 2 additions & 2 deletions doc/docusaurus/docs/reference/common-weaknesses.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Any application that makes payments to specific parties needs to ensure that tho
It's possible that a solution will be developed that makes this weakness easier to avoid.
In the mean time, there are workarounds that developers can use.

- **Unique outputs**
#### **Unique outputs**

The simplest workaround is to ensure that the outputs which your scripts care about are unique.
This prevents them being confused with other outputs.
Expand All @@ -67,7 +67,7 @@ It is not too difficult to use unique outputs.
For payments to users, wallets typically already generate unique key hashes for every payment received.
For payments to script addresses it is a bit more complicated, and applications may wish to include the equivalent of a "payment reference" in the datum to keep things unique.

- **Ban other scripts**
#### **Ban other scripts**

A more draconian workaround is for your script to insist that it runs in a transaction which is running no other scripts, so there is no risk of confusion.
Note that it is not enough to consider just validator scripts, minting and reward scripts must also be banned.
Expand Down
3 changes: 2 additions & 1 deletion doc/docusaurus/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ const config: Config = {
projectName: "docusaurus", // Usually your repo name.

onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
onBrokenAnchors: "throw",
onBrokenMarkdownLinks: "throw",

plugins: [
[
Expand Down
2 changes: 1 addition & 1 deletion scripts/combined-haddock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ done
echo "Writing the prologue"
cat << EOF > "${BUILD_DIR}/haddock.prologue"
Last updated on $(date +"%F") from [IntersectMBO/plutus@\`$GIT_REV_SHORT\`](https://github.com/IntersectMBO/plutus/tree/$GIT_REV)
Last updated on $(date +"%Y %b %d") from [IntersectMBO/plutus@$GIT_REV_SHORT](https://github.com/IntersectMBO/plutus/tree/$GIT_REV)
== Handy module entrypoints
Expand Down

0 comments on commit 3f60557

Please sign in to comment.