Skip to content

Commit

Permalink
Add circleci config
Browse files Browse the repository at this point in the history
  • Loading branch information
paolostivanin committed May 18, 2022
1 parent 974d9f9 commit 91d3af0
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .circleci/build_and_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

mkdir build && cd "$_"
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTING=ON
make
make install
./tests/test_all
6 changes: 6 additions & 0 deletions .circleci/build_only.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

mkdir build && cd "$_"
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
make install
37 changes: 37 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: 2.0

jobs:
debianLatestStable:
docker:
- image: debian:latest
steps:
- checkout
- run: apt update && apt -y install git gcc clang cmake libcriterion-dev libbaseencode-dev
- run: chmod +x .circleci/build_and_tests.sh

fedoraLatestStable:
docker:
- image: fedora:latest
steps:
- checkout
- run: dnf -y update && dnf -y install git gcc cmake make libgcrypt-devel
- run: chmod +x .circleci/install_deps.sh
- run: chmod +x .circleci/build_only.sh

archlinux:
docker:
- image: archlinux:latest
steps:
- checkout
- run: pacman -Syu --noconfirm && pacman -S --noconfirm pkg-config git gcc cmake make
- run: chmod +x .circleci/install_deps.sh
- run: chmod +x .circleci/build_only.sh

workflows:
version: 2
build:
jobs:
- debianLatestStable
- fedoraLatestStable
- archlinux

9 changes: 9 additions & 0 deletions .circleci/install_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set -e

git clone https://github.com/paolostivanin/libbaseencode.git
cd libbaseencode && mkdir build && cd "$_"
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make -j2
make install
cd ../..

0 comments on commit 91d3af0

Please sign in to comment.