build_and_test.yml 964 B

12345678910111213141516171819202122232425262728293031323334353637
  1. name: C/C++ CI
  2. on:
  3. schedule:
  4. - cron: "0 1 * * *"
  5. workflow_dispatch:
  6. jobs:
  7. build:
  8. runs-on: self-hosted
  9. steps:
  10. - name: Checkout
  11. uses: actions/checkout@v3
  12. - name: Configure
  13. shell: bash
  14. run: |
  15. cd ../build
  16. rm -rf *
  17. cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_TOOLCHAIN_FILE=../ydb/clang.toolchain ../ydb
  18. - name: Build
  19. shell: bash
  20. run: |
  21. cd ../build
  22. ninja
  23. - name: Test
  24. shell: bash
  25. run: |
  26. rm -rf /mnt/d/tmp/*
  27. cd ../build/ydb
  28. # Our test util provides output with coloring, so remove it using sed before sending to grep
  29. TMPDIR=/mnt/d/tmp ctest -j28 --timeout 1200 --force-new-ctest-process --output-on-failure | \
  30. sed -e 's/\x1b\[[0-9;]*m//g' | \
  31. tee testrun.log | \
  32. grep -E '(Test\s*#.*\*\*\*|\[FAIL\])|.*tests passed,.*tests failed out of'