Skip to content

Commit 36166cb

Browse files
committed
feat: enhance build workflow to support multiple OS environments
1 parent 402c1f1 commit 36166cb

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,21 @@ on:
99

1010
jobs:
1111
build-and-test:
12-
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, macos-latest, windows-latest]
15+
fail-fast: false
16+
17+
runs-on: ${{ matrix.os }}
1318

1419
steps:
1520
- name: Checkout code
1621
uses: actions/checkout@v4
1722
with:
1823
submodules: recursive
1924

20-
- name: Install dependencies
25+
- name: Install dependencies (Linux)
26+
if: runner.os == 'Linux'
2127
run: |
2228
sudo apt-get update
2329
sudo apt-get install -y \
@@ -33,14 +39,23 @@ jobs:
3339
libx11-dev \
3440
libxcomposite-dev \
3541
libxcursor-dev \
36-
libxcursor-dev \
3742
libxext-dev \
3843
libxinerama-dev \
3944
libxrandr-dev \
4045
libxrender-dev \
4146
libglu1-mesa-dev \
4247
mesa-common-dev
4348
49+
- name: Install dependencies (macOS)
50+
if: runner.os == 'macOS'
51+
run: |
52+
brew install cmake ninja
53+
54+
- name: Install dependencies (Windows)
55+
if: runner.os == 'Windows'
56+
run: |
57+
choco install cmake ninja -y
58+
4459
- name: Configure CMake
4560
run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
4661

0 commit comments

Comments
 (0)