Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
5478ac7
Add world editor, gamepad support, SDL3 bindings, and audio system
Mar 6, 2026
64319dd
Engine Core and Scene System
Mar 6, 2026
aab9834
2D and UI System
Mar 6, 2026
568adf7
Added UI Transpiler
Mar 6, 2026
653d525
Added OpenAL as suggestion and Audio system
Mar 6, 2026
41703c6
Added OpenAL as suggestion and Audio system
Mar 6, 2026
e2a8443
Add MP3 support via minimp3 FFI with pre-built cross-platform binaries
Mar 6, 2026
48b84d2
Fix macOS fullscreen phantom input events, FUICard border rendering, …
Mar 7, 2026
8b4dde2
Add PBR 3D rendering pipeline with cascaded shadow maps
Mar 7, 2026
70a86a9
Add 3D camera system with orbit, first-person, and third-person modes
Mar 7, 2026
f1f11c7
Add 3D collision system with box, sphere, capsule colliders and rayca…
Mar 7, 2026
b24107f
Add impulse-based 3D physics system with rigid body dynamics
Mar 7, 2026
7460356
Add SpotLightComponent with cone-shaped lighting support
Mar 7, 2026
4286952
Add point light cubemap shadow mapping
Mar 7, 2026
dfcd5e8
Add particle system with GPU-instanced billboard rendering
Mar 7, 2026
af0839b
Add skeletal animation system with bone hierarchy, keyframe interpola…
Mar 7, 2026
efa8d28
Add terrain system with heightmap mesh generation and texture splatting
Mar 7, 2026
5db4f68
Add post-processing stack with bloom, depth of field, and motion blur
Mar 7, 2026
05d68c8
Add behaviour tree and finite state machine AI systems
Mar 7, 2026
c0e4fea
Add JSON-based dialogue system with branching, conditions, and variab…
Mar 7, 2026
656b6fe
Add A* grid pathfinding and NavMesh triangle-graph pathfinding
Mar 7, 2026
94ef504
Fix all 176 PHPStan Level 8 errors across the codebase
Mar 7, 2026
7d4914b
Add comprehensive PHPBench performance benchmarks for engine systems
Mar 7, 2026
e8e7db8
Fix benchmark namespaces to VISU\Tests\Benchmark and rename GLConetxt…
Mar 7, 2026
527188c
Fix ShaderProgramUniformMat4Bench to use FloatBuffer instead of array
Mar 7, 2026
4f0561e
Fix rendering examples: shader duplicate main(), setParent API, Vec3 …
Mar 7, 2026
1d53274
Complete World Editor with WebSocket live-preview, UI Layout Editor, …
Mar 8, 2026
52ac9f5
Add automatic project setup when VISU is used as a Composer dependency
Mar 8, 2026
af629b0
Add visu build command for game distribution packaging
Mar 14, 2026
d87bd2a
Add build system tests and update CI workflow
Mar 14, 2026
85b4ce6
Fix PHPStan errors in BuildConfig file_get_contents
Mar 14, 2026
5f03ffe
Add missing PHP extensions to CI workflow
Mar 14, 2026
eb43cb7
Fix CI: remove :glfw from extensions, it was disabling other extensions
Mar 14, 2026
678b641
Fix CI: install versioned php-xml and php-curl packages
Mar 14, 2026
c90cde5
Add PHPStan ignore rules for FFI\CData properties and PHP 8.4 depreca…
Mar 14, 2026
40e0054
Merge pull request #1 from hmennen90/feature/world-editor-gamepad-sdl3
hmennen90 Mar 14, 2026
25da05f
Fix build-runtime: upgrade to PHP 8.3 and add --ignore-platform-reqs
Mar 14, 2026
6cd1a5b
Remove macOS x86_64 build target (macos-13 runner retired)
Mar 14, 2026
422ba8b
Use PHP 8.4 for static-php-cli, drop 8.3 support
Mar 14, 2026
32abcc6
Add spc doctor --auto-fix step before build
Mar 14, 2026
aadeeab
Add Linux GLFW library builder for static-php-cli
Mar 14, 2026
bef9d6b
Symlink X11 headers/libs into buildroot for musl toolchain
Mar 14, 2026
1371c83
Pass GITHUB_TOKEN to spc download to avoid API rate limits
Mar 14, 2026
94993b8
Patch GLFW extension for -lc++ on macOS, add --debug to builds
Mar 14, 2026
f0d2940
Rewrite build-runtime workflow with complete GLFW patches
Mar 14, 2026
369c475
Use static-php-cli fork with GLFW patches, remove inline hacks
Mar 14, 2026
d78ea05
Switch build-runtime to fork main branch
Mar 15, 2026
bf80344
Use Alpine Docker for Linux builds to avoid glibc/musl mismatch
Mar 15, 2026
6fddfd9
Fix Linux build: copy X11 libs instead of symlink (volume mounts brea…
Mar 15, 2026
bfb9ca3
Dump spc logs on Linux build failure for debugging
Mar 15, 2026
2a93cef
Add static X11 packages and build libXrandr.a from source in Alpine
Mar 15, 2026
8443869
Remove Windows build target (upstream zlib issue in static-php-cli)
Mar 15, 2026
9ffbf0d
Add semantic release workflow and multi-target build support
Mar 16, 2026
6e12f1f
feat: add semantic-release with automatic runtime binary publishing
Mar 16, 2026
231c42e
feat: re-enable Windows build target
Mar 16, 2026
7c5c554
fix: use inputs context instead of env in job names
Mar 16, 2026
6cdb430
feat: add Windows build support and replace Unix shell commands with …
Mar 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
242 changes: 242 additions & 0 deletions .github/workflows/build-runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
name: Build Runtime (micro.sfx)

on:
release:
types: [published]
workflow_dispatch:
inputs:
php_version:
description: 'PHP version'
required: true
default: '8.4'
type: choice
options:
- '8.4'
- '8.5'

env:
PHP_VERSION: ${{ inputs.php_version || '8.4' }}

jobs:
# ── macOS build (native) ──
build-macos:
name: micro.sfx / macos-arm64 / PHP ${{ inputs.php_version || '8.4' }}
runs-on: macos-14
steps:
- name: Checkout static-php-cli (fork)
uses: actions/checkout@v4
with:
repository: hmennen90/static-php-cli
ref: main

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: dom, curl, mbstring, xml, tokenizer
tools: composer

- name: Install dependencies
run: |
composer install --no-dev --no-interaction --ignore-platform-reqs
brew install cmake pkg-config

- name: Download sources
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
php bin/spc download \
--with-php=${{ env.PHP_VERSION }} \
--for-extensions=glfw,mbstring,zip,phar \
--prefer-pre-built

- name: Build micro.sfx
run: |
php bin/spc doctor --auto-fix
php bin/spc build glfw,mbstring,zip,phar --build-micro --debug

- name: Upload micro.sfx
uses: actions/upload-artifact@v4
with:
name: micro-macos-arm64
path: buildroot/bin/micro.sfx
retention-days: 90

# ── Linux builds (Alpine Docker for musl-compatible X11) ──
build-linux:
name: micro.sfx / linux-${{ matrix.arch }} / PHP ${{ inputs.php_version || '8.4' }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm

steps:
- name: Checkout static-php-cli (fork)
uses: actions/checkout@v4
with:
repository: hmennen90/static-php-cli
ref: main

- name: Build micro.sfx in Alpine container
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
docker build -t spc-glfw -f- . << 'DOCKERFILE'
FROM alpine:3.21

RUN apk update && apk upgrade -a && apk add --no-cache \
autoconf automake bash binutils bison build-base cmake curl \
file flex g++ gcc git jq libgcc libtool libstdc++ \
linux-headers m4 make pkgconfig re2c wget xz gettext-dev \
binutils-gold \
libx11-dev libx11-static libxrandr-dev libxinerama-dev libxcursor-dev \
libxi-dev libxi-static libxext-static libxcb-dev libxcb-static \
libxau-dev libxdmcp-dev mesa-dev \
&& cd /tmp \
&& wget -q https://xorg.freedesktop.org/releases/individual/lib/libXrandr-1.5.4.tar.xz \
&& tar xf libXrandr-1.5.4.tar.xz && cd libXrandr-1.5.4 \
&& ./configure --enable-static --disable-shared --prefix=/usr >/dev/null 2>&1 \
&& make -j$(nproc) >/dev/null 2>&1 && make install >/dev/null 2>&1 \
&& rm -rf /tmp/libXrandr*

RUN curl -#fSL https://dl.static-php.dev/static-php-cli/bulk/php-8.4.4-cli-linux-$(uname -m).tar.gz \
| tar -xz -C /usr/local/bin && chmod +x /usr/local/bin/php
RUN curl -#fSL https://getcomposer.org/download/latest-stable/composer.phar \
-o /usr/local/bin/composer && chmod +x /usr/local/bin/composer

WORKDIR /app
DOCKERFILE

docker run --rm \
-e GITHUB_TOKEN="${GITHUB_TOKEN}" \
-v "$(pwd)/config:/app/config" \
-v "$(pwd)/src:/app/src" \
-v "$(pwd)/bin:/app/bin" \
-v "$(pwd)/composer.json:/app/composer.json" \
-v "$(pwd)/composer.lock:/app/composer.lock" \
-v "$(pwd)/buildroot:/app/buildroot" \
-v "$(pwd)/source:/app/source" \
-v "$(pwd)/downloads:/app/downloads" \
-v "$(pwd)/pkgroot:/app/pkgroot" \
-v "$(pwd)/log:/app/log" \
spc-glfw bash -c '
composer install --no-dev --no-interaction --ignore-platform-reqs
bin/spc doctor --auto-fix

# Copy Alpine musl X11 headers/libs into buildroot (not symlink — volume mounts break symlinks)
mkdir -p buildroot/include buildroot/lib buildroot/lib/pkgconfig
for dir in X11 GL; do
[ -d "/usr/include/$dir" ] && cp -r "/usr/include/$dir" buildroot/include/
done
for lib in /usr/lib/libX11.a /usr/lib/libXrandr.a /usr/lib/libXinerama.a \
/usr/lib/libXcursor.a /usr/lib/libXi.a /usr/lib/libXext.a \
/usr/lib/libXfixes.a /usr/lib/libXrender.a /usr/lib/libxcb.a \
/usr/lib/libXau.a /usr/lib/libXdmcp.a; do
[ -f "$lib" ] && cp "$lib" buildroot/lib/
done
for pc in /usr/lib/pkgconfig/x11.pc /usr/lib/pkgconfig/xrandr.pc \
/usr/lib/pkgconfig/xinerama.pc /usr/lib/pkgconfig/xcursor.pc \
/usr/lib/pkgconfig/xi.pc /usr/lib/pkgconfig/xext.pc \
/usr/lib/pkgconfig/xfixes.pc /usr/lib/pkgconfig/xrender.pc \
/usr/lib/pkgconfig/xcb.pc /usr/lib/pkgconfig/xau.pc \
/usr/lib/pkgconfig/xdmcp.pc; do
[ -f "$pc" ] && cp "$pc" buildroot/lib/pkgconfig/
done

bin/spc download --with-php=${{ env.PHP_VERSION }} \
--for-extensions=glfw,mbstring,zip,phar --prefer-pre-built
bin/spc build glfw,mbstring,zip,phar --build-micro --debug || {
echo "=== spc.shell.log ===" && cat log/spc.shell.log 2>/dev/null | tail -100
echo "=== spc.output.log ===" && cat log/spc.output.log 2>/dev/null | tail -100
exit 1
}
'

- name: Upload micro.sfx
uses: actions/upload-artifact@v4
with:
name: micro-linux-${{ matrix.arch }}
path: buildroot/bin/micro.sfx
retention-days: 90

# ── Windows build ──
build-windows:
name: micro.sfx / windows-x86_64 / PHP ${{ inputs.php_version || '8.4' }}
runs-on: windows-latest
steps:
- name: Checkout static-php-cli (fork)
uses: actions/checkout@v4
with:
repository: hmennen90/static-php-cli
ref: main

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: dom, curl, mbstring, xml, tokenizer
tools: composer

- name: Install dependencies
run: composer install --no-dev --no-interaction --ignore-platform-reqs

- name: Download sources
shell: powershell
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
php bin/spc download `
--with-php=${{ env.PHP_VERSION }} `
--for-extensions=glfw,mbstring,zip,phar `
--prefer-pre-built

- name: Build micro.sfx
shell: powershell
run: |
php bin/spc doctor --auto-fix
php bin/spc build glfw,mbstring,zip,phar --build-micro --debug

- name: Upload micro.sfx
uses: actions/upload-artifact@v4
with:
name: micro-windows-x86_64
path: buildroot/bin/micro.sfx
retention-days: 90

# ── Upload binaries to release ──
upload-to-release:
name: Upload to Release
needs: [build-macos, build-linux, build-windows]
if: github.event_name == 'release'
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Prepare release files
run: |
mkdir release
for dir in artifacts/micro-*/; do
platform=$(basename "$dir")
cp "$dir/micro.sfx" "release/${platform}.sfx"
done
ls -lh release/

- name: Upload to existing release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
for file in release/*.sfx; do
echo "Uploading $(basename $file)..."
gh release upload "${{ github.event.release.tag_name }}" "$file" --repo "${{ github.repository }}" --clobber
done
132 changes: 84 additions & 48 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,93 @@
name: VISU CI
name: VISU CI

on:
push:
branches: [ '*' ]
branches: ['*']
pull_request:
branches: [ '*' ]
branches: ['*']

jobs:
ubuntu:

runs-on: ${{ matrix.operating-system }}
tests:
name: PHP ${{ matrix.php }} — Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['8.1', '8.2']
phpunit-versions: ['9.6']

php: ['8.3', '8.4', '8.5']

steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: :glfw
coverage: xdebug
tools: cs2pr, phpunit:${{ matrix.phpunit-versions }}

- name: Install dependenies
run: sudo apt-get update && sudo apt-get install -y php-dev build-essential cmake libglfw3-dev xvfb libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev gdb

- name: Build PHP-GLFW
run: >
git clone https://github.com/mario-deluna/php-glfw &&
cd php-glfw &&
sudo phpize &&
./configure --enable-glfw &&
make -j$(nproc) &&
sudo make install &&
cd ../ &&
grep -qxF 'extension=glfw.so' /etc/php/${{ matrix.php-versions }}/cli/php.ini ||
echo 'extension=glfw.so' >> /etc/php/${{ matrix.php-versions }}/cli/php.ini

- name: Run composer install
run: composer install

#- name: Install PHPUnit
# run: composer require "phpunit/phpunit"

- name: Run PHPUnit
run: xvfb-run --auto-servernum phpunit

- name: Run PHPStan
if: ${{ matrix.php-versions == '8.2' }}
run: php vendor/bin/phpstan analyse src --error-format=github -l8

- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, mbstring, xml, tokenizer
coverage: none
tools: phpunit:9.6

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
php${{ matrix.php }}-dev php${{ matrix.php }}-xml php${{ matrix.php }}-curl \
build-essential cmake \
libglfw3-dev xvfb \
libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev

- name: Build PHP-GLFW
run: |
git clone https://github.com/mario-deluna/php-glfw
cd php-glfw
sudo phpize
./configure --enable-glfw
make -j$(nproc)
sudo make install
cd ../
echo 'extension=glfw.so' | sudo tee -a $(php -r "echo php_ini_loaded_file();")

- name: Install Composer dependencies
run: composer install --no-interaction

- name: Run PHPUnit
run: xvfb-run --auto-servernum phpunit

static-analysis:
name: PHPStan (Level 8)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: dom, curl, mbstring, xml, tokenizer
coverage: none

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
php8.4-dev php8.4-xml php8.4-curl \
build-essential cmake \
libglfw3-dev \
libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev

- name: Build PHP-GLFW
run: |
git clone https://github.com/mario-deluna/php-glfw
cd php-glfw
sudo phpize
./configure --enable-glfw
make -j$(nproc)
sudo make install
cd ../
echo 'extension=glfw.so' | sudo tee -a $(php -r "echo php_ini_loaded_file();")

- name: Install Composer dependencies
run: composer install --no-interaction

- name: Run PHPStan
run: php vendor/bin/phpstan analyse src --error-format=github -l8
Loading