Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1.4] Downgrade Python to 3.11 for macOS CI builds #2182

Merged
merged 3 commits into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,11 @@ jobs:
- name: macOS-framework
build-framework: ON
steps:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: 'x64'
- uses: actions/checkout@v4
with:
submodules: recursive
Expand Down Expand Up @@ -540,6 +545,11 @@ jobs:
platform: SIMULATOR64
sdk: iphonesimulator
steps:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: 'x64'
- uses: actions/checkout@v4
with:
submodules: recursive
Expand Down
13 changes: 11 additions & 2 deletions third_party/mavlink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,18 @@ list(APPEND CMAKE_ARGS
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
)

# Without this GitHub actions picks the wrong python3 executable.
if (POLICY CMP0094)
cmake_policy(SET CMP0094 NEW) # FindPython should return the first matching Python
endif ()

# Needed to find the right Python on macOS
if (NOT DEFINED Python_FIND_FRAMEWORK)
set(Python_FIND_FRAMEWORK "LAST")
endif()

# Needed to find the right Python on Windows
set(Python3_FIND_REGISTRY "NEVER")
set(Python3_FIND_FRAMEWORK "NEVER")

find_package(Python3 COMPONENTS Interpreter REQUIRED)

ExternalProject_add(
Expand Down