Skip to content

Commit

Permalink
feat: skeleton and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rot256 committed Jul 1, 2024
0 parents commit 0542f39
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
on: ["push", "pull_request"]

jobs:
build-and-test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: wasm32-unknown-unknown
components: rustfmt, clippy

- name: Run cargo test
run: cargo test --all-features

- name: Run cargo build
run: cargo build --all

- name: Run cargo fmt
run: cargo fmt --all -- --check

- name: Run cargo clippy
run: cargo clippy --all -- -D warnings

- name: Build for wasm
run: cargo build --target wasm32-unknown-unknown

- name: Build release
run: cargo build --release

build-and-test-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy

- name: Run cargo test
run: cargo test --all-features

- name: Run cargo build
run: cargo build --all

- name: Run cargo fmt
run: cargo fmt --all -- --check

- name: Run cargo clippy
run: cargo clippy --all -- -D warnings

- name: Build release
run: cargo build --release
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/target
Cargo.lock
.DS_Store
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "pumice"
version = "0.1.0"
edition = "2021"

[dependencies]
ark-ff = "0.4.2"
ark-poly = "0.4.2"
14 changes: 14 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}

0 comments on commit 0542f39

Please sign in to comment.