Skip to content
Snippets Groups Projects
Commit d6f647bf authored by Cole2.Hansen@live.uwe.ac.uk's avatar Cole2.Hansen@live.uwe.ac.uk
Browse files

Update .gitlab-ci.yml file

parent 77cf266b
Branches master
No related tags found
No related merge requests found
image: ubuntu:latest # Use Ubuntu as the base
image: macos:latest # Use macOS runner image
stages:
- build
before_script:
- apt-get update
- apt-get install -y software-properties-common which
- add-apt-repository -y ppa:librazer/dev # Adds Raylib PPA
- apt-get update
- apt-get install -y build-essential raylib-dev libgl1-mesa-dev libx11-dev libxcursor-dev libxrandr-dev libxi-dev libxinerama-dev
- echo "Checking GCC version..."
- gcc --version
- echo "Checking include and library paths..."
- command -v gcc || echo "GCC not found!"
- ls -l /usr/local/include/raylib || echo "Raylib headers not found!"
- ls -l /usr/lib || echo "Library path not found!"
- echo "Running on macOS: $(sw_vers)" # Verify macOS version
- brew install raylib # Install Raylib using Homebrew
- echo "Include Path: $(brew --prefix)/include"
- echo "Library Path: $(brew --prefix)/lib"
- export C_INCLUDE_PATH="$(brew --prefix)/include:$C_INCLUDE_PATH"
- export LIBRARY_PATH="$(brew --prefix)/lib:$LIBRARY_PATH"
- export LD_LIBRARY_PATH="$(brew --prefix)/lib:$LD_LIBRARY_PATH"
- echo "GCC version: $(gcc --version)" # Verify GCC installation
build:
stage: build
script:
- echo "Compiling on Linux..."
- gcc main.c paddle.c ball.c brick.c -o brickbreaker -I/usr/include/raylib -L/usr/lib -lraylib -lm -lX11 -lGL -lpthread -ldl -lrt -lXinerama -lXcursor
- echo "Compiling with Raylib on macOS..."
- gcc main.c paddle.c ball.c brick.c -o brickbreaker \
-I$(brew --prefix)/include \
-L$(brew --prefix)/lib \
-lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo
artifacts:
paths:
- brickbreaker
expire_in: 1 day
default:
shell: bash # Forces Bash shell to avoid PowerShell issues
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment