Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GH action running benchmarks #207

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
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
26 changes: 26 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,32 @@ jobs:
name: zeek-language-server-${{ matrix.target }}
path: target/${{ matrix.target }}/release/zeek-language-server

benchmark:
name: Run benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: benchmark-cargo-${{ hashFiles('Cargo.lock') }}

- name: Install tree-sitter-cli
run: |
npm install -g tree-sitter-cli
- name: Install Zeek
run: |
echo 'deb http://download.opensuse.org/repositories/security:/zeek/xUbuntu_22.04/ /' | sudo tee /etc/apt/sources.list.d/security:zeek.list; \
curl -fsSL https://download.opensuse.org/repositories/security:zeek/xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/security_zeek.gpg > /dev/null; \
sudo apt-get update; \
sudo apt-get install -y zeek; \
sudo echo /opt/zeek/bin >> ${GITHUB_PATH}; \
- uses: boa-dev/criterion-compare-action@v3
with:
branchName: ${{ github.base_ref }}

pre-commit:
name: Run pre-commit hooks
runs-on: ubuntu-22.04
Expand Down
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,11 @@ lto = "thin"
[[bench]]
name = "criterion"
harness = false

[lib]
bench = false

[[bin]]
name = "zeek-language-server"
path = "src/main.rs"
bench = false
Loading