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

Self hosted ci #52

Closed
wants to merge 2 commits into from
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
15 changes: 13 additions & 2 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ jobs:
- name: Build
run: cargo build

bench:
runs-on: self-hosted
steps:
- uses: actions/checkout@master
- uses: actions-rs/[email protected]
with:
toolchain: nightly
override: true
- name: Cargo Bench
run: cargo +nightly bench | tee output.txt

build:
needs: quick-tests
runs-on: ubuntu-latest
Expand All @@ -48,7 +59,7 @@ jobs:
steps:
- name: Checkout to repository
uses: actions/checkout@v2
- name: Setup Rust toolchain
- name: Setup Rust toolchain
uses: actions-rs/[email protected]
with:
toolchain: stable
Expand All @@ -57,7 +68,7 @@ jobs:
run: cargo install cargo-bump --force
- name: Modify version with tag
run: cargo bump ${{ github.ref_name }}
- name: Automatic commit for crate version upgrade
- name: Automatic commit for crate version upgrade
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: master
Expand Down
41 changes: 41 additions & 0 deletions benches/bench.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#![feature(test)]

extern crate test;


use test::Bencher;


use navigator_rs::Navigator;
// use std::thread::sleep;
// use std::time::Duration;

// fn main() {
// println!("Creating your navigator module!");
// let mut nav = Navigator::new();

// println!("Setting up your navigator, ahoy!");
// nav.init();

// loop {
// nav.set_pwm_channel_value(PwmChannel::All, 0);
// println!("{:#?}", nav.fmt_debug());
// sleep(Duration::from_millis(1000));
// }
// }


#[bench]
fn init(b: &mut Bencher) {
b.iter(|| {
let mut nav = Navigator::new();
let _ = nav.init();
});
}

// #[bench]
// fn bench_fib_20(b: &mut Bencher) {
// b.iter(|| {
// let _ = fib(20);
// });
// }
Loading