Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CodSpeed

on:
push:
branches:
- main
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:

permissions:
contents: read
id-token: write # for OpenID Connect authentication with CodSpeed

env:
CARGO_TERM_COLOR: always

jobs:
benchmarks:
name: Run benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7

- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config

- name: Install Rust toolchain
run: rustup update stable && rustup default stable

- name: Cache build artifacts
uses: Swatinem/rust-cache@v2.9.1
with:
cache-bin: "false"
prefix-key: "v1-codspeed"

- name: Install cargo-codspeed
uses: taiki-e/install-action@v2
with:
tool: cargo-codspeed

- name: Build the benchmark target(s)
run: |
cargo codspeed build -m simulation -p documenting
cargo codspeed build -m simulation -p tests-compatibility --bench parsing --bench stabilizing

- name: Run the benchmarks
uses: CodSpeedHQ/action@v4
with:
mode: simulation
run: cargo codspeed run -m simulation -p documenting -p tests-compatibility
174 changes: 137 additions & 37 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<h1 align="center">alexandrite</h1>
<p align="center">a language implementation for PureScript</p>
<p align="center">
<a href="https://app.codspeed.io/purefunctor/purescript-alexandrite?utm_source=badge"><img src="https://img.shields.io/endpoint?url=https://codspeed.io/badge.json" alt="CodSpeed"/></a>
</p>

---

Expand Down
2 changes: 1 addition & 1 deletion compiler-core/documenting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ stabilizing = { version = "0.1.0", path = "../stabilizing" }
syntax = { version = "0.1.0", path = "../syntax" }

[dev-dependencies]
criterion = "0.6.0"
criterion = { version = "5.0.1", package = "codspeed-criterion-compat" }
insta = "1.45.1"
lexing = { path = "../lexing" }

Expand Down
2 changes: 1 addition & 1 deletion tests-compatibility/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ anyhow = "1"
building = { version = "0.1.0", path = "../compiler-core/building" }
checking = { version = "0.1.0", path = "../compiler-core/checking" }
clap = { version = "4", features = ["derive"] }
criterion = { version = "0.6.0", features = ["html_reports"] }
diagnostics = { version = "0.1.0", path = "../compiler-core/diagnostics" }
files = { version = "0.1.0", path = "../compiler-core/files" }
flate2 = "1"
Expand All @@ -34,6 +33,7 @@ url = "2.5.7"
walkdir = "2.5.0"

[dev-dependencies]
criterion = { version = "5.0.1", package = "codspeed-criterion-compat", features = ["html_reports"] }
tempfile = "3"

[[bench]]
Expand Down