From 95df0da822b39ea52b1864c7facee7b28f679778 Mon Sep 17 00:00:00 2001 From: billyevans Date: Thu, 22 May 2025 21:56:16 -0700 Subject: [PATCH] Remove Travis CI configuration and scripts Update readme badges Add benchmark step to github-actions --- .github/workflows/rust.yml | 33 +++++++++++++++++++++++++++++++++ .travis.yml | 23 ----------------------- README.md | 9 ++++----- deploy-docs.sh | 20 -------------------- deploy.sh | 7 ------- install-kcov.sh | 8 -------- 6 files changed, 37 insertions(+), 63 deletions(-) delete mode 100644 .travis.yml delete mode 100755 deploy-docs.sh delete mode 100755 deploy.sh delete mode 100755 install-kcov.sh diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4bf14d2..6cbe496 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -126,3 +126,36 @@ jobs: run: | cargo login ${{ secrets.CARGO_TOKEN }} cargo publish + + benchmark: + name: Benchmark + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/master' + + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Cache dependencies + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-bench-${{ hashFiles('**/Cargo.lock') }} + + - name: Run benchmarks + run: cargo bench + + - name: Store benchmark result + uses: benchmark-action/github-action-benchmark@v1 + with: + tool: 'cargo' + output-file-path: target/criterion/*/base/estimates.json + github-token: ${{ secrets.GITHUB_TOKEN }} + auto-push: true + comment-on-alert: true + alert-threshold: '200%' diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b4f5fe8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -sudo: required -language: rust -rust: stable -services: - - docker - -branches: - except: - - gh-pages - -script: - - cargo test - - cargo doc - -after_success: - - docker run -it --rm --security-opt seccomp=unconfined --volume "$PWD:/volume" -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" elmtai/docker-rust-kcov "cargo-kcov kcov -v --coveralls" - - bash deploy-docs.sh - -deploy: - provider: script - script: bash -e ./deploy.sh - on: - tags: true diff --git a/README.md b/README.md index 2c4cba5..67318b1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # tst - -[![Build Status](https://travis-ci.org/billyevans/tst.svg?branch=master)](https://travis-ci.org/billyevans/tst) -[![Coverage Status](https://coveralls.io/repos/billyevans/tst/badge.svg?branch=master)](https://coveralls.io/r/billyevans/tst?branch=master) +[![CI](https://github.com/billyevans/tst/actions/workflows/rust.yml/badge.svg)](https://github.com/billyevans/tst/actions/workflows/rust.yml) +[![Coverage Status](https://coveralls.io/repos/github/billyevans/tst/badge.svg?branch=master)](https://coveralls.io/github/billyevans/tst?branch=master) [![crates.io](http://meritbadge.herokuapp.com/tst)](https://crates.io/crates/tst) [![API](https://docs.rs/tst/badge.svg)](https://docs.rs/tst/) @@ -23,7 +22,7 @@ Add this to your `Cargo.toml`: ```toml [dependencies] -tst = "0.10.*" +tst = "0.12.*" ``` ## Quick Start @@ -123,6 +122,6 @@ https://en.wikipedia.org/wiki/Ternary_search_tree # License -TST is distributed under the terms of the MIT license. +TST is distributed under the terms of the MIT license. See [LICENSE-MIT](LICENSE-MIT), and [COPYRIGHT](COPYRIGHT) for details. diff --git a/deploy-docs.sh b/deploy-docs.sh deleted file mode 100755 index eff90ce..0000000 --- a/deploy-docs.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -set -o errexit -o nounset - -rev=$(git rev-parse --short HEAD) - -cd target/doc - -git init -git config user.email 'doc bot' -git config user.name 'docbot@travis' -git remote add upstream "https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git" -git fetch upstream gh-pages -git reset upstream/gh-pages - -touch . - -git add -A . -git commit -m "rebuild pages at ${rev}" -git push -q upstream HEAD:gh-pages diff --git a/deploy.sh b/deploy.sh deleted file mode 100755 index 13f8555..0000000 --- a/deploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -set -e - -cargo login $CARGO_TOKEN -cargo package -cargo publish diff --git a/install-kcov.sh b/install-kcov.sh deleted file mode 100755 index 8430398..0000000 --- a/install-kcov.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -e -KCOV_VERSION=33 - -wget https://github.com/SimonKagstrom/kcov/archive/v${KCOV_VERSION}.tar.gz -tar xzf v${KCOV_VERSION}.tar.gz -mkdir kcov-${KCOV_VERSION}/build -cd kcov-${KCOV_VERSION}/build && cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME/kcov .. && make && make install