71 lines
1.7 KiB
YAML
71 lines
1.7 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
cmake-build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install build tools
|
|
run: |
|
|
if ! command -v cc >/dev/null || ! command -v cmake >/dev/null || ! command -v ninja >/dev/null; then
|
|
apt-get update
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake ninja-build
|
|
fi
|
|
|
|
- name: Configure CMake build
|
|
run: |
|
|
cmake -S . -B build -G Ninja
|
|
|
|
- name: Build with CMake
|
|
run: |
|
|
cmake --build build
|
|
|
|
build-script:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install build tools
|
|
run: |
|
|
if ! command -v cc >/dev/null; then
|
|
apt-get update
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential
|
|
fi
|
|
|
|
- name: Run repo build script
|
|
run: |
|
|
chmod +x demo/build.sh
|
|
./demo/build.sh
|
|
|
|
unit-tests:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install build tools
|
|
run: |
|
|
if ! command -v cc >/dev/null || ! command -v cmake >/dev/null || ! command -v ninja >/dev/null; then
|
|
apt-get update
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake ninja-build
|
|
fi
|
|
|
|
- name: Configure unit tests
|
|
run: |
|
|
cmake -S . -B build-tests -G Ninja -DIKV_BUILD_DEMOS=OFF -DIKV_BUILD_TESTS=ON
|
|
|
|
- name: Run unit tests
|
|
run: |
|
|
cmake --build build-tests
|
|
ctest --test-dir build-tests --output-on-failure
|