2021-12-21 08:50:46 +00:00
|
|
|
name: ci-tests
|
|
|
|
|
|
|
|
on:
|
2022-05-05 10:38:22 +00:00
|
|
|
# push:
|
|
|
|
# branches: [ main ]
|
2021-12-21 08:50:46 +00:00
|
|
|
pull_request:
|
2022-11-05 20:16:57 +00:00
|
|
|
branches: [main]
|
2021-12-21 08:50:46 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
2022-11-05 20:16:57 +00:00
|
|
|
pre-commit:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 2
|
|
|
|
- uses: actions/setup-python@v3
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install pre-commit
|
|
|
|
python -m pip freeze --local
|
|
|
|
- uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ~/.cache/pre-commit
|
|
|
|
key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
|
|
|
- name: Run pre-commit checks
|
|
|
|
run: pre-commit run --show-diff-on-failure --color=always --from-ref HEAD^ --to-ref HEAD
|
|
|
|
shell: bash
|
2021-12-21 08:50:46 +00:00
|
|
|
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
|
2022-02-19 20:56:09 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
# Test of these containers
|
2022-04-25 09:06:31 +00:00
|
|
|
container: ["ubuntu-dev:20", "alpine-dev:latest"]
|
2022-12-11 11:52:45 +00:00
|
|
|
build-type: [Debug, Release]
|
2022-02-19 20:56:09 +00:00
|
|
|
timeout-minutes: 30
|
2022-11-05 20:16:57 +00:00
|
|
|
container:
|
2022-05-11 17:37:25 +00:00
|
|
|
image: ghcr.io/romange/${{ matrix.container }}
|
|
|
|
# credentials:
|
|
|
|
# username: ${{ github.repository_owner }}
|
|
|
|
# password: ${{ secrets.GITHUB_TOKEN }}
|
2021-12-21 08:50:46 +00:00
|
|
|
steps:
|
2022-11-05 20:16:57 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2021-12-21 08:50:46 +00:00
|
|
|
uname -a
|
|
|
|
cmake --version
|
2022-01-14 12:55:13 +00:00
|
|
|
mkdir -p ${{github.workspace}}/build
|
2022-11-05 20:16:57 +00:00
|
|
|
- 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: |
|
2022-12-11 11:52:45 +00:00
|
|
|
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
2022-01-14 17:22:14 +00:00
|
|
|
cd ${{github.workspace}}/build && pwd
|
|
|
|
du -hcs _deps/
|
2022-11-05 20:16:57 +00:00
|
|
|
- name: Build & Test
|
|
|
|
run: |
|
2022-01-14 17:22:14 +00:00
|
|
|
cd ${{github.workspace}}/build
|
2022-02-25 08:03:42 +00:00
|
|
|
ninja src/all
|
2022-01-14 12:55:13 +00:00
|
|
|
ccache --show-stats
|
|
|
|
echo Run ctest -V -L DFLY
|
2022-11-05 20:16:57 +00:00
|
|
|
#GLOG_logtostderr=1 GLOG_vmodule=transaction=1,engine_shard_set=1
|
2022-12-17 17:22:40 +00:00
|
|
|
GLOG_logtostderr=1 GLOG_vmodule=rdb_load=1,rdb_save=1,snapshot=1 ctest -V -L DFLY
|
2022-11-22 06:21:00 +00:00
|
|
|
./dragonfly_test --mem_defrag_threshold=0.05 # trying to catch issue with defrag
|
2022-01-14 17:22:14 +00:00
|
|
|
# GLOG_logtostderr=1 GLOG_vmodule=transaction=1,engine_shard_set=1 CTEST_OUTPUT_ON_FAILURE=1 ninja server/test
|