diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a5c815320f4066fb380b060d878e23ef4ef04a19..949919d7dce2402b1475708bf7cd685dfddfa533 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -57,12 +57,12 @@ mac_x64:
   before_script:
     - NPROC=12 # number of logical CPUs obtained from `sysctl hw.logicalcpu`
     - BREWDIR="/opt/homebrew-x86"
-    - PATH="$BREWDIR:$PATH"
     - QTDIR="$BREWDIR/Cellar/qt/6.6.0"
-    - CCACHE="$BREWDIR/bin/ccache"
     - PYPLAT="/Users/qtisas/.pyenv/versions/3.11.6/"
+    - PATH="$BREWDIR:$PATH"
   script:  &mac_script
     - OPTDIR="/Users/Shared/Software/scg"
+    - CCACHE="$BREWDIR/bin/ccache"
     - env
     - mkdir build
     - cd build
@@ -82,10 +82,10 @@ mac_arm:
   - mac_arm
   stage: build
   before_script:
-    - QTDIR="/opt/homebrew/opt/qt"
-    - PYPLAT="/Users/qtisas/.pyenv/versions/3.11.6/"
-    - CCACHE="/opt/homebrew/bin/ccache"
     - NPROC=14 # number of logical CPUs obtained from `sysctl hw.logicalcpu`
+    - BREWDIR="/opt/homebrew"
+    - QTDIR="$BREWDIR/opt/qt"
+    - PYPLAT="/Users/qtisas/.pyenv/versions/3.11.6/"
   script: *mac_script
   artifacts: *mac_artifacts