ci(windows_meson): test ci setup meson for windows

chore: add folder subprojects for download sdl2 if it's not present in pkgconfig
Signed-off-by: 0verLighT <alexandre@0verlight.com>
This commit is contained in:
0verLighT
2026-01-27 19:47:30 +01:00
parent 26ccd5eeee
commit 28142f764f
3 changed files with 58 additions and 0 deletions

41
.github/workflows/windows_meson.yml vendored git.filemode.normal_file
View File

@@ -0,0 +1,41 @@
name : Windows (Meson)
on:
repository_dispatch:
types: [create-pull-request]
pull_request:
push:
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README.md'
jobs:
build:
if: "!contains(github.event.head_commit.message, 'ci skip')"
runs-on: windows-latest
strategy:
matrix:
platform: ['x64', 'x86']
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
# Install a 32-bit Python so building related stuff work.
- name: Setup x86 Python
if: matrix.platform == 'x86'
uses: actions/setup-python@v6
with:
architecture: 'x86'
python-version: '3.12'
- name: Install Meson & Ninja
run: |
python -m pip install meson ninja
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.platform}}
- name: Compile mlx
run: |
meson setup builddir
meson compile -C builddir

2
.gitignore vendored
View File

@@ -23,3 +23,5 @@
objs/ objs/
build/ build/
example/Test example/Test
subprojects/*/
subprojects/.wraplock

15
subprojects/sdl2.wrap git.filemode.normal_file
View File

@@ -0,0 +1,15 @@
[wrap-file]
directory = SDL2-2.32.8
source_url = https://github.com/libsdl-org/SDL/releases/download/release-2.32.8/SDL2-2.32.8.tar.gz
source_filename = SDL2-2.32.8.tar.gz
source_hash = 0ca83e9c9b31e18288c7ec811108e58bac1f1bb5ec6577ad386830eac51c787e
patch_filename = sdl2_2.32.8-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/sdl2_2.32.8-1/get_patch
patch_hash = 5df17ea39ca418826db20e96bd821fa52b5718dac64b6225119fb6588c2744f0
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sdl2_2.32.8-1/SDL2-2.32.8.tar.gz
wrapdb_version = 2.32.8-1
[provide]
sdl2 = sdl2_dep
sdl2main = sdl2main_dep
sdl2_test = sdl2_test_dep