Add headless mode and CI workflows (Linux, Emscripten, Windows)#1
Add headless mode and CI workflows (Linux, Emscripten, Windows)#1TheRainbowPhoenix wants to merge 14 commits intomainfrom
Conversation
… Windows - Added `headless/main.cc` implementing a command-line interface for the emulator, capable of running programs and recording video (via FFmpeg). - Updated `CMakeLists.txt` to include `mq-headless` target. - Added `.github/workflows/linux.yml` for building GUI and Headless on Linux. - Added `.github/workflows/emscripten.yml` for building WebAssembly version. - Added `.github/workflows/windows.yml` for building Windows version using MinGW. - Configured dependencies (Azur, SDL2, FFmpeg, etc.) in workflows. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…lows - Updated `emscripten.yml` to use `mymindstorm/setup-emsdk@v14`. - Updated all workflows (`linux.yml`, `windows.yml`, `emscripten.yml`) to clone `Azur` recursively, as it has required submodules (likely `Azur3rdParty`). Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Updated `linux.yml`, `windows.yml`, and `emscripten.yml` to explicitly configure, build, and install the `3rdparty` subdirectory of Azur before building Azur itself. - This ensures that `Azur3rdPartyConfig.cmake` is available when Azur is configured, resolving the `find_package(Azur3rdParty)` error. - Maintained `recursive` clone to fetch 3rdparty dependencies. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Removed `azur_repo` from git index which was accidentally added as a submodule during debugging. - This fixes the "No url found for submodule path 'azur_repo' in .gitmodules" CI error. - The CI workflows remain unchanged (building 3rdparty separately), which is the correct fix for the build issues. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- This fixes compilation errors in `mq-headless` (especially on Emscripten) where `azur/config.h` was missing. - `mq` depends on `Azur` headers (via `mq/config.h`), so linking `Azur::Azur` propagates the necessary include directories. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Linux: Install `nasm` for FFmpeg build. - Windows: Patch Azur CMake files to remove `glx` requirement (not present on MinGW). - Emscripten: Patch `libnum` to workaround operator overload conflicts with ImGui. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Linux: Added `void mq_machine_setBreakJumpBufferAux(mqMachine *mach);` to `include/mq/machine.h` to fix undefined reference link error in C++ builds. - Windows: Patched Azur CMake files to use `opengl32` and avoid `glx` via `sed` in workflow. - Emscripten: Patched `libnum` to rename conflicting operator overloads via `sed` in workflow. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Windows: Added `nasm` to `windows.yml` to fix FFmpeg build failure. - Emscripten: Disabled LTO in `CMakeLists.txt` to avoid linker errors with system libraries. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Added `make` to `msys2` installation list in `windows.yml`. - This is required by the `x264` build script used by `Azur/3rdparty`. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Windows: Patch `3rdparty/FindAzur3rdParty.cmake` to remove `glx` requirement, resolving the "Package 'glx' not found" error. - Web: Added `web/index.html` as a demo page for running the Emscripten build. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Windows: Patch `FindAzur3rdParty.cmake` in `windows.yml` to remove `glx` requirement, resolving configuration error. - Linux: Add step to download `GravityDuck.g1a` (via curl) and run `mq-headless` for 3600 frames with video recording, uploading the result as an artifact. - Linux: Install `nasm` for `x264` build.
- Updated `linux.yml` to download `GravityDuck.g1a` and run `mq-headless` with video recording enabled. - Uploads the recorded video and log as artifacts. - Ensures `nasm` is installed (already added in previous iterations).
- Updated `gui/ffmpeg.cc` to look for `libavutil.so.58`, `libavformat.so.60`, and `libavcodec.so.60`, which match the versions on Ubuntu 24.04 (FFmpeg 6.1). - Added fallback to unversioned `.so` files. - This fixes the "cannot open shared object file" error in the Linux CI runtime test.
- Replaced `GravityDuck.g1a` download (which was failing/returning HTML) with `lines.g3a` from the Azur repository. - This ensures the emulator receives a valid binary, allowing video recording to produce a non-empty output.
This PR introduces a headless mode for the
mqemulator, designed for CI environments. It allows running.g1a/.g3aprograms without a GUI and recording video output using FFmpeg.Additionally, it adds GitHub Actions workflows to build the project on Linux, Windows (MinGW), and Emscripten (WebAssembly).
Dependencies like
Azurare automatically cloned and built within the CI environment.PR created automatically by Jules for task 13272264843776509368 started by @TheRainbowPhoenix