Skip to content

Commit

Permalink
Merge pull request #2182 from mavlink/v1.4-ci-python-3.11
Browse files Browse the repository at this point in the history
[v1.4] Downgrade Python to 3.11 for macOS CI builds
  • Loading branch information
julianoes authored Nov 19, 2023
2 parents 2b9ca69 + 2390d19 commit f8a4cc0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
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

0 comments on commit f8a4cc0

Please sign in to comment.