[PATCH v2 0/1] MR5749: Draft: gitlab: Update configuration for the new Mac runner.
Two main changes: - VM configuration in build.yml for the executor. - The build-mac script is now architecture-agnostic. -- v2: gitlab: Update configuration for the new Mac runner. https://gitlab.winehq.org/wine/wine/-/merge_requests/5749
From: Tim Clem <tclem(a)codeweavers.com> Two main changes: - VM configuration in build.yml for the executor. - The build-mac script is now architecture-agnostic. --- tools/gitlab/build-mac | 25 +++++++++++++++++++++++-- tools/gitlab/build.yml | 5 ++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/tools/gitlab/build-mac b/tools/gitlab/build-mac index 98df7731ad1..2ce52976ffe 100755 --- a/tools/gitlab/build-mac +++ b/tools/gitlab/build-mac @@ -5,15 +5,36 @@ echo "---" set -Eeuxo pipefail +X86_BREW_HOME='/usr/local' +if [ "$(arch)" = 'arm64' ]; then + ARCH_BREW_HOME='/opt/homebrew' + ARCH_CMD='arch -x86_64' +else + ARCH_BREW_HOME="$X86_BREW_HOME" + ARCH_CMD= +fi + +# Pick up dependencies from homebrew. +export PATH="$X86_BREW_HOME/bin:$ARCH_BREW_HOME/bin:$PATH" +export LIBRARY_PATH="$X86_BREW_HOME/lib" + +# x86 ccache wrappers. +export PATH="$X86_BREW_HOME/opt/ccache/libexec:$PATH" + +# SDKROOT is independent of DEVELOPER_DIR/xcode-select, and will default to the +# command line tools. +export SDKROOT="$(xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" + ./tools/make_requests ./tools/make_specfiles ./tools/make_makefiles autoreconf -f cd build64 -../configure -C --enable-win64 --with-mingw BISON=/usr/local/opt/bison/bin/bison -make -s -j8 +$ARCH_CMD ../configure -C --enable-win64 --with-mingw BISON="$ARCH_BREW_HOME/opt/bison/bin/bison" +$ARCH_CMD make -s -j8 cd .. git reset --hard + sleep 2 diff --git a/tools/gitlab/build.yml b/tools/gitlab/build.yml index 66daf518386..528d998b644 100644 --- a/tools/gitlab/build.yml +++ b/tools/gitlab/build.yml @@ -52,6 +52,10 @@ build-clang: build-mac: extends: .wine-build + image: winehq-sonoma-pristine + variables: + TART_EXECUTOR_SSH_USERNAME: "gitlab" + TART_EXECUTOR_SSH_PASSWORD: "gitlab" rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' tags: @@ -63,7 +67,6 @@ build-mac: - build32/config.log script: - mkdir -p build32 build64 - - export PATH="/usr/local/opt/ccache/libexec:$PATH" - git rebase $CI_MERGE_REQUEST_DIFF_BASE_SHA --exec ./tools/gitlab/build-mac build-winetest: -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5749
Brendan Shanks (@bshanks) commented about tools/gitlab/build-mac:
set -Eeuxo pipefail
+X86_BREW_HOME='/usr/local' +if [ "$(arch)" = 'arm64' ]; then + ARCH_BREW_HOME='/opt/homebrew' + ARCH_CMD='arch -x86_64' +else + ARCH_BREW_HOME="$X86_BREW_HOME" + ARCH_CMD= +fi + +# Pick up dependencies from homebrew. +export PATH="$X86_BREW_HOME/bin:$ARCH_BREW_HOME/bin:$PATH" +export LIBRARY_PATH="$X86_BREW_HOME/lib"
What uses LIBRARY_PATH? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5749#note_71660
Brendan Shanks (@bshanks) commented about tools/gitlab/build-mac:
+export PATH="$X86_BREW_HOME/opt/ccache/libexec:$PATH" + +# SDKROOT is independent of DEVELOPER_DIR/xcode-select, and will default to the +# command line tools. +export SDKROOT="$(xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" + ./tools/make_requests ./tools/make_specfiles ./tools/make_makefiles autoreconf -f
cd build64 -../configure -C --enable-win64 --with-mingw BISON=/usr/local/opt/bison/bin/bison -make -s -j8 +$ARCH_CMD ../configure -C --enable-win64 --with-mingw BISON="$ARCH_BREW_HOME/opt/bison/bin/bison" +$ARCH_CMD make -s -j8 Maybe this could be based on `sysctl hw.activecpu`?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/5749#note_71661
On Wed May 29 18:01:51 2024 +0000, Brendan Shanks wrote:
What uses LIBRARY_PATH? configure doesn't pick up MoltenVK without it.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/5749#note_71662
On Wed May 29 18:01:51 2024 +0000, Brendan Shanks wrote:
Maybe this could be based on `sysctl hw.activecpu`? Is there a benefit to that over using the result of `arch`?
I originally just hardcoded `arch -x86_64`, but it turns out that the current build machine is i386. Really any attempt to keep this arch-agnostic is just so we can continue using the current build machine, but that's kind of silly since I'm sure we'll decommission it as soon as we flip the switch on the new one. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5749#note_71663
On Wed May 29 18:29:24 2024 +0000, Tim Clem wrote:
Is there a benefit to that over using the result of `arch`? I originally just hardcoded `arch -x86_64`, but it turns out that the current build machine is i386. Really any attempt to keep this arch-agnostic is just so we can continue using the current build machine, but that's kind of silly since I'm sure we'll decommission it as soon as we flip the switch on the new one. Oh I meant doing `-j$(sysctl -n hw.activecpu)` rather than hardcoding for 8 cores.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/5749#note_71664
On Wed May 29 18:34:09 2024 +0000, Brendan Shanks wrote:
Oh I meant doing `-j$(sysctl -n hw.activecpu)` rather than hardcoding for 8 cores. Oh! Assumed you meant the architecture sysctl. Yes, that's a good idea.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/5749#note_71665
participants (3)
-
Brendan Shanks (@bshanks) -
Tim Clem -
Tim Clem (@tclem)