Detect rendering driver to use with macos runner

This commit is contained in:
Leroy Hopson 2024-02-24 16:17:31 +13:00
parent 60054e7ee0
commit b3ea3d4482
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
3 changed files with 13 additions and 3 deletions

View file

@ -3,3 +3,6 @@
# Name or path to your Godot executable
GODOT=godot
# Rendering driver
RENDERING_DRIVER=vulkan

View file

@ -271,9 +271,16 @@ jobs:
uses: lihop/setup-godot@v2
with:
version: "4.2.1-stable"
- name: Install molten-vk
- name: Macos setup
if: ${{ matrix.platform == 'macos' && matrix.test-type == 'rendering' }}
run: brew install molten-vk
run: |
# Some macos runners have metal which means we can use vulkan, others don't.
if system_profiler SPDisplaysDataType | grep -q "Metal"; then
echo RENDERING_DRIVER=vulkan >> .env
brew install molten-vk
else
echo RENDERING_DRIVER=opengl3 >> .env
fi
- name: Install just
uses: taiki-e/install-action@just
- name: Install dependencies

View file

@ -3,7 +3,7 @@
set dotenv-load
godot := `echo "${GODOT:-godot}"`
godot := `echo "${GODOT:-godot} --rendering-driver ${RENDERING_DRIVER:-vulkan}"`
build:
cd addons/godot_xterm/native && scons