Skip to content

Commit

Permalink
build: use stable rust, and criterion.rs for benching (#429)
Browse files Browse the repository at this point in the history
* build against stable rust

* ci: build against stable

* minor change

* build(deps): switched to plex 0.3.0

---------

Co-authored-by: Erik Bjäreholt <erik@bjareho.lt>
  • Loading branch information
cjc7373 and ErikBjare committed Oct 29, 2023
1 parent 88464b5 commit e1cd761
Show file tree
Hide file tree
Showing 7 changed files with 574 additions and 321 deletions.
30 changes: 9 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,20 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Rust nightly
- name: Set up Rust
id: toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo build
uses: actions/cache@v3
if: runner.os != 'macOS' # cache doesn't seem to behave nicely on macOS, see: https://github.com/ActivityWatch/aw-server-rust/issues/180
env:
cache-name: cargo-build-target
with:
path: target
# key needs to contain rustc_hash due to https://github.com/ActivityWatch/aw-server-rust/issues/180
key: ${{ runner.os }}-${{ env.cache-name }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}
# key needs to contain cachekey due to https://github.com/ActivityWatch/aw-server-rust/issues/180
key: ${{ runner.os }}-${{ env.cache-name }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ steps.toolchain.outputs.rustc_hash }}-
${{ runner.os }}-${{ env.cache-name }}-${{ steps.toolchain.outputs.cachekey }}-
- name: Build
run: cargo build --workspace --verbose
- name: Run tests
Expand All @@ -54,12 +50,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Rust nightly
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo build
uses: actions/cache@v3
env:
Expand Down Expand Up @@ -88,12 +80,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Rust nightly
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable

# Note: If you need to combine the coverage info of multiple
# feature sets, you need a `.tarpaulin.toml` config file, see
Expand Down
Loading

0 comments on commit e1cd761

Please sign in to comment.