Skip to content

Commit 074146b

Browse files
committed
wip
1 parent 280a87e commit 074146b

File tree

3 files changed

+58
-9
lines changed

3 files changed

+58
-9
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "ƛ Plinth Plugin Benchmark"
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- 'release/*'
11+
12+
permissions:
13+
deployments: write
14+
contents: write
15+
16+
jobs:
17+
run:
18+
if: !always()
19+
name: Run
20+
runs-on: [self-hosted, plutus-benchmark]
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@main
24+
25+
- name: Run Benchmarks
26+
run: nix develop --no-warn-dirty --accept-flake-config --command \
27+
bash ./scripts/run-plinth-plugin-benchmarks.sh
28+
29+
# We need this otherwise the next step will fail with:
30+
# `pre-commit` not found. Did you forget to activate your virtualenv?
31+
# This is because github-action-benchmark will call git commit outside nix develop.
32+
- name: Disable Git Hooks
33+
run: git config core.hooksPath no-hooks
34+
35+
- name: Deploy Results
36+
uses: benchmark-action/[email protected]
37+
with:
38+
name: Plutus Benchmarks
39+
tool: 'customSmallerIsBetter'
40+
output-file-path: output.json
41+
github-token: ${{ secrets.GITHUB_TOKEN }}
42+
auto-push: true
43+
comment-on-alert: true
44+
alert-comment-cc-users: '@IntersectMBO/plutus-core'
45+
alert-threshold: '105%'

nix/outputs.nix

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,32 +80,28 @@ let
8080
static-haskell-packages //
8181
extra-artifacts;
8282

83-
84-
non-profiled-shells = rec {
83+
devShells = {
8584
default = ghc96;
85+
profiled = mkShell project.projectVariants.profiled;
8686
ghc810 = mkShell project.projectVariants.ghc810;
8787
ghc96 = mkShell project.projectVariants.ghc96;
8888
ghc98 = mkShell project.projectVariants.ghc98;
8989
ghc910 = mkShell project.projectVariants.ghc910;
9090
};
9191

92-
devShells =
93-
(non-profiled-shells) //
94-
{ profiled = mkShell project.projectVariants.profiled; };
95-
9692
nested-ci-jobs = {
9793
"x86_64-linux" =
9894
(project-variants-hydra-jobs) //
9995
(packages) //
100-
{ devShells = non-profiled-shells; };
96+
{ inherit devShells; };
10197
"x86_64-darwin" =
10298
(project-variants-hydra-jobs) //
103-
{ devShells = non-profiled-shells; };
99+
{ inherit devShells; };
104100
"aarch64-linux" =
105101
{ };
106102
"aarch64-darwin" =
107103
(project-variants-roots-and-plan-nix) //
108-
{ devShells = non-profiled-shells; };
104+
{ inherit devShells; };
109105
};
110106

111107
flattened-ci-jobs = utils.flattenDerivationTree ":" nested-ci-jobs;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
cabal clean
6+
cabal update
7+
cabal build all --enable-profiling --enable-library-profiling
8+

0 commit comments

Comments
 (0)