Skip to content

feat ci: add basic macos support in gh CI #22

feat ci: add basic macos support in gh CI

feat ci: add basic macos support in gh CI #22

Workflow file for this run

name: CI
'on':
pull_request:
push:
branches:
- master
- develop
- feature/**
env:
UBSAN_OPTIONS: print_stacktrace=1
ASAN_OPTIONS: detect_odr_violation=2
jobs:
macos:
name: MacOS
runs-on: macos-latest
env:
CMAKE_FLAGS: >-
-DUSERVER_SANITIZE="ub addr"
-DCMAKE_BUILD_TYPE=Debug
-DUSERVER_NO_WERROR=OFF
-DUSERVER_NAMESPACE=userver_ns
-DUSERVER_NAMESPACE_BEGIN="namespace userver_ns {"
-DUSERVER_NAMESPACE_END="}"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# - name: Setup Cpp (C++ / C)
# uses: aminya/[email protected]
# with:
# compiler: llvm
- name: export SDKROOT
run: |
export SDKROOT="`xcrun --show-sdk-path`"
- name: Cache Homebrew Packages
id: cache-homebrew-packages
uses: actions/cache@v3
env:
cache-name: homebrew-packages
with:
path: $(brew --prefix)
key: |
macos-${{ env.cache-name }}-${{ hashFiles('.config/brew/Brewfile') }}
- name: Install packages
run: |
brew update
brew install $(cat scripts/docs/en/deps/macos.md)
set -x
brew --prefix
ls $(brew --prefix)/var/postgresql || :
env
ls /usr/local/opt/postgresql@15/bin || :
ls /opt/homebrew/bin || :
- name: Run cmake
run: |
mkdir build_debug
cd build_debug
cmake $CMAKE_FLAGS ..
- name: Compile
run: |
pwd
cd build_debug
make -j$(nproc) -k