From 18f40336351c78a81c3d720c49e5f94e2efa12c9 Mon Sep 17 00:00:00 2001
From: AlQuemist <alquemist@Lyriks>
Date: Wed, 20 Dec 2023 16:13:52 +0100
Subject: [PATCH] GitLab-CI: fix Homebrew directory

---
 .gitlab-ci.yml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 03f0c74e..72342c13 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,13 +6,15 @@ mac_x64:
   - mac_x64_cloud
   stage: build
   before_script:
-  - PATH="/opt/homebrew-x86/opt/flex/bin:/opt/homebrew-x86/opt/bison/bin:$PATH"
+  # Homebrew packages are installed in a non-standard path
+  - BREWDIR="/opt/homebrew-x86/"
+  - PATH="$BREWDIR:$BREWDIR/opt/flex/bin:$BREWDIR/opt/bison/bin:$PATH"
   - PYPLAT="/Users/qtisas/.pyenv/versions/3.11.6/"
   script:
   - OPTDIR=/Users/Shared/Software/scg
   - mkdir pub/build
   - cd pub/build
-  - cmake -DCMAKE_PREFIX_PATH="$OPTDIR;$PYPLAT" -DCMAKE_BUILD_TYPE=Release -S ..
+  - cmake -DCMAKE_PREFIX_PATH="$BREWDIR;$OPTDIR;$PYPLAT" -DCMAKE_BUILD_TYPE=Release -S ..
   - make -j4
   - ctest --output-on-failure --timeout 120
   artifacts:
-- 
GitLab