Skip to content

Re-enable the parallelized test suite in the default test executable. #60

Re-enable the parallelized test suite in the default test executable.

Re-enable the parallelized test suite in the default test executable. #60

Workflow file for this run

on:
push:
branches:
- master
pull_request:
name: Run unit tests
jobs:
test:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu Latest GCC, coverage enabled",
os: ubuntu-latest,
cov: true
}
steps:
- uses: actions/checkout@v4
- name: Get latest CMake
uses: lukka/get-cmake@latest
- uses: actions/cache@v4
id: cache
with:
path: libtiledb
key: tiledb-2.26.2
- name: Install TileDB
if: steps.cache.outputs.cache-hit != 'true'
run: |
sudo apt-get install wget
mkdir libtiledb
cd libtiledb
wget https://github.com/TileDB-Inc/TileDB/releases/download/2.26.2/tiledb-linux-x86_64-2.26.2-30fc114.tar.gz -O tiledb.tar.gz
tar -xvf tiledb.tar.gz
- name: Configure the build with coverage
if: ${{ matrix.config.cov }}
run: cmake -S . -B build -DCODE_COVERAGE=ON -DCMAKE_PREFIX_PATH=libtiledb
- name: Run the build
run: cmake --build build
- name: Run the tests
run: |
cd build
# Avoid using ctest because it's so slow; it starts a
# new process for each individual test, which is crazy.
for exe in $(ctest --show-only=json-v1 | jq -r ".tests[] | .command | .[0]" | sort | uniq)
do
echo "#### RUNNING ${exe} ####"
echo
${exe} --gtest_brief=1
echo
done
- name: Generate code coverage
if: ${{ matrix.config.cov }}
run: |
cd build/tests/CMakeFiles/
find -type f -name "*.gcno" -execdir gcov -abcfu {} +
- name: Upload to Codecov
if: ${{ matrix.config.cov }}
uses: codecov/codecov-action@v4
with:
directory: build/tests/CMakeFiles/
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}