浏览代码

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
tytan652 2 年之前
父节点
当前提交
ca3dabec35
共有 3 个文件被更改,包括 7 次插入5 次删除
  1. 1 1
      .github/scripts/.Aptfile
  2. 4 3
      .github/scripts/.build.zsh
  3. 2 1
      .github/scripts/.package.zsh

+ 1 - 1
.github/scripts/.Aptfile

@@ -1,5 +1,5 @@
 package 'ccache'
-package 'cmake'
+package 'cmake', bin: '/usr/bin/cmake'
 package 'curl'
 package 'git'
 package 'jq'

+ 4 - 3
.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

+ 2 - 1
.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##*-}