Skip to content

Commit 8b8cc11

Browse files
authored
Move CI to GitHub Actions (#30)
* Port workflows from CircleCI to GitHub Actions * Add CI job for workflow linting * Update README badge --------- Signed-off-by: Spencer Wilson <[email protected]>
1 parent 2b15c8d commit 8b8cc11

File tree

3 files changed

+48
-89
lines changed

3 files changed

+48
-89
lines changed

.circleci/config.yml

Lines changed: 0 additions & 88 deletions
This file was deleted.

.github/workflows/java.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: liboqs-java CI
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
pull_request:
7+
branches: ["**"]
8+
repository_dispatch:
9+
types: ["**"]
10+
11+
jobs:
12+
workflowcheck:
13+
name: Check validity of GitHub workflows
14+
runs-on: ubuntu-latest
15+
container: openquantumsafe/ci-ubuntu-latest:latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4
19+
- name: Ensure GitHub actions are valid
20+
run: actionlint -shellcheck "" # run *without* shellcheck
21+
22+
build-and-test:
23+
needs: workflowcheck
24+
name: OQS Ubuntu
25+
runs-on: ubuntu-latest
26+
container: openquantumsafe/ci-ubuntu-focal:latest
27+
steps:
28+
- name: Checkout liboqs-java
29+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4
30+
- name: Checkout liboqs main
31+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4
32+
with:
33+
repository: open-quantum-safe/liboqs
34+
path: liboqs
35+
ref: main
36+
- name: Build liboqs
37+
run: mkdir build && cd build && cmake .. -G"Ninja" -DBUILD_SHARED_LIBS=ON -DOQS_BUILD_ONLY_LIB=ON && ninja install
38+
working-directory: liboqs
39+
- name: Resolve all maven project dependencies
40+
run: mvn dependency:go-offline
41+
- name: Build liboqs-java and run tests
42+
run: export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" && mvn package
43+
- name: Compile KEM, Signatures and Rand examples
44+
run: |
45+
javac -cp target/liboqs-java.jar examples/KEMExample.java &&
46+
javac -cp target/liboqs-java.jar examples/SigExample.java &&
47+
javac -cp target/liboqs-java.jar examples/RandExample.java

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![CircleCI Build Status](https://circleci.com/gh/open-quantum-safe/liboqs-java/tree/master.svg?style=svg)](https://circleci.com/gh/open-quantum-safe/liboqs-java/tree/master)
1+
[![GitHub Actions Build Status](https://github.com/open-quantum-safe/liboqs-java/actions/workflows/java.yml/badge.svg)](https://github.com/open-quantum-safe/liboqs-java/actions/workflows/java.yml)
22

33
# liboqs-java: Java wrapper for liboqs
44

0 commit comments

Comments
 (0)