diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 9229d5e5d767..6631e054f6e6 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -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 @@ -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`" @@ -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 redis kafka mongodb-community - brew upgrade + - name: Setup ccache + run: | + ccache -M 4.0GB + ccache -s - name: Run cmake run: | @@ -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|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 diff --git a/scripts/docs/en/deps/macos.md b/scripts/docs/en/deps/macos.md index 5a2a6b2b01da..df455ef19b24 100644 --- a/scripts/docs/en/deps/macos.md +++ b/scripts/docs/en/deps/macos.md @@ -20,7 +20,6 @@ yaml-cpp librdkafka rocksdb postgresql@16 -redis zlib c-ares coreutils