Skip to content

Commit

Permalink
fix CI: use Python 3.11 on macos builds
Browse files Browse the repository at this point in the history
------------------------
Note: by creating a PR or an issue you automatically agree to the CLA. See [CONTRIBUTING.md](https://github.com/userver-framework/userver/blob/develop/CONTRIBUTING.md). Feel free to remove this note, the agreement holds.

Tests: протестировано CI

Pull Request resolved: #765
commit_hash:03bf9e22e4070e2e0f592dc388baf1a05ac60f2c
  • Loading branch information
fdr400 committed Nov 14, 2024
1 parent 1bfd31e commit 043a570
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci-conan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- os: ubuntu-22.04
conanflags: ''
- os: macos-latest
conanflags: ''
conanflags: '-o python_path=python3.11'

steps:
- name: Checkout
Expand All @@ -38,8 +38,10 @@ jobs:
- name: Install MacOS packages
if: matrix.os == 'macos-latest'
run: |
brew update
brew install postgresql
brew install libiconv # https://stackoverflow.com/questions/57734434/libiconv-or-iconv-undefined-symbol-on-mac-osx
brew install [email protected]
- name: Install common packages
run: |
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@ name: CI
- develop
- feature/**

env:
UBSAN_OPTIONS: print_stacktrace=1
ASAN_OPTIONS: detect_odr_violation=2

jobs:
macos:
name: MacOS (build only)
runs-on: macos-latest
env:
CMAKE_FLAGS: >-
-DUSERVER_SANITIZE="ub addr"
-GNinja
-DCMAKE_BUILD_TYPE=Debug
-DUSERVER_NO_WERROR=OFF
-DUSERVER_FEATURE_REDIS_HI_MALLOC=1
Expand All @@ -41,20 +37,17 @@ jobs:
- name: Install brew packages
run: |
export SDKROOT="`xcrun --show-sdk-path`"
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
brew update
brew install $(cat scripts/docs/en/deps/macos.md)
brew install clang-format
brew install [email protected]
brew link postgresql@16
brew upgrade
- name: Run cmake
run: |
mkdir build_debug
cd build_debug
cmake $CMAKE_FLAGS ..
cmake -S./ -B./build_debug -DUSERVER_PYTHON_PATH=$(brew --prefix)/bin/python3.11 $CMAKE_FLAGS
- name: Compile
run: |
cd build_debug
make -j$(nproc) -k
cmake --build build_debug -j$(nproc) -- -k 1
3 changes: 3 additions & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class UserverConan(ConanFile):
'namespace': ['ANY'],
'namespace_begin': ['ANY'],
'namespace_end': ['ANY'],
'python_path': ['ANY'],
}

default_options = {
Expand All @@ -62,6 +63,7 @@ class UserverConan(ConanFile):
'namespace': 'userver',
'namespace_begin': 'namespace userver {',
'namespace_end': '}',
'python_path': 'python3',
'mongo-c-driver/*:with_sasl': 'cyrus',
'grpc/*:php_plugin': False,
'grpc/*:node_plugin': False,
Expand Down Expand Up @@ -194,6 +196,7 @@ def generate(self):
self.options.namespace_begin
)
tool_ch.variables['USERVER_NAMESPACE_END'] = self.options.namespace_end
tool_ch.variables['USERVER_PYTHON_PATH'] = self.options.python_path

tool_ch.variables['USERVER_LTO'] = self.options.lto
tool_ch.variables['USERVER_FEATURE_JEMALLOC'] = (
Expand Down

0 comments on commit 043a570

Please sign in to comment.