From 149b3bfc3272ff68a44511d6df01f3bc6346a6cd Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Sun, 23 Jun 2024 11:23:38 -0400 Subject: [PATCH 1/2] Add minimal CI --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2798057 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: Rust + +on: + push: + branches: + - main + pull_request: + +jobs: + lint-test: + name: Lint and Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: "recursive" + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + + - uses: Swatinem/rust-cache@v2 + + - name: Cargo fmt + run: cargo fmt --all -- --check + + - name: "clippy --all" + run: cargo clippy --all --all-features --tests -- -D warnings + + - name: "cargo check" + run: cargo check --all --all-features + + - name: "cargo test" + run: | + cargo test --all + cargo test --all --all-features From fd0de5a3102274103267e239457c90292acd7799 Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Sun, 23 Jun 2024 11:25:11 -0400 Subject: [PATCH 2/2] fix lint --- arro3-compute/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arro3-compute/src/lib.rs b/arro3-compute/src/lib.rs index c86523a..82f1ce2 100644 --- a/arro3-compute/src/lib.rs +++ b/arro3-compute/src/lib.rs @@ -11,7 +11,7 @@ fn ___version() -> &'static str { /// A Python module implemented in Rust. #[pymodule] -fn _rust(_py: Python, m: &PyModule) -> PyResult<()> { +fn _rust(_py: Python, m: &Bound) -> PyResult<()> { m.add_wrapped(wrap_pyfunction!(___version))?; m.add_wrapped(wrap_pyfunction!(concat::concat))?;