Skip to content
Open
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
46 changes: 46 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Rust Build/Test

# The trigger structure here is a little confusing but it specifies to
# run on all pushes, and then subsequent pushes during a PR to the main.
# It skips running after a PR is merged because by then it will have
# already been run on the main branch.

on:
push:
branches-ignore:
- "main"
paths:
- "src/rust/**/*.rs"
- "**/Cargo.toml"
- "**/Cargo.lock"
pull_request:
branches:
- "main"
paths:
- "src/rust/**/*.rs"
- "**/Cargo.toml"
- "**/Cargo.lock"
env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[workspace]
members = [
"src/rust/rust-demultiplex",
"src/rust/rust-umi"
]

[profile.release]
opt-level = 3