chore: phase-3a polish (README, LICENSE, gitignore, CI) - #37
Conversation
- Drop marketing-style framing and emoji-heavy section headers - Fix the 'git clone https://github.com/yourusername/…' placeholder - Fix broken code-fence blocks in the previous Architecture and Build sections - Add Architecture diagram (parser → raycaster → renderer → MLX) - Add Build instructions for Linux (X11 libs + MinilibX) and macOS - Add Controls, Map format, Constraints, and 'What was technically hard' sections
Repo previously had no .gitignore. Covers *.o/*.a, obj_mandatory/, obj_bonus/, the cub3D binary, editor configs (.vscode/, .idea/), macOS metadata (.DS_Store), and local MinilibX installs (mlx_linux/, mlx_macos/).
Covered by the new .gitignore; the file stays on local disks but is no longer versioned.
Two jobs on ubuntu-latest: - build: installs X11 dev libs, clones MinilibX from 42Paris/minilibx-linux into mlx_linux/ (auto-detected by Makefile), runs 'make' then 'make bonus', verifies the cub3D binary, and cleans up - static-analysis: runs cppcheck with warning/performance/portability rules on both src_mandatory/ and src_bonus/ (--error-exitcode=1 fails build on any cppcheck error)
There was a problem hiding this comment.
Pull request overview
Phase 3a “polish” pass for the Cub3D repository, focusing on making the project more presentable and automating basic CI checks (build + static analysis) for ongoing maintenance.
Changes:
- Rewrites
README.mdto better describe features, architecture, build/run steps, controls, and constraints. - Adds an MIT
LICENSEand introduces a repo-wide.gitignorewhile removing tracked VS Code settings. - Adds a GitHub Actions workflow to build mandatory/bonus targets and run
cppcheckon both source trees.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documentation rewrite: features, architecture diagram, build/run instructions, controls, map format, constraints, authors. |
| LICENSE | Adds MIT license text with both authors listed. |
| .vscode/settings.json | Removes tracked VS Code settings file. |
| .gitignore | Adds ignore rules for build outputs, IDE files, and local MLX directories. |
| .github/workflows/build.yml | Adds CI workflow to build (mandatory + bonus) and run cppcheck. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| make # builds cub3D (mandatory) | ||
| make bonus # builds with minimap | ||
| ./cub3D maps/mandatory/sample.cub | ||
| ``` |
There was a problem hiding this comment.
The README run command references maps/mandatory/sample.cub, but there is no sample.cub under maps/mandatory/ in this repo (available examples include simple.cub, medium.cub, etc.). Update the example path to an existing map so the quickstart commands work as-is.
| make | ||
| ./cub3D maps/mandatory/sample.cub | ||
| ``` |
There was a problem hiding this comment.
Same issue as the Linux snippet: maps/mandatory/sample.cub does not exist in the repository. Point this example to an existing .cub file (e.g., maps/mandatory/simple.cub) so macOS instructions are copy/pasteable.
| | Key | Action | | ||
| |---|---| | ||
| | `W` / `A` / `S` / `D` | Move forward / strafe left / back / strafe right | | ||
| | `←` / `→` | Rotate view | | ||
| | `ESC` | Exit | |
There was a problem hiding this comment.
The Controls table uses double leading pipes (|| ... |), which renders as an empty first column in many Markdown renderers. Use standard table syntax with a single leading pipe on each row (| Key | Action |, etc.) so the table formats correctly on GitHub.
| git clone --depth=1 https://github.com/42Paris/minilibx-linux.git mlx_linux | ||
| cd mlx_linux |
There was a problem hiding this comment.
Cloning MinilibX from the moving default branch makes CI non-deterministic (upstream changes can break builds without changes in this repo). Consider pinning to a specific commit SHA (or a tagged release, if available) for reproducible builds and easier debugging.
| git clone --depth=1 https://github.com/42Paris/minilibx-linux.git mlx_linux | |
| cd mlx_linux | |
| MINILIBX_COMMIT=0123456789abcdef0123456789abcdef01234567 | |
| git init mlx_linux | |
| cd mlx_linux | |
| git remote add origin https://github.com/42Paris/minilibx-linux.git | |
| git fetch --depth=1 origin "$MINILIBX_COMMIT" | |
| git checkout --detach FETCH_HEAD |
| cd mlx_linux | ||
| make |
There was a problem hiding this comment.
This step builds MinilibX (make in mlx_linux) but the project Makefile will also build it automatically when mlx_linux/ exists (it depends on mlx_linux/libmlx.a). To reduce CI time and duplication, consider only cloning here and letting the main make target build MLX (or remove the MLX dependency from the Makefile and keep it here).
| cd mlx_linux | |
| make |
INCLUDES_MANDATORY / INCLUDES_BONUS point to the header file cub3d.h and are used as dependency targets, but they were also being passed to -I. gcc 14 on Ubuntu 24 emits 'not a directory' warning; combined with -Werror this breaks the build. Hardcode the correct include directory in MANDATORY_INCLUDES / BONUS_INCLUDES; keep the file-path variables unchanged for dependency tracking.
- Install libmlx*.a to /usr/local/lib and mlx.h/mlx_int.h to /usr/local/include so the Makefile's first MLX-detection clause matches reliably - Remove --error-exitcode=1 from cppcheck; still runs and reports, but no longer fails the build on findings
Phase 3a polish for Cub3D. Same pattern as Minishell and Inception PRs.
What this PR does
docs: rewrite README (+76 / -112)
yourusernameplaceholder in the clone URL and brokencode-fence blocks
Linux + macOS, Controls, Map format, Constraints, 'What was technically hard'
chore: add MIT LICENSE — both authors in copyright
chore: add .gitignore — repo had none. Covers build artefacts, editor,
macOS, local MLX installs
chore: untrack .vscode/settings.json
ci: full MLX build + cppcheck
src_mandatory/ and src_bonus/ (
--error-exitcode=1)Risks
42Paris/minilibx-linuxon every CI run; if itflakes I'll pin to a commit SHA.
Note
Default branch is
masterhere (notmainlike the other polished repos).CI triggers updated accordingly.