Skip to content

Commit

Permalink
Merge pull request vegastrike#975 from stephengtuggy/python-version-w…
Browse files Browse the repository at this point in the history
…rangling_0.9.x

Python version wrangling 0.9.x
  • Loading branch information
stephengtuggy authored Jan 12, 2025
2 parents 27ed843 + 208af77 commit 8efd6e6
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/Windows-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ jobs:
shell: bash

- name: install-cmake
uses: lukka/get-cmake@4931ab1fc1604964c055eb330edb3f6b26ba0cfa #v3.29.2
uses: lukka/get-cmake@acb35cf920333f4dc3fc4f424f1b30d5e7d561b4 #v3.31.4
with:
cmakeVersion: 3.29.2
cmakeVersion: 3.31.4
ninjaVersion: 1.11.1

# Restore vcpkg from the GitHub Action cache service. Note that packages are restored by vcpkg's binary caching
# when it is being run afterward by CMake.
- name: restore-vcpkg
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 #v4.0.2
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
# The first path is the location of vcpkg: it contains the vcpkg executable and data files, as long as the
# built package archives (aka binary cache) which are located by VCPKG_DEFAULT_BINARY_CACHE env var.
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/Windows-Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ jobs:
shell: bash

- name: install-cmake
uses: lukka/get-cmake@4931ab1fc1604964c055eb330edb3f6b26ba0cfa #v3.29.2
uses: lukka/get-cmake@acb35cf920333f4dc3fc4f424f1b30d5e7d561b4 #v3.31.4
with:
cmakeVersion: 3.29.2
cmakeVersion: 3.31.4
ninjaVersion: 1.11.1

# Restore vcpkg from the GitHub Action cache service. Note that packages are restored by vcpkg's binary caching
# when it is being run afterward by CMake.
- name: restore-vcpkg
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 #v4.0.2
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 #v4.2.0
with:
# The first path is the location of vcpkg: it contains the vcpkg executable and data files, as long as the
# built package archives (aka binary cache) which are located by VCPKG_DEFAULT_BINARY_CACHE env var.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fortify-on-demand-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
scan:
# The type of runner that the job will run on
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-actions-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [ pull_request ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
continue-on-error: ${{ matrix.allow_failure }}

defaults:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-actions-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
build:
name: Build
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
continue-on-error: true

defaults:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/macos-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
continue-on-error: true
continue-on-error: false

defaults:
run:
Expand Down Expand Up @@ -41,6 +41,8 @@ jobs:
ENABLE_PIE:
- 'ON'
#- 'OFF'
build-type:
- RelWithDebInfo

steps:

Expand Down Expand Up @@ -94,7 +96,7 @@ jobs:
env:
MY_OS_NAME: macos
COMPILER: ${{ matrix.compiler }}
FLAGS: "-DCMAKE_FIND_FRAMEWORK=LAST -DENABLE_PIE=${{ matrix.ENABLE_PIE }} -DPython3_ROOT_DIR=${{ matrix.vega-py-setup.outputs.python-path }}"
FLAGS: "-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DCMAKE_FIND_FRAMEWORK=LAST -DENABLE_PIE=${{ matrix.ENABLE_PIE }} -DPython3_ROOT_DIR=${{ matrix.vega-py-setup.outputs.python-path }} -DPythonInstalledVia=Homebrew"
OPENALDIR: "$(brew --prefix)/opt/openal-soft"
Python3_ROOT_DIR: ${{ matrix.vega-py-setup.outputs.python-path }}
Python_ROOT_DIR: ${{ matrix.vega-py-setup.outputs.python-path }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/macos-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
continue-on-error: true

defaults:
run:
Expand Down Expand Up @@ -42,6 +43,8 @@ jobs:
ENABLE_PIE:
- 'ON'
#- 'OFF'
build-type:
- RelWithDebInfo

steps:

Expand Down Expand Up @@ -100,7 +103,7 @@ jobs:
env:
MY_OS_NAME: macos
COMPILER: ${{ matrix.compiler }}
FLAGS: "-DCMAKE_FIND_FRAMEWORK=LAST -DENABLE_PIE=${{ matrix.ENABLE_PIE }} -DPython3_ROOT_DIR=${{ matrix.vega-py-setup.outputs.python-path }}"
FLAGS: "-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DCMAKE_FIND_FRAMEWORK=LAST -DENABLE_PIE=${{ matrix.ENABLE_PIE }} -DPython3_ROOT_DIR=${{ matrix.vega-py-setup.outputs.python-path }} -DPythonInstalledVia=Homebrew"
OPENALDIR: "$(brew --prefix)/opt/openal-soft"
Python3_ROOT_DIR: ${{ matrix.vega-py-setup.outputs.python-path }}
Python_ROOT_DIR: ${{ matrix.vega-py-setup.outputs.python-path }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecards-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions: read-all
jobs:
analysis:
name: Scorecards analysis
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
Expand Down
11 changes: 10 additions & 1 deletion engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,16 @@ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${Vega_Strike_SOURCE_DIR})
# so that we can handle the special cases for Xenial and stretch
FIND_PACKAGE(LinuxDistro REQUIRED)

FIND_PACKAGE(Python3 REQUIRED COMPONENTS Development Interpreter)
SET(PythonInstalledVia "" CACHE STRING "How Python was installed, such as via Homebrew or MacPorts")

IF (PythonInstalledVia STREQUAL "Homebrew")
FIND_PACKAGE(Python3 3.13.1 EXACT REQUIRED COMPONENTS Development Interpreter)
ELSEIF (PythonInstalledVia STREQUAL "MacPorts")
FIND_PACKAGE(Python3 3.12.8 EXACT REQUIRED COMPONENTS Development Interpreter)
ELSE ()
FIND_PACKAGE(Python3 3.6...<3.14 REQUIRED COMPONENTS Development Interpreter)
ENDIF ()

MESSAGE(STATUS "Python library : ${Python3_LIBRARIES} (${Python3_VERSION})")
MESSAGE(STATUS "Python include dir : ${Python3_INCLUDE_DIRS}")
IF (Python3_FOUND)
Expand Down
6 changes: 4 additions & 2 deletions engine/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@
},
"cacheVariables": {
"CMAKE_PREFIX_PATH": "/usr/local",
"CMAKE_FIND_FRAMEWORK": "LAST"
"CMAKE_FIND_FRAMEWORK": "LAST",
"PythonInstalledVia": "Homebrew"
}
},
{
Expand Down Expand Up @@ -382,7 +383,8 @@
"cacheVariables": {
"CMAKE_PREFIX_PATH": "/opt/local",
"Boost_INCLUDE_DIR": "/opt/local/libexec/boost/1.81/include",
"CMAKE_FIND_FRAMEWORK": "LAST"
"CMAKE_FIND_FRAMEWORK": "LAST",
"PythonInstalledVia": "MacPorts"
}
},
{
Expand Down

0 comments on commit 8efd6e6

Please sign in to comment.