From 985c7847b760ca5c47eb723b6d1feaa1811df8fb Mon Sep 17 00:00:00 2001 From: "Mayeul@Zama" Date: Mon, 31 Jan 2022 16:30:16 +0100 Subject: [PATCH] first commit --- .github/workflows/rust.yml | 52 ++++++++++++++++++++++++++++++++++++++ .gitignore | 2 ++ Cargo.toml | 8 ++++++ src/lib.rs | 8 ++++++ 4 files changed, 70 insertions(+) create mode 100644 .github/workflows/rust.yml create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 src/lib.rs diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 000000000..efd92b8e2 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,52 @@ +name: Continuous integration + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + CARGO_TERM_COLOR: always +jobs: + all: + runs-on: ubuntu-20.04 + env: + CARGO_ARGS: --release + steps: + - name: Code checkout + uses: actions/checkout@v2 + + - name: Rust install + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + # A SSH private key is required as some dependencies are from private repos + - uses: webfactory/ssh-agent@v0.5.2 + with: + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + + - name: cargo check + uses: actions-rs/cargo@v1 + with: + command: check + args: ${{ env.CARGO_ARGS }} + + - name: cargo fmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: -- --check + + - name: cargo clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + args: ${{ env.CARGO_ARGS }} + + - name: cargo test + uses: actions-rs/cargo@v1 + with: + command: test + args: ${{ env.CARGO_ARGS }} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..96ef6c0b9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +Cargo.lock diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 000000000..f9bbd4f6a --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "concrete-optimizer" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 000000000..1b4a90c93 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,8 @@ +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + let result = 2 + 2; + assert_eq!(result, 4); + } +}