Skip to content

cc userver: fix include order in utils/strong_typedef.hpp #4631

cc userver: fix include order in utils/strong_typedef.hpp

cc userver: fix include order in utils/strong_typedef.hpp #4631

Workflow file for this run

name: MacOS
'on':
pull_request:
push:
branches:
- master
- develop
- feature/**
env:
CCACHE_DIR: /Users/runner/Library/Caches/ccache
CCACHE_NOHASHDIR: true
CPM_SOURCE_CACHE: /Users/runner/Library/Caches/CPM
jobs:
macos:
strategy:
fail-fast: false
name: macos-latest (brew)
runs-on: macos-latest
env:
CMAKE_FLAGS: >-
-GNinja
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_CXX_STANDARD=20
-DUSERVER_NO_WERROR=1
-DUSERVER_BUILD_ALL_COMPONENTS=1
-DUSERVER_BUILD_SAMPLES=1
-DUSERVER_BUILD_TESTS=1
-DUSERVER_FEATURE_CRYPTOPP_BLAKE2=0
-DUSERVER_FEATURE_YDB=0
-DUSERVER_USE_LD=lld
-DUSERVER_FORCE_DOWNLOAD_RE2=1
-DUSERVER_FORCE_DOWNLOAD_ABSEIL=1
-DUSERVER_FORCE_DOWNLOAD_PROTOBUF=1
-DUSERVER_FORCE_DOWNLOAD_GRPC=1
steps:
- uses: actions/checkout@v7
- name: Restore cached directories
id: restore-cache
uses: actions/cache/restore@v6
with:
path: |
${{env.CCACHE_DIR}}
${{env.CPM_SOURCE_CACHE}}
key: 'macos-cache-dir ${{github.ref}} run-${{github.run_number}}'
restore-keys: |
macos-cache-dir ${{github.ref}}
macos-cache-dir
- name: Install brew packages
run: |
export SDKROOT="`xcrun --show-sdk-path`"
brew update
brew uninstall cmake 2>/dev/null || true # workaround for `Error: cmake was installed from the local/pinned tap`
brew install $(cat scripts/docs/en/deps/macos.md)
brew install clang-format
brew install lld
brew install python@3.12
brew install curl # keg-only; pre-installed on GitHub runner but not in clean envs
brew link postgresql@16 # postgresql is keg-only
brew link --force zlib # keg-only + need for static linkage
brew link --force icu4c # keg-only + need for static boost linkage
brew link --force curl # keg-only
brew link --force cyrus-sasl # keg-only
brew link --force openldap # keg-only
brew link --force sqlite # keg-only
brew remove --ignore-dependencies abseil 2>/dev/null || true # may already be absent
- name: Install test dependencies
run: |
brew trust --formula azure/bicep/bicep
brew trust --formula hashicorp/tap/packer
brew trust mongodb/brew
brew trust aws/tap
brew tap mongodb/brew
brew install clickhouse redis kafka mongodb-community rabbitmq
mkdir -p "$(brew --prefix)/etc/rabbitmq/conf.d"
echo 'deprecated_features.permit.transient_nonexcl_queues = true' > "$(brew --prefix)/etc/rabbitmq/conf.d/10-userver-ci.conf"
- name: Setup ccache
run: |
ccache -M 2.0GB
ccache -s -v
- name: Run cmake
run: |
cmake -S./ -B./build_debug -DUSERVER_PYTHON_PATH=$(brew --prefix)/bin/python3.12 $CMAKE_FLAGS
- name: Reconfigure cmake
run: |
cmake -S./ -B./build_debug -DUSERVER_PYTHON_PATH=$(brew --prefix)/bin/python3.12 $CMAKE_FLAGS
- name: Compile
run: |
cmake --build build_debug -j$(nproc) -- -k 1
- name: Save cached directories
uses: actions/cache/save@v6
with:
path: |
${{env.CCACHE_DIR}}
${{env.CPM_SOURCE_CACHE}}
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
- name: Show cache stats
run: |
du -h -d 1 ${{env.CCACHE_DIR}}
du -h -d 1 ${{env.CPM_SOURCE_CACHE}}
ccache -s -v
- name: Run tests
run: |-
cd build_debug
ulimit -n 4096
# gtest cases broken/flaky on macOS (filtered out individually)
broken_gtests=(
UUID.ParseFail
Transaction.Commit
Transaction.Rollback
Transaction.AutoRollback
Transaction.ActuallyTransactional
Transaction.InsertOne
Transaction.InsertMany
TransactionDeathTest.AccessAfterCommit
TransactionDeathTest.AccessAfterRollback
PostgreCluster.TransactionTimeouts
'*ViaChaosProxy'
HttpClient.HttpsWithCrl
HttpClient.HttpsWithNoClientCa
HttpClient.StatsOnTimeout
HttpClientProxy.HttpsTruncatedHeaders
DestinationStatistics.Ok
DestinationStatistics.Multiple
CurlFormTest.MultipartFileWithContentType
CurlFormTest.FilesWithContentType
CurlFormTest.FormMovable
WaitWake.WakeupTriggersPredicateRecheck
AsyncFlatCombiningQueue.StressAsync
Socket.UdpIpMreqIPv6
Socket.UdpIpMreqMultipleReceiversIPv6
Subprocess.EnvironmentVariablesScope
ThreadLocal.SafeThreadLocalWorks
HedgedRequest.Base
HedgedRequest.SuccessfulHedging
HedgedRequest.Timeout
'PeriodicTask.*'
)
# whole tests not run / failing on macOS
excluded_tests=(
testsuite-userver-core-tests-basic-chaos
testsuite-userver-core-tests-websocket
userver-mongo-dbtest
testsuite-userver-mongo
testsuite-userver-redis-tests-basic-chaos
testsuite-userver-postgresql-tests-basic-chaos
userver-sqlite-unittest
userver-testsuite-tests-chaos
userver-odbc-dbtest
testsuite-userver-odbc-tests-basic-chaos
)
export GTEST_FILTER="-$(IFS=:; printf '%s' "${broken_gtests[*]}")"
ctest --output-on-failure -E "$(IFS='|'; printf '%s' "${excluded_tests[*]}")"