From ca3dabec355751322a2be3f475debd6651ba499d Mon Sep 17 00:00:00 2001 From: tytan652 Date: Sun, 6 Aug 2023 09:57:14 +0200 Subject: [PATCH] CI: Enforce the use of Ubuntu's CMake Github provides a more recent version in /usr/local Also adds ZSH and YAML files spacing in editorconfig file --- .github/scripts/.Aptfile | 2 +- .github/scripts/.build.zsh | 7 ++++--- .github/scripts/.package.zsh | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/scripts/.Aptfile b/.github/scripts/.Aptfile index 40a5f1159..ac3d905ca 100644 --- a/.github/scripts/.Aptfile +++ b/.github/scripts/.Aptfile @@ -1,5 +1,5 @@ package 'ccache' -package 'cmake' +package 'cmake', bin: '/usr/bin/cmake' package 'curl' package 'git' package 'jq' diff --git a/.github/scripts/.build.zsh b/.github/scripts/.build.zsh index 7410be322..3009d58e0 100755 --- a/.github/scripts/.build.zsh +++ b/.github/scripts/.build.zsh @@ -185,6 +185,7 @@ build() { popd ;; linux-*) + local cmake_bin='/usr/bin/cmake' cmake_args+=( -S ${PWD} -B build_${target##*-} -G Ninja @@ -199,15 +200,15 @@ build() { cmake_install_args+=(build_${target##*-} --prefix ${project_root}/build_${target##*-}/install/${config}) log_group "Configuring ${product_name}..." - cmake -S ${project_root} ${cmake_args} + ${cmake_bin} -S ${project_root} ${cmake_args} log_group "Building ${product_name}..." if (( debug )) cmake_build_args+=(--verbose) - cmake ${cmake_build_args} + ${cmake_bin} ${cmake_build_args} log_group "Installing ${product_name}..." if (( debug )) cmake_install_args+=(--verbose) - cmake ${cmake_install_args} + ${cmake_bin} ${cmake_install_args} ;; } popd diff --git a/.github/scripts/.package.zsh b/.github/scripts/.package.zsh index 9c10f68bc..b9411bec1 100755 --- a/.github/scripts/.package.zsh +++ b/.github/scripts/.package.zsh @@ -209,13 +209,14 @@ package() { log_group } elif [[ ${host_os} == linux ]] { + local cmake_bin='/usr/bin/cmake' local -a cmake_args=() if (( debug )) cmake_args+=(--verbose) if (( package )) { log_group "Packaging obs-studio..." pushd ${project_root} - cmake --build build_${target##*-} --config ${config} -t package ${cmake_args} + ${cmake_bin} --build build_${target##*-} --config ${config} -t package ${cmake_args} output_name="${output_name}-${target##*-}-linux-gnu" pushd ${project_root}/build_${target##*-}