diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e2e94c0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: Unit Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Build the Docker image + run: docker build -t librseq-ci-image tests/image/ubuntu/ + + - name: Run unit tests + run: | + docker run -v $(pwd):/librseq --rm librseq-ci-image ./tests/image/ubuntu/run.sh diff --git a/tests/image/ubuntu/Dockerfile b/tests/image/ubuntu/Dockerfile new file mode 100644 index 0000000..6b67ca4 --- /dev/null +++ b/tests/image/ubuntu/Dockerfile @@ -0,0 +1,8 @@ +FROM ubuntu:24.04 + +ENV DEBIAN_FRONTEND="noninteractive" +RUN apt-get update && \ + apt-get install -y autotools-dev autoconf build-essential \ + automake pkg-config libtool libnuma-dev + +WORKDIR /librseq diff --git a/tests/image/ubuntu/run.sh b/tests/image/ubuntu/run.sh new file mode 100755 index 0000000..2ac1fc8 --- /dev/null +++ b/tests/image/ubuntu/run.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -exo pipefail + +./bootstrap +./configure +make +make check +make install +ldconfig