Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat build: MacOS tests #814

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 92 additions & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ name: CI

jobs:
macos:
name: MacOS (build only)
name: MacOS
runs-on: macos-latest
env:
CPM_SOURCE_CACHE: '~/Library/Caches/CPM'
CMAKE_FLAGS: >-
-GNinja
-DCMAKE_BUILD_TYPE=Debug
Expand All @@ -34,6 +35,16 @@ jobs:
with:
fetch-depth: 0

- name: Reuse cached directories
uses: actions/cache@v4
with:
path: |
'~/Library/Caches/ccache'
'~/Library/Caches/CPM'
key: 'ccache-dir ${{github.ref}} run-${{github.run_number}}'
restore-keys: |
ccache-dir ${{github.ref}} run-

- name: Install brew packages
run: |
export SDKROOT="`xcrun --show-sdk-path`"
Expand All @@ -43,9 +54,17 @@ jobs:
brew install python@3.11
brew install lld

brew link postgresql@16
brew link postgresql@16 # postgres is keg-only

- name: Install test dependencies
run: |
brew tap mongodb/brew
brew install clickhouse kafka mongodb-community

brew upgrade
- name: Setup ccache
run: |
ccache -M 4.0GB
ccache -s

- name: Run cmake
run: |
Expand All @@ -54,3 +73,73 @@ jobs:
- name: Compile
run: |
cmake --build build_debug -j$(nproc) -- -k 1

- name: Run tests (universal)
run: |
cd build_debug/universal
ctest -V

- name: Run tests (samples)
run: |
cd build_debug/samples
# Fix Kafka and Rabbitmq after https://github.com/yandex/yandex-taxi-testsuite/pull/109
ctest -V -E "(kafka|mongo|rabbitmq)"

- name: Run tests (core)
run: |
cd build_debug/core
ulimit -n 4096 && ctest -V -E userver-core-unittest -E testsuite-userver-core-tests-basic-chaos-tests-deadline # ~10 failed tests

- name: Run tests (libraries)
run: |
cd build_debug/libraries
ctest -V

- name: Run tests (clickhouse)
run: |
cd build_debug/clickhouse
ctest -V

- name: Run tests (mongo)
run: |
cd build_debug/mongo
ctest -V

- name: Run tests (rocks)
run: |
cd build_debug/rocks
ctest -V

- name: Run tests (kafka)
if: false
run: |
# Enable after https://github.com/yandex/yandex-taxi-testsuite/pull/109
cd build_debug/kafka
ctest -V

- name: Run tests (rabbitmq)
if: false
run: |
# Enable after https://github.com/yandex/yandex-taxi-testsuite/pull/109
cd build_debug/rabbitmq
ctest -V

- name: Run tests (grpc)
run: |
cd build_debug/grpc
ctest -V

- name: Run tests (mysql)
run: |
cd build_debug/mysql
GTEST_FILTER="-*Transaction*" ctest -V

- name: Run tests (redis)
run: |
cd build_debug/redis
ctest -V -E testsuite-userver-redis-tests-basic-chaos

- name: Run tests (postgresql)
run: |
cd build_debug/postgresql
ulimit -n 4096 && ctest -V -E testsuite-userver-postgresql-tests-basic-chaos