-
Notifications
You must be signed in to change notification settings - Fork 9
49 lines (38 loc) · 1.47 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: openfhe-rs
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
openfhe-rs:
runs-on: ubuntu-latest
steps:
- name: Clone Git repository
uses: actions/checkout@v4
- name: Install Cmake
run: |
sudo apt update
sudo apt-get install -y cmake
- name: Build and install OpenFHE
run: |
git clone https://github.com/openfheorg/openfhe-development.git
cd openfhe-development
mkdir install
cmake -B ${OPENFHE_BUILD:-build} -DBUILD_SHARED=ON -DCMAKE_INSTALL_PREFIX=`pwd`/install .
make -C ${OPENFHE_BUILD:-build} -j$(nproc)
make -C ${OPENFHE_BUILD:-build} install
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable-gnu
- name: Build openfhe-rs
run: |
cargo build --verbose
- name: Test openfhe-rs
run: |
LD_LIBRARY_PATH=`pwd`/openfhe-development/install/lib cargo test -- --test-threads=1
- name: Examples openfhe-rs
run: |
LD_LIBRARY_PATH=`pwd`/openfhe-development/install/lib cargo run --example polynomial_evaluation
LD_LIBRARY_PATH=`pwd`/openfhe-development/install/lib cargo run --example function_evaluation
LD_LIBRARY_PATH=`pwd`/openfhe-development/install/lib cargo run --example simple_integers
LD_LIBRARY_PATH=`pwd`/openfhe-development/install/lib cargo run --example simple_real_numbers