first commit

This commit is contained in:
Mayeul@Zama
2022-01-31 16:30:16 +01:00
commit 985c7847b7
4 changed files with 70 additions and 0 deletions

52
.github/workflows/rust.yml vendored Normal file
View File

@@ -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 }}

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/target
Cargo.lock

8
Cargo.toml Normal file
View File

@@ -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]

8
src/lib.rs Normal file
View File

@@ -0,0 +1,8 @@
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
let result = 2 + 2;
assert_eq!(result, 4);
}
}