~mmach/netext73/mesa-haswell

« back to all changes in this revision

Viewing changes to .gitlab-ci/container/build-vkd3d-proton.sh

  • Committer: mmach
  • Date: 2022-09-22 19:56:13 UTC
  • Revision ID: netbit73@gmail.com-20220922195613-wtik9mmy20tmor0i
2022-09-22 21:17:09

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
 
3
 
set -ex
4
 
 
5
 
VKD3D_PROTON_VERSION="2.6"
6
 
VKD3D_PROTON_COMMIT="3e5aab6fb3e18f81a71b339be4cb5cdf55140980"
7
 
 
8
 
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
9
 
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"
10
 
VKD3D_PROTON_BUILD_DIR="/vkd3d-proton-$VKD3D_PROTON_VERSION"
11
 
 
12
 
function build_arch {
13
 
  local arch="$1"
14
 
  shift
15
 
 
16
 
  meson "$@"                               \
17
 
        -Denable_tests=true                \
18
 
        --buildtype release                \
19
 
        --prefix "$VKD3D_PROTON_BUILD_DIR" \
20
 
        --strip                            \
21
 
        --bindir "x${arch}"                \
22
 
        --libdir "x${arch}"                \
23
 
        "$VKD3D_PROTON_BUILD_DIR/build.${arch}"
24
 
 
25
 
  ninja -C "$VKD3D_PROTON_BUILD_DIR/build.${arch}" install
26
 
 
27
 
  install -D -m755 -t "${VKD3D_PROTON_DST_DIR}/x${arch}/bin" "$VKD3D_PROTON_BUILD_DIR/build.${arch}/tests/"*.exe
28
 
}
29
 
 
30
 
git clone https://github.com/HansKristian-Work/vkd3d-proton.git --single-branch -b "v$VKD3D_PROTON_VERSION" --no-checkout "$VKD3D_PROTON_SRC_DIR"
31
 
pushd "$VKD3D_PROTON_SRC_DIR"
32
 
git checkout "$VKD3D_PROTON_COMMIT"
33
 
git submodule update --init --recursive
34
 
git submodule update --recursive
35
 
build_arch 64 --cross-file build-win64.txt
36
 
build_arch 86 --cross-file build-win32.txt
37
 
cp "setup_vkd3d_proton.sh" "$VKD3D_PROTON_BUILD_DIR/setup_vkd3d_proton.sh"
38
 
chmod +x "$VKD3D_PROTON_BUILD_DIR/setup_vkd3d_proton.sh"
39
 
popd
40
 
 
41
 
"$VKD3D_PROTON_BUILD_DIR"/setup_vkd3d_proton.sh install
42
 
rm -rf "$VKD3D_PROTON_BUILD_DIR"
43
 
rm -rf "$VKD3D_PROTON_SRC_DIR"