From d6f647bf188921eb92ad9e05a1f9764a7aa32485 Mon Sep 17 00:00:00 2001 From: "Cole2.Hansen@live.uwe.ac.uk" <cole2.hansen@live.uwe.ac.uk> Date: Wed, 12 Mar 2025 15:02:50 +0000 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c92f6a7..e0ea1e8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,30 +1,27 @@ -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 -- GitLab