forked from open-quantum-safe/liboqs-java
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.79 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
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build and Test
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
openjdk-11:
name: Build and Test on OpenJDK 11
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true # Fetch submodules
- name: Install dependencies to build liboqs
run: |
sudo apt update -qq
sudo apt install -y cmake build-essential ninja-build libssl-dev
- name: Build liboqs
run: |
mkdir build
cd build
cmake .. -G"Ninja" -DBUILD_SHARED_LIBS=ON -DOQS_BUILD_ONLY_LIB=ON
sudo ninja install
working-directory: liboqs
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Resolve all maven project dependencies
run: mvn dependency:go-offline
- name: Build liboqs-java and run tests
run: |
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
mvn package
- name: Compile KEM, Signatures and Rand examples
run: |
javac -cp target/liboqs-java.jar examples/KEMExample.java
javac -cp target/liboqs-java.jar examples/SigExample.java
javac -cp target/liboqs-java.jar examples/RandExample.java
- name: Run KEM, Signatures and Rand examples
run: |
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
java -Djava.library.path=target/ -cp target/liboqs-java.jar:examples/ KEMExample
java -Djava.library.path=target/ -cp target/liboqs-java.jar:examples/ SigExample
java -Djava.library.path=target/ -cp target/liboqs-java.jar:examples/ RandExample