From 5912aa5c12a4b478dd374bc8704ab425ca914e04 Mon Sep 17 00:00:00 2001 From: 0verLighT Date: Fri, 9 Jan 2026 21:08:42 +0100 Subject: [PATCH] feat(ci): add github actions for meson.build on macOS and Ubuntu --- .github/workflows/linux_meson_x86.yml | 38 +++++++++++++++++++++++++++ .github/workflows/macos_meson_arm.yml | 36 +++++++++++++++++++++++++ .github/workflows/macos_meson_x86.yml | 36 +++++++++++++++++++++++++ meson.build | 4 ++- 4 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/linux_meson_x86.yml create mode 100644 .github/workflows/macos_meson_arm.yml create mode 100644 .github/workflows/macos_meson_x86.yml diff --git a/.github/workflows/linux_meson_x86.yml b/.github/workflows/linux_meson_x86.yml new file mode 100644 index 0000000..aa35d16 --- /dev/null +++ b/.github/workflows/linux_meson_x86.yml @@ -0,0 +1,38 @@ +name: linux_meson_x86 + +on: + repository_dispatch: + types: [create-pull-request] + pull_request: + push: + paths-ignore: + - '.gitignore' + - 'LICENSE' + - 'README.md' +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-24.04] + arch: [x86_64] + runs-on: ${{ matrix.os }} + if: "!contains(github.event.head_commit.message, 'ci skip')" + steps: + - name: Checkout repository + uses: actions/checkout@v6 + - uses: NcStudios/VulkanCI@v1.2 + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get -y install mesa-common-dev clang libsdl2-2.0-0 libsdl2-dev build-essential libvulkan-dev + - name: Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install Meson with pip + run: sudo pip3 install meson + - name: Build with meson + run: | + meson build --prefix=$PWD/ --bindir='' --libdir='' + ninja install -C build \ No newline at end of file diff --git a/.github/workflows/macos_meson_arm.yml b/.github/workflows/macos_meson_arm.yml new file mode 100644 index 0000000..0fabe40 --- /dev/null +++ b/.github/workflows/macos_meson_arm.yml @@ -0,0 +1,36 @@ +name: macOS_meson_arm + +on: + repository_dispatch: + types: [create-pull-request] + pull_request: + push: + paths-ignore: + - '.gitignore' + - 'LICENSE' + - 'README.md' +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [macOS-latest] + arch: [arm] + runs-on: ${{ matrix.os }} + if: "!contains(github.event.head_commit.message, 'ci skip')" + steps: + - name: Checkout repository + uses: actions/checkout@v6 + - name: Install system dependencies + run: | + brew install SDL2 + - name: Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install Meson with pip + run: sudo pip3 install meson + - name: Build with meson + run: | + meson build --prefix=$PWD/ --bindir='' --libdir='' + ninja install -C build \ No newline at end of file diff --git a/.github/workflows/macos_meson_x86.yml b/.github/workflows/macos_meson_x86.yml new file mode 100644 index 0000000..a90a9ca --- /dev/null +++ b/.github/workflows/macos_meson_x86.yml @@ -0,0 +1,36 @@ +name: macOS_meson_x86 + +on: + repository_dispatch: + types: [create-pull-request] + pull_request: + push: + paths-ignore: + - '.gitignore' + - 'LICENSE' + - 'README.md' +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [macOS-latest] + arch: [x86_64] + runs-on: ${{ matrix.os }} + if: "!contains(github.event.head_commit.message, 'ci skip')" + steps: + - name: Checkout repository + uses: actions/checkout@v6 + - name: Install system dependencies + run: | + brew install SDL2 + - name: Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install Meson with pip + run: sudo pip3 install meson + - name: Build with meson + run: | + meson build --prefix=$PWD/ --bindir='' --libdir='' + ninja install -C build \ No newline at end of file diff --git a/meson.build b/meson.build index d1180d9..a8e6aa7 100644 --- a/meson.build +++ b/meson.build @@ -97,6 +97,8 @@ libmlx_dep = declare_dependency( dependencies : deps, link_with : libmlx) +meson.override_dependency('mlx', libmlx_dep) + # PKG CONFIG GENERATION pkg_mod = import('pkgconfig') @@ -106,4 +108,4 @@ pkg_mod.generate( description : 'MacroLibX Library', version : meson.project_version(), subdirs : ['.'], -) \ No newline at end of file +)