Initial log format rework #628
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Tests | |
on: | |
- push | |
- pull_request | |
jobs: | |
build-and-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-20.04 | |
- ubuntu-22.04 | |
compiler: | |
- gcc | |
- clang | |
tracing: | |
- LIBDQLITE_TRACE=1 | |
- NOLIBDQLITE_TRACE=1 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y lcov libsqlite3-dev liblz4-dev libuv1-dev | |
- name: Build raft | |
env: | |
CC: ${{ matrix.compiler }} | |
run: | | |
git clone https://github.com/canonical/raft.git --depth 1 | |
cd raft | |
autoreconf -i | |
./configure --enable-debug --enable-sanitize | |
make -j4 | |
sudo make install | |
sudo ldconfig | |
cd .. | |
- name: Build dqlite | |
env: | |
CC: ${{ matrix.compiler }} | |
run: | | |
autoreconf -i | |
./configure --enable-debug --enable-code-coverage --enable-sanitize | |
make CFLAGS=-O0 -j2 | |
- name: Test | |
env: | |
CC: ${{ matrix.compiler }} | |
run: | | |
export ${{ matrix.tracing }} | |
make CFLAGS=-O0 -j2 check || (cat ./test-suite.log && false) | |
- name: Coverage | |
env: | |
CC: ${{ matrix.compiler }} | |
run: if [ "${CC}" = "gcc" ]; then make code-coverage-capture; fi | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
verbose: true |