-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from Cosmian/feature/add_pyo3_for_ffi_calls
Feature/add pyo3 for ffi calls
- Loading branch information
Showing
23 changed files
with
903 additions
and
300 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,19 @@ | ||
[target.wasm32-unknown-unknown] | ||
runner = 'wasm-bindgen-test-runner' | ||
|
||
[alias] | ||
|
||
# Check for formatting | ||
format = "fmt --all -- --check" | ||
|
||
# Build all features, all targets and all binaries | ||
build-all = "build --release --all-targets --all-features --bins" | ||
|
||
# Run Clippy on all code paths | ||
clippy-all = "clippy --workspace --all-targets --all-features -- -D warnings" | ||
|
||
# Run coverage | ||
coverage = "tarpaulin --release -v -f -t 1800 --out Xml --ignore-tests --exclude-files resources/* apps/*" | ||
|
||
# Find unused dependencies | ||
deps = "udeps --workspace --all-targets --all-features --backend depinfo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
image: gitlab.cosmian.com:5000/core/ci-rust:latest | ||
|
||
variables: | ||
CARGO_HOME: ${CI_PROJECT_DIR}/.cargo/ | ||
SCCACHE_DIR: ${CI_PROJECT_DIR}/.cache/sccache | ||
|
||
stages: | ||
- prebuild | ||
- build | ||
|
||
rustfmt: | ||
stage: prebuild | ||
cache: {} | ||
script: | ||
- cargo format | ||
|
||
doc: | ||
stage: prebuild | ||
cache: {} | ||
script: | ||
- cargo doc --all-features | ||
|
||
clippy: | ||
stage: prebuild | ||
cache: {} | ||
script: | ||
- cargo clippy-all | ||
|
||
# Security check | ||
cargo_audit: | ||
stage: prebuild | ||
cache: {} | ||
script: | ||
- cargo audit | ||
allow_failure: true | ||
only: | ||
refs: | ||
- tags | ||
- main | ||
- develop | ||
|
||
# | ||
# Build base | ||
# | ||
.base_compile: &base_compile | ||
stage: build | ||
cache: | ||
key: "${CI_COMMIT_REF_SLUG}" | ||
policy: pull | ||
paths: | ||
- $CARGO_HOME | ||
- $SCCACHE_DIR | ||
before_script: | ||
- sccache -s | ||
|
||
build_x86_64: | ||
<<: *base_compile | ||
script: | ||
- cargo build --verbose --release --features ffi --target x86_64-unknown-linux-gnu | ||
- cargo test --verbose --release --features ffi --target x86_64-unknown-linux-gnu | ||
artifacts: | ||
paths: | ||
- target/x86_64-unknown-linux-gnu/release/*.so | ||
expire_in: 3 mos | ||
|
||
build_centos7: | ||
<<: *base_compile | ||
image: gitlab.cosmian.com:5000/core/ci-rust-glibc-2.17:latest | ||
script: | ||
- cargo build --verbose --release --features ffi --target x86_64-unknown-linux-gnu | ||
- cargo test --verbose --release --features ffi --target x86_64-unknown-linux-gnu | ||
- cbindgen . -c cbindgen.toml | grep -v \#include | uniq >target/${CI_PROJECT_NAME}.h | ||
artifacts: | ||
paths: | ||
- target/x86_64-unknown-linux-gnu/release/*.so | ||
- target/*.h | ||
expire_in: 3 mos | ||
|
||
build_wasm32: | ||
<<: *base_compile | ||
stage: build | ||
script: | ||
- wasm-pack build --release --features wasm_bindgen | ||
artifacts: | ||
paths: | ||
- pkg | ||
expire_in: 3 mos | ||
|
||
build_python_whl: | ||
<<: *base_compile | ||
stage: build | ||
script: | ||
- maturin build --cargo-extra-args="--release --features python" | ||
- bash src/interfaces/pyo3/tests/test.sh | ||
artifacts: | ||
paths: | ||
- target/wheels/*.whl | ||
expire_in: 3 mos | ||
|
||
build_windows: | ||
<<: *base_compile | ||
stage: build | ||
script: | ||
- cargo build --verbose --release --features ffi --target x86_64-pc-windows-gnu | ||
- cbindgen . -c cbindgen.toml | grep -v \#include | uniq >target/${CI_PROJECT_NAME}.h | ||
artifacts: | ||
paths: | ||
- target/x86_64-pc-windows-gnu/release/*.dll | ||
- target/*.h | ||
expire_in: 3 mos | ||
|
||
build_osx: | ||
<<: *base_compile | ||
stage: build | ||
image: gitlab.cosmian.com:5000/core/ci-rust-osx:latest | ||
script: | ||
- cargo build --verbose --release --features ffi | ||
- cbindgen . -c cbindgen.toml | grep -v \#include | uniq >target/${CI_PROJECT_NAME}.h | ||
artifacts: | ||
paths: | ||
- target/release/*.a | ||
- target/release/*.so | ||
- target/*.h | ||
expire_in: 3 mos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.