From 67614647cb0659eb961211bdb7fca60f04efda43 Mon Sep 17 00:00:00 2001 From: xevisalle <38231508+xevisalle@users.noreply.github.com> Date: Sat, 4 Nov 2023 02:42:57 +0100 Subject: [PATCH] Add github actions (#5) --- .github/workflows/workflow.yml | 14 ++++++++++++++ Makefile | 2 +- README.md | 3 +++ src/tests.c | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/workflow.yml diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..234b350 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,14 @@ +name: tests + +on: [ push ] + +jobs: + build: + name: tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - run: sudo apt install libcunit1-dev + - run: cd .. && git clone https://github.com/herumi/mcl && cd mcl && make -j8 + - run: make test diff --git a/Makefile b/Makefile index b5e5795..733e33a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -MAIN = test +MAIN = tests OUT = zpie CC = gcc CAARCH64 = aarch64-linux-gnu-gcc diff --git a/README.md b/README.md index f514b75..6530c16 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # ZPiE: Zero-knowledge Proofs in Embedded systems +![Build Status](https://github.com/xevisalle/zpie/workflows/tests/badge.svg) +[![Repository](https://img.shields.io/badge/github-zpie-blueviolet?logo=github)](https://github.com/xevisalle/zpie) + A portable and efficient C library for developing Zero-Knowledge applications for embedded systems. **DISCLAIMER**: this library is currently **unstable**. Furthermore, **it has not gone through an exhaustive security analysis**, so it is not intended to be used in a production environment, only for academic purposes. diff --git a/src/tests.c b/src/tests.c index 7e399b7..8342a1c 100644 --- a/src/tests.c +++ b/src/tests.c @@ -163,6 +163,7 @@ int main() } CU_basic_run_tests(); + if(CU_get_number_of_failures()) abort(); CU_cleanup_registry(); return CU_get_error();