For the moment this MR is just to run the pipeline and check the result.
From: Giovanni Mascellani gmascellani@codeweavers.com
Mostly to avoid polluting other logs and artifacts, and also to avoid recompiling crosstests over and over. Eventually the artifacts produced at this stage should be run on native Windows. --- gitlab/build-crosstest | 19 +++++++++++++++++++ gitlab/build-linux | 4 ++-- gitlab/build-mac | 4 ++-- gitlab/build.yml | 26 ++++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 4 deletions(-) create mode 100755 gitlab/build-crosstest
diff --git a/gitlab/build-crosstest b/gitlab/build-crosstest new file mode 100755 index 000000000..99997ffa8 --- /dev/null +++ b/gitlab/build-crosstest @@ -0,0 +1,19 @@ +#!/bin/bash + +echo "Building $(git log -1)" +echo "---" + +COMMIT=$(git rev-parse --short HEAD) + +set -Eeuxo pipefail + +./autogen.sh +rm -fr build +mkdir build +cd build +../configure && make -j$(nproc) crosstest || touch ../pipeline_failed + +mkdir -p ../artifacts/$COMMIT +rsync -Rr tests/*.exe ../artifacts/$COMMIT + +git reset --hard diff --git a/gitlab/build-linux b/gitlab/build-linux index 4162442d8..b6071ef9c 100755 --- a/gitlab/build-linux +++ b/gitlab/build-linux @@ -11,9 +11,9 @@ set -Eeuxo pipefail rm -fr build mkdir build cd build -../configure --enable-demos && make -j$(nproc) && make -j$(nproc) crosstest && make -j$(nproc) check || touch ../pipeline_failed +../configure --enable-demos && make -j$(nproc) && make -j$(nproc) check || touch ../pipeline_failed
mkdir -p ../artifacts/$COMMIT -rsync -Rr doc/* tests/*.exe test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT +rsync -Rr doc/* test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT
git reset --hard diff --git a/gitlab/build-mac b/gitlab/build-mac index e423330ee..401bdc5a4 100755 --- a/gitlab/build-mac +++ b/gitlab/build-mac @@ -11,9 +11,9 @@ set -Eeuxo pipefail rm -fr build mkdir build cd build -../configure && make -j$(sysctl -n hw.ncpu) && make -j$(sysctl -n hw.ncpu) crosstest && make -j$(sysctl -n hw.ncpu) check || touch ../pipeline_failed +../configure && make -j$(sysctl -n hw.ncpu) && make -j$(sysctl -n hw.ncpu) check || touch ../pipeline_failed
mkdir -p ../artifacts/$COMMIT -rsync -Rr tests/*.exe test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT +rsync -Rr test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT
git reset --hard diff --git a/gitlab/build.yml b/gitlab/build.yml index 0eac7722c..ca1b7eaac 100644 --- a/gitlab/build.yml +++ b/gitlab/build.yml @@ -52,6 +52,32 @@ build-llvmpipe-32: VK_LOADER_DRIVERS_SELECT: 'lvp_*' CC: 'gcc -m32'
+build-crosstest: + stage: build + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + image: $CI_REGISTRY/wine/vkd3d:debian-bookworm + interruptible: true + needs: + - job: build-image + optional: true + dependencies: [] + script: + - git config --global --add safe.directory $CI_PROJECT_DIR + - git clean -fdx + - git reset --hard + - rm -fr .git/rebase-merge + - mkdir artifacts + - cat /proc/cpuinfo > artifacts/cpuinfo.txt + - cat /proc/meminfo > artifacts/meminfo.txt + - vulkaninfo > artifacts/vulkaninfo.txt + - git rebase $CI_MERGE_REQUEST_DIFF_BASE_SHA --exec ./gitlab/build-crosstest + - if [ -f pipeline_failed ] ; then exit 1 ; fi + artifacts: + when: always + paths: + - artifacts + build-mac: stage: build rules:
From: Giovanni Mascellani gmascellani@codeweavers.com
--- gitlab/build-crosstest | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gitlab/build-crosstest b/gitlab/build-crosstest index 99997ffa8..d5f6ae00d 100755 --- a/gitlab/build-crosstest +++ b/gitlab/build-crosstest @@ -7,11 +7,14 @@ COMMIT=$(git rev-parse --short HEAD)
set -Eeuxo pipefail
+# Building with -Wno-array-bounds because MinGW headers currently emit +# a lot of those + ./autogen.sh rm -fr build mkdir build cd build -../configure && make -j$(nproc) crosstest || touch ../pipeline_failed +../configure CROSSCC32="i686-w64-mingw32-gcc -Wno-array-bounds" CROSSCC64="x86_64-w64-mingw32-gcc -Wno-array-bounds" && make -j$(nproc) crosstest || touch ../pipeline_failed
mkdir -p ../artifacts/$COMMIT rsync -Rr tests/*.exe ../artifacts/$COMMIT
From: Giovanni Mascellani gmascellani@codeweavers.com
--- gitlab/build-crosstest | 4 +++- gitlab/build-linux | 5 ++++- gitlab/build-mac | 5 ++++- 3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/gitlab/build-crosstest b/gitlab/build-crosstest index d5f6ae00d..7963e58bf 100755 --- a/gitlab/build-crosstest +++ b/gitlab/build-crosstest @@ -14,7 +14,9 @@ set -Eeuxo pipefail rm -fr build mkdir build cd build -../configure CROSSCC32="i686-w64-mingw32-gcc -Wno-array-bounds" CROSSCC64="x86_64-w64-mingw32-gcc -Wno-array-bounds" && make -j$(nproc) crosstest || touch ../pipeline_failed +../configure CROSSCC32="i686-w64-mingw32-gcc -Wno-array-bounds" CROSSCC64="x86_64-w64-mingw32-gcc -Wno-array-bounds" && \ + make -j$(nproc) crosstest || \ + touch ../pipeline_failed
mkdir -p ../artifacts/$COMMIT rsync -Rr tests/*.exe ../artifacts/$COMMIT diff --git a/gitlab/build-linux b/gitlab/build-linux index b6071ef9c..318bbba44 100755 --- a/gitlab/build-linux +++ b/gitlab/build-linux @@ -11,7 +11,10 @@ set -Eeuxo pipefail rm -fr build mkdir build cd build -../configure --enable-demos && make -j$(nproc) && make -j$(nproc) check || touch ../pipeline_failed +../configure --enable-demos && \ + make -j$(nproc) && \ + make -j$(nproc) check || \ + touch ../pipeline_failed
mkdir -p ../artifacts/$COMMIT rsync -Rr doc/* test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT diff --git a/gitlab/build-mac b/gitlab/build-mac index 401bdc5a4..ffa46d67f 100755 --- a/gitlab/build-mac +++ b/gitlab/build-mac @@ -11,7 +11,10 @@ set -Eeuxo pipefail rm -fr build mkdir build cd build -../configure && make -j$(sysctl -n hw.ncpu) && make -j$(sysctl -n hw.ncpu) check || touch ../pipeline_failed +../configure && \ + make -j$(sysctl -n hw.ncpu) && \ + make -j$(sysctl -n hw.ncpu) check || \ + touch ../pipeline_failed
mkdir -p ../artifacts/$COMMIT rsync -Rr test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT
From: Giovanni Mascellani gmascellani@codeweavers.com
Nowadays vkd3d is probably most commonly used compiled as PE rather then ELF, so it makes sense to at least ensure that compilation succeeds. In the future it would be nice to somehow test these binaries as well. --- gitlab/build-mingw | 24 ++++++++++++++++++++++++ gitlab/build.yml | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100755 gitlab/build-mingw
diff --git a/gitlab/build-mingw b/gitlab/build-mingw new file mode 100755 index 000000000..54a9fd8d2 --- /dev/null +++ b/gitlab/build-mingw @@ -0,0 +1,24 @@ +#!/bin/bash + +echo "Building $(git log -1)" +echo "---" + +COMMIT=$(git rev-parse --short HEAD) + +set -Eeuxo pipefail + +./autogen.sh +rm -fr build +mkdir build +cd build +mkdir vulkan-headers +cp -r /usr/include/vulkan /usr/include/vk_video /usr/include/spirv vulkan-headers +../configure --enable-demos --disable-doxygen-doc --host=$HOST SONAME_LIBVULKAN="vulkan-1.dll" CPPFLAGS="-I$PWD/vulkan-headers" LDFLAGS="-static-libgcc" && \ + make -j$(nproc) && \ + make -j$(nproc) install DESTDIR="$PWD/destdir" || \ + touch ../pipeline_failed + +mkdir -p ../artifacts/$COMMIT +cp destdir/usr/local/bin/* ../artifacts/$COMMIT + +git reset --hard diff --git a/gitlab/build.yml b/gitlab/build.yml index ca1b7eaac..033feda2b 100644 --- a/gitlab/build.yml +++ b/gitlab/build.yml @@ -78,6 +78,42 @@ build-crosstest: paths: - artifacts
+.build-mingw: + stage: build + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + image: $CI_REGISTRY/wine/vkd3d:debian-bookworm + interruptible: true + needs: + - job: build-image + optional: true + dependencies: [] + script: + - git config --global --add safe.directory $CI_PROJECT_DIR + - git clean -fdx + - git reset --hard + - rm -fr .git/rebase-merge + - mkdir artifacts + - cat /proc/cpuinfo > artifacts/cpuinfo.txt + - cat /proc/meminfo > artifacts/meminfo.txt + #- git rebase $CI_MERGE_REQUEST_DIFF_BASE_SHA --exec ./gitlab/build-mingw + - ./gitlab/build-mingw + - if [ -f pipeline_failed ] ; then exit 1 ; fi + artifacts: + when: always + paths: + - artifacts + +build-mingw-64: + extends: .build-mingw + variables: + HOST: "x86_64-w64-mingw32" + +build-mingw-32: + extends: .build-mingw + variables: + HOST: "i686-w64-mingw32" + build-mac: stage: build rules: