dragonfly/.github/workflows/ci.yml

67 lines
2.5 KiB
YAML

name: ci-tests
on:
# push:
# branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
strategy:
matrix:
# Test of these containers
container: ["ubuntu-dev:20", "alpine-dev:latest"]
timeout-minutes: 30
container:
image: ghcr.io/romange/${{ matrix.container }}
# credentials:
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install dependencies
run: |
uname -a
cmake --version
mkdir -p ${{github.workspace}}/build
- name: Cache build deps
id: cache-deps
uses: actions/cache@v3
with:
path: |
~/.ccache
${{github.workspace}}/build/_deps
key: ${{ runner.os }}-deps-${{ github.base_ref }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-deps-${{ github.base_ref }}-
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cd ${{github.workspace}}/build && pwd
du -hcs _deps/
- name: Build & Test
run: |
cd ${{github.workspace}}/build
ninja src/all
ccache --show-stats
GLOG_logtostderr=1 GLOG_vmodule=rdb_load=1,rdb_save=1 ctest -V -R rdb_test
echo Run ctest -V -L DFLY
#GLOG_logtostderr=1 GLOG_vmodule=transaction=1,engine_shard_set=1
GLOG_logtostderr=1 GLOG_vmodule=rdb_load=1,rdb_save=2,snapshot=2 ctest -V -L DFLY
# GLOG_logtostderr=1 GLOG_vmodule=transaction=1,engine_shard_set=1 CTEST_OUTPUT_ON_FAILURE=1 ninja server/test