mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 01:48:08 +01:00
finally compiled the real mlx
This commit is contained in:
parent
506386e190
commit
8f99d23431
3 changed files with 92 additions and 1 deletions
|
|
@ -1 +1,4 @@
|
||||||
# cub3d
|
# cub3d
|
||||||
|
|
||||||
|
## Probleme possible avec la MLX sur un pc perso
|
||||||
|
Réglable en faisant `make CC=clang` dans le dossier de la mlx
|
||||||
|
|
|
||||||
88
mlx/.github/workflows/ci.yml
vendored
Normal file
88
mlx/.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,88 @@
|
||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
env:
|
||||||
|
DISPLAY: ":99"
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest]
|
||||||
|
|
||||||
|
timeout-minutes: 20
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install mlx dependencies
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
if [ "$RUNNER_OS" == "Linux" ]; then
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install -y -qq gcc make xorg libxext-dev libbsd-dev
|
||||||
|
elif [ "$RUNNER_OS" == "macOS" ]; then
|
||||||
|
brew install xquartz
|
||||||
|
echo "/usr/X11/bin" >> $GITHUB_PATH
|
||||||
|
else
|
||||||
|
echo "$RUNNER_OS not supported"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
- name: Setup x11 headless testing environment
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
if [ "$RUNNER_OS" == "Linux" ]; then
|
||||||
|
sudo apt-get install xvfb xdotool valgrind
|
||||||
|
Xvfb $DISPLAY -screen 0 1280x1024x24 &
|
||||||
|
elif [ "$RUNNER_OS" == "macOS" ]; then
|
||||||
|
brew install xdotool
|
||||||
|
defaults write org.x.X11 enable_test_extensions -boolean true
|
||||||
|
sudo Xvfb $DISPLAY -screen 0 1280x1024x24 &
|
||||||
|
else
|
||||||
|
echo "$RUNNER_OS not supported"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
- name: Run ./configure
|
||||||
|
run: ./configure
|
||||||
|
|
||||||
|
- name: make check Linux
|
||||||
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
run: make -f Makefile.gen check
|
||||||
|
- name: make check MacOS
|
||||||
|
continue-on-error: true
|
||||||
|
if: matrix.os == 'macos-latest'
|
||||||
|
run: make -f Makefile.gen check
|
||||||
|
# Didn't find a way to simulate inputs on Macos. libxdo seem to no longer work on macos.
|
||||||
|
# It can be partially fixed writing proper unit-tests, thus avoiding the need of libxdo.
|
||||||
|
|
||||||
|
- name: Check leaks from binary "test/mlx-test"
|
||||||
|
run: |
|
||||||
|
cd test
|
||||||
|
if [ "$RUNNER_OS" == "Linux" ]; then
|
||||||
|
echo "Info: Still reachable doesn't matter. Valgrind will return success on thoses reports.
|
||||||
|
It is fine, we searching for lost pointers. Valgrind will return exit status 42 if any block is lost."
|
||||||
|
valgrind --leak-check=full --show-leak-kinds=definite,indirect,possible --errors-for-leak-kinds=definite,indirect,possible --error-exitcode=42 ./mlx-test > /dev/null &
|
||||||
|
PID=$!
|
||||||
|
sleep 30
|
||||||
|
xdotool search --name Title3 windowfocus key Escape
|
||||||
|
xdotool search --name Title2 windowfocus key Escape
|
||||||
|
wait $PID
|
||||||
|
elif [ "$RUNNER_OS" == "macOS" ]; then
|
||||||
|
MallocStackLoggingNoCompact=1
|
||||||
|
./mlx-test &
|
||||||
|
sleep 30
|
||||||
|
leaks mlx-test
|
||||||
|
pkill mlx-test
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Norminette, just for fun
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
pip3 install Norminette
|
||||||
|
norminette *.c *.h
|
||||||
|
norminette --version
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#include "../includes/libft.h"
|
#include "../includes/libft.h"
|
||||||
#include "../includes/mlx.h"
|
#include "../includes/mlx.h"
|
||||||
#include "../includes/filecheck.h"
|
//#include "../includes/filecheck.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue