diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a26e225..5f285ed 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -14,3 +14,7 @@ updates: schedule: interval: weekly open-pull-requests-limit: 10 + - package-ecosystem: "nix" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml new file mode 100644 index 0000000..3a0390f --- /dev/null +++ b/.github/workflows/bench.yml @@ -0,0 +1,47 @@ + # Bencher regression detection. Requires: + # - BENCHER_API_TOKEN repo secret (https://bencher.dev/docs) + # - BENCHER_PROJECT repo variable (your Bencher project slug) + bench: + if: {% raw %}${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && vars.BENCHER_PROJECT != '' }}{% endraw %} + runs-on: ubuntu-latest + steps: + - uses: {{ pin_github_action("actions/checkout", "v6") }} + with: + persist-credentials: false + - uses: dtolnay/rust-toolchain@stable + - uses: {{ pin_github_action("Swatinem/rust-cache", "v2") }} + with: + save-if: {% raw %}${{ github.ref == 'refs/heads/main' }}{% endraw %} + - uses: {{ pin_github_action("bencherdev/bencher", "v0") }} + - run: | + bencher run \ + --project {% raw %}${{ vars.BENCHER_PROJECT }}{% endraw %} \ + --token {% raw %}${{ secrets.BENCHER_API_TOKEN }}{% endraw %} \ + --branch main \ + --adapter rust_criterion \ + "cargo bench --all-features" + bench-pr: + if: {% raw %}${{ github.event_name == 'pull_request' && vars.BENCHER_PROJECT != '' }}{% endraw %} + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: {{ pin_github_action("actions/checkout", "v6") }} + with: + persist-credentials: false + - uses: dtolnay/rust-toolchain@stable + - uses: {{ pin_github_action("Swatinem/rust-cache", "v2") }} + with: + save-if: {% raw %}${{ github.ref == 'refs/heads/main' }}{% endraw %} + - uses: {{ pin_github_action("bencherdev/bencher", "v0") }} + - run: | + bencher run \ + --project {% raw %}${{ vars.BENCHER_PROJECT }}{% endraw %} \ + --token {% raw %}${{ secrets.BENCHER_API_TOKEN }}{% endraw %} \ + --branch {% raw %}${{ github.head_ref }}{% endraw %} \ + --start-point main \ + --start-point-reset \ + --adapter rust_criterion \ + --error-on-alert \ + --github-actions {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} \ + "cargo bench --all-features" diff --git a/Cargo.lock b/Cargo.lock index f40981b..a485358 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5235,9 +5235,9 @@ dependencies = [ [[package]] name = "termprofile" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b1cbd23d0eb880e38f90c4a8861bc9278f262becd86ea8f9fb5294a56c020e9" +checksum = "b6c82c3d24419fa095b3cc0c547839feac1e73f74b7356f47945f9e1ca09963c" dependencies = [ "anstyle", "palette", diff --git a/Cargo.toml b/Cargo.toml index 913e9f0..240f8d0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ rat-widget = "3.2.1" ratatui = {version = "0.30.0", features = ["unstable-widget-ref"] } ratatui-macros = "0.7.0" ratatui-toaster = { path = "crates/ratatui-toaster", version = "0.1.3", features = ["tokio"] } -termprofile = { version = "0.2.2", features = ["convert", "ratatui"] } +termprofile = { version = "0.2.3", features = ["convert", "ratatui"] } textwrap = { version = "0.16.2", features = ["terminal_size"] } thiserror = "2.0.18" throbber-widgets-tui = "0.11.0"