Skip to content

feat CI: consistent names and cache system for all OS, use gold for g++ #792

feat CI: consistent names and cache system for all OS, use gold for g++

feat CI: consistent names and cache system for all OS, use gold for g++ #792

Workflow file for this run

name: CI
'on':
pull_request:
push:
branches:
- master
- develop
- feature/**
jobs:
macos:
name: MacOS (build only)
runs-on: macos-latest
env:
CPM_SOURCE_CACHE: '~/Library/Caches/CPM'
CMAKE_FLAGS: >-
-GNinja
-DCMAKE_BUILD_TYPE=Debug
-DUSERVER_NO_WERROR=1
-DUSERVER_BUILD_ALL_COMPONENTS=1
-DUSERVER_BUILD_SAMPLES=1
-DUSERVER_BUILD_TESTS=1
-DUSERVER_FEATURE_REDIS_HI_MALLOC=1
-DUSERVER_FEATURE_CRYPTOPP_BLAKE2=0
-DUSERVER_FEATURE_MONGODB=1
-DUSERVER_FEATURE_CLICKHOUSE=1
-DUSERVER_USE_LD=lld
-DUSERVER_FORCE_DOWNLOAD_ABSEIL=1
-DUSERVER_FORCE_DOWNLOAD_PROTOBUF=1
-DUSERVER_FORCE_DOWNLOAD_GRPC=1
steps:
- uses: actions/checkout@v4
- name: Reuse cached directories
uses: actions/cache@v4
with:
path: |
~/Library/Caches/ccache
~/Library/Caches/CPM
key: 'cmake-cache-dir ${{github.ref}} run-${{github.run_number}}'
restore-keys: |
cmake-cache-dir ${{github.ref}} run-
cmake-cache-dir
- name: Install brew packages
run: |
export SDKROOT="`xcrun --show-sdk-path`"
brew update
brew install $(cat scripts/docs/en/deps/macos.md)
brew install clang-format
brew install [email protected]
brew install lld
brew link postgresql@16
- name: Setup ccache
run: |
ccache -M 4.0GB
ccache -s
- name: Run cmake
run: |
cmake -S./ -B./build_debug -DUSERVER_PYTHON_PATH=$(brew --prefix)/bin/python3.11 $CMAKE_FLAGS
- name: Compile
run: |
cmake --build build_debug -j$(nproc) -- -k 1