소스 검색

CI: Update build script to use Xcode generator by default outside of CI

It is preferred that developers use Xcode when developing plugins for
macOS. On CI, Ninja is preferred for support of ccache and thus speed
of compilation.
PatTheMav 2 년 전
부모
커밋
40e6d8edac
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      .github/scripts/.build.zsh

+ 3 - 2
.github/scripts/.build.zsh

@@ -61,10 +61,11 @@ build() {
   local -r -a _valid_configs=(Debug RelWithDebInfo Release MinSizeRel)
   if [[ ${host_os} == 'macos' ]] {
     local -r -a _valid_generators=(Xcode Ninja 'Unix Makefiles')
+    local generator="${${CI:+Ninja}:-Xcode}"
   } else {
     local -r -a _valid_generators=(Ninja 'Unix Makefiles')
+    local generator='Ninja'
   }
-  local generator='Ninja'
   local -r _usage="
 Usage: %B${functrace[1]%:*}%b <option> [<options>]
 
@@ -197,7 +198,7 @@ Usage: %B${functrace[1]%:*}%b <option> [<options>]
     )
 
     if (( _loglevel == 0 )) cmake_args+=(-Wno_deprecated -Wno-dev --log-level=ERROR)
-    if (( _logLevel > 2 )) cmake_args+=(--debug-output)
+    if (( _loglevel > 2 )) cmake_args+=(--debug-output)
 
     local num_procs