Skip to content

Commit

Permalink
ci: Add basic Rust CI (#2)
Browse files Browse the repository at this point in the history
* ci: Add basic Rust CI

* Fix test flags
  • Loading branch information
samuelburnham authored Jan 24, 2025
1 parent 9a1e401 commit b57727d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Tests

on:
pull_request:
push:
branches: main

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: argumentcomputer/ci-workflows
- uses: ./.github/actions/ci-env
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@nextest
- uses: Swatinem/rust-cache@v2
- name: Tests
run: cargo nextest run --cargo-profile test --workspace --run-ignored all

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: argumentcomputer/ci-workflows
- uses: ./.github/actions/ci-env
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Check Rustfmt Code Style
run: cargo fmt --all --check
- name: check *everything* compiles
run: cargo check --workspace --all-targets --all-features
- name: Check clippy warnings
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: Doctests
run: cargo test --doc --workspace
2 changes: 1 addition & 1 deletion examples/acc-linear-combination.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fn main() {
let log_size = 1usize;

// Define set of bytes that we want to decompose
let p_in = unconstrained::<U, F128, F8>(&mut builder, format!("p_in"), log_size).unwrap();
let p_in = unconstrained::<U, F128, F8>(&mut builder, "p_in".to_string(), log_size).unwrap();

let _ =
bytes_decomposition_gadget(&mut builder, "bytes decomposition", log_size, p_in).unwrap();
Expand Down

0 comments on commit b57727d

Please sign in to comment.