Skip to content

Commit

Permalink
Adds basic CI that builds & tests with Cargo and Bazel (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: Holger Rapp <[email protected]>
  • Loading branch information
SirVer and Holger Rapp authored Nov 23, 2023
1 parent 8d69a77 commit a82c941
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Build & Test with Bazel
on: [push, pull_request]
jobs:
build:
name: bazel build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: bazelisk build ...
test:
name: bazel test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: bazelisk test ...
19 changes: 19 additions & 0 deletions .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build & Test with Cargo
on: [push, pull_request]
jobs:
build:
name: cargo build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --all
- run: cargo build --all --examples
test:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --all
- run: cargo test --all --examples
2 changes: 1 addition & 1 deletion zvt/src/packets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ pub mod tests {
use std::fs;

pub fn get_bytes(name: &str) -> Vec<u8> {
let path_from_root = "rust/zvt/zvt/data/".to_string();
let path_from_root = "zvt/data/".to_string();
let base_dir = match fs::metadata(&path_from_root) {
Ok(_) => path_from_root,
Err(_) => format!("data/"),
Expand Down

0 comments on commit a82c941

Please sign in to comment.