Skip to content

Commit 16cbe5c

Browse files
committed
Update native-build.yml
1 parent e6aa74d commit 16cbe5c

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/native-build.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ on:
3131
description: .NET version to install.
3232
type: string
3333
default: 8.0.x
34+
install_gtk:
35+
description: Install GTK and related GUI dependencies (macOS only).
36+
type: boolean
37+
default: false
3438
outputs:
3539
rid:
3640
description: Runtime identifier generated by the native build.
@@ -60,12 +64,19 @@ jobs:
6064
shell: bash
6165

6266
- name: Install dependencies (macOS)
63-
if: startsWith(inputs.runner, 'macos')
67+
if: startsWith(inputs.runner, 'macos') && inputs.install_gtk == true
6468
run: |
6569
brew update
6670
brew install gtk+3 ninja clang-format
6771
shell: bash
6872

73+
- name: Ensure Ninja (macOS)
74+
if: startsWith(inputs.runner, 'macos')
75+
run: |
76+
if ! command -v ninja >/dev/null 2>&1; then
77+
brew install ninja
78+
fi
79+
6980
- name: Install dependencies (Windows)
7081
if: startsWith(inputs.runner, 'windows')
7182
run: choco install ninja -y

0 commit comments

Comments
 (0)