Module: vkd3d Branch: master Commit: 46a1b66df74f34693eed06859944f584a0ec2711 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/46a1b66df74f34693eed06859944f5...
Author: Giovanni Mascellani gmascellani@codeweavers.com Date: Wed Jun 12 15:51:22 2024 +0200
ci: Assume an Apple Silicon-based environment for the macOS CI job.
The previous Intel-based macOS runner was replaced with another one running as a virtual machine on top of an Apple Silicon host.
Since the current macOS runner is not yet able to deal with different exit codes, we temporarily allow failure unconditionally. This will be reverted as soon as the runner issue is fixed.
---
gitlab/build-mac | 2 +- gitlab/build.yml | 24 ++++++++++++------------ gitlab/image.yml | 28 +++++++++++++++++++++------- gitlab/patch_moltenvk_icd.sh | 12 ------------ 4 files changed, 34 insertions(+), 32 deletions(-)
diff --git a/gitlab/build-mac b/gitlab/build-mac index c0efbdf0..5d7d5845 100755 --- a/gitlab/build-mac +++ b/gitlab/build-mac @@ -10,7 +10,7 @@ set -Eeuxo pipefail rm -fr build mkdir build cd build -if ../configure CFLAGS="-g -O2 -Wno-implicit-fallthrough -Werror" && \ +if ../configure CFLAGS="-I/opt/homebrew/opt/vulkan-headers/include -I/opt/homebrew/opt/spirv-headers/include -g -O2 -Wno-implicit-fallthrough -Wno-ignored-attributes -Wno-unknown-attributes -Wno-unused-but-set-variable -Werror" VULKAN_LIBS=-L/opt/homebrew/opt/vulkan-loader/lib --with-spirv-tools && \ make -j$(sysctl -n hw.ncpu) ; then make -j$(sysctl -n hw.ncpu) AM_COLOR_TESTS=always check || \ touch ../tests_failed diff --git a/gitlab/build.yml b/gitlab/build.yml index fb8a6879..c6ce6b62 100644 --- a/gitlab/build.yml +++ b/gitlab/build.yml @@ -137,9 +137,11 @@ build-mac: stage: build rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - allow_failure: - exit_codes: - - 2 + image: winehq-sonoma-pristine + variables: + TART_EXECUTOR_SSH_USERNAME: "gitlab" + TART_EXECUTOR_SSH_PASSWORD: "gitlab" + allow_failure: true interruptible: true needs: - job: image-mac @@ -148,28 +150,26 @@ build-mac: tags: - mac script: + - brew install vulkan-tools libtool spirv-headers vulkan-loader - git config --global --add safe.directory $CI_PROJECT_DIR - git clean -fdx - git reset --hard - rm -fr .git/rebase-merge - # We use a custom ICD which is not marked as a portability driver, - # so that test programs are not confused. - - ./gitlab/patch_moltenvk_icd.sh - - export VK_DRIVER_FILES="$PWD/gitlab/MoltenVK_icd.json" + - curl -o image.zip https://gitlab.winehq.org/api/v4/projects/giomasce%2Fvkd3d/jobs/artifacts/ci... + - unzip image.zip - mkdir artifacts + - export PATH="/opt/homebrew/opt/bison/bin:/opt/homebrew/opt/flex/bin:$PWD/image/bin:$PATH" + - export VK_DRIVER_FILES="$PWD/image/moltenvk/MoltenVK_icd.json" - system_profiler SPSoftwareDataType SPHardwareDataType > artifacts/systeminfo.txt - vulkaninfo > artifacts/vulkaninfo.txt - - export PATH="/usr/local/opt/bison/bin:/usr/local/opt/flex/bin:$PATH" - - curl -o image.zip https://gitlab.winehq.org/api/v4/projects/wine%2Fvkd3d/jobs/artifacts/master... - - unzip image.zip - - export PATH="$PWD/image/bin:$PATH" - git rebase $CI_MERGE_REQUEST_DIFF_BASE_SHA --exec ./gitlab/build-mac - if [ -f build_failed ] ; then exit 1 ; fi - if [ -f tests_failed ] ; then exit 2 ; fi variables: VKD3D_DISABLE_EXTENSIONS: "VK_EXT_descriptor_indexing" VKD3D_SHADER_CONFIG: 'force_validation' - MVK_CONFIG_LOG_LEVEL: 1 + MVK_CONFIG_LOG_LEVEL: 2 + SONAME_LIBVULKAN: "/opt/homebrew/opt/vulkan-loader/lib/libvulkan.1.dylib" artifacts: when: always paths: diff --git a/gitlab/image.yml b/gitlab/image.yml index 8b235a66..5cf64d07 100644 --- a/gitlab/image.yml +++ b/gitlab/image.yml @@ -31,24 +31,38 @@ image-mac: - .gitlab-ci.yml - gitlab/image.yml - gitlab/image.docker + image: winehq-sonoma-pristine + variables: + TART_EXECUTOR_SSH_USERNAME: "gitlab" + TART_EXECUTOR_SSH_PASSWORD: "gitlab" interruptible: true tags: - mac script: - mkdir image - - cd image - - mkdir bin + - mkdir image/bin + - mkdir image/moltenvk - export PATH="/usr/local/opt/bison/bin:/usr/local/opt/flex/bin:$PATH" + + - git clone --depth 1 --branch v1.2.9 https://github.com/KhronosGroup/MoltenVK.git + - cd MoltenVK + - ./fetchDependencies --macos + - make macos + # Do not mark MoltenVK as a portability driver, otherwise it will be harder for vkd3d to find + # it. Since editing JSON properly is hard, we just rename the key. + - 'sed -i -e "s|is_portability_driver|_is_portability_driver|g" Package/Release/MoltenVK/dylib/macOS/MoltenVK_icd.json' + - cd .. + - cp MoltenVK/Package/Release/MoltenVK/dylib/macOS/MoltenVK_icd.json image/moltenvk + - cp MoltenVK/Package/Release/MoltenVK/dylib/macOS/libMoltenVK.dylib image/moltenvk + - git clone --depth 1 --branch wine-3.21 https://gitlab.winehq.org/wine/wine.git - cd wine - mkdir build - cd build - - ../configure --enable-win64 --without-x --without-freetype - - make tools/widl/widl + - arch -x86_64 ../configure --enable-win64 --without-x --without-freetype + - arch -x86_64 make tools/widl/widl - cd ../.. - - cp wine/build/tools/widl/widl bin - - rm -fr wine - - cd .. + - cp wine/build/tools/widl/widl image/bin artifacts: paths: - image diff --git a/gitlab/patch_moltenvk_icd.sh b/gitlab/patch_moltenvk_icd.sh deleted file mode 100755 index ad90a4ea..00000000 --- a/gitlab/patch_moltenvk_icd.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -BASE_PATH="/usr/local/opt/molten-vk/share/vulkan/icd.d" - -cp "$BASE_PATH/MoltenVK_icd.json" gitlab/MoltenVK_icd.json - -# The driver path is relative -sed -i -e 's|"library_path" *: "|"library_path" : "'"$BASE_PATH/"'|g' gitlab/MoltenVK_icd.json - -# We pretend this is not a portability driver, otherwise vkd3d won't -# find it -sed -i -e 's|"is_portability_driver" *: *true|"is_portability_driver" : false|g' gitlab/MoltenVK_icd.json