Skip to content

Commit

Permalink
Merge pull request #13 from occ-ai/roy.update_whisper
Browse files Browse the repository at this point in the history
Add packages and update build configuration
  • Loading branch information
royshil authored Mar 22, 2024
2 parents 0d6add7 + 29b466d commit c1983cc
Show file tree
Hide file tree
Showing 27 changed files with 410 additions and 1,526 deletions.
1 change: 1 addition & 0 deletions .github/scripts/.Aptfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ package 'git'
package 'jq'
package 'ninja-build', bin: 'ninja'
package 'pkg-config'
package 'libopenblas-dev'
292 changes: 0 additions & 292 deletions .github/scripts/.Brewfile.lock.json

This file was deleted.

11 changes: 10 additions & 1 deletion .github/scripts/.build.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,15 @@ ${_usage_host:-}"
-DCODESIGN_IDENTITY=${CODESIGN_IDENT:--}
)
cmake_build_args+=(--preset ${_preset} --parallel --config ${config} -- ONLY_ACTIVE_ARCH=NO -arch x86_64) # -arch arm64
cmake_build_args+=(--preset ${_preset} --parallel --config ${config} -- ONLY_ACTIVE_ARCH=YES)
# check the MACOS_ARCH env var to determine the build architecture
if [[ -n ${MACOS_ARCH} ]] {
cmake_build_args+=(-arch ${MACOS_ARCH})
} else {
# error out
log_error "No MACOS_ARCH environment variable set. Please set it to the desired architecture."
exit 2
}
cmake_install_args+=(build_macos --config ${config} --prefix "${project_root}/release/${config}")
local -a xcbeautify_opts=()
Expand All @@ -242,6 +250,7 @@ ${_usage_host:-}"
-G "${generator}"
-DQT_VERSION=${QT_VERSION:-6}
-DCMAKE_BUILD_TYPE=${config}
-DCMAKE_INSTALL_PREFIX=/usr
)
local cmake_version
Expand Down
13 changes: 5 additions & 8 deletions .github/scripts/.package.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ ${_usage_host:-}"
if [[ ${host_os} == macos ]] {
autoload -Uz check_packages read_codesign read_codesign_installer read_codesign_pass
# get the arch from MACOS_ARCH env var
local -r macos_arch=${MACOS_ARCH:-$(uname -m)}
local output_name="${product_name}-${product_version}-${host_os}-universal"
local output_name="${product_name}-${product_version}-${host_os}-${macos_arch}"
if [[ ! -d ${project_root}/release/${config}/${product_name}.plugin ]] {
log_error 'No release artifact found. Run the build script or the CMake install procedure first.'
Expand All @@ -180,18 +182,13 @@ ${_usage_host:-}"
if (( _loglevel > 1 || ${+CI} )) _tarflags="v${_tarflags}"
if (( package )) {
if [[ ! -f ${project_root}/build_macos/installer-macos.generated.pkgproj ]] {
log_error 'Packages project file not found. Run the build script or the CMake build and install procedures first.'
if [[ ! -f ${project_root}/release/${config}/${product_name}.pkg ]] {
log_error 'Installer Package not found. Run the build script or the CMake build and install procedures first.'
return 2
}
check_packages
log_group "Packaging ${product_name}..."
pushd ${project_root}
packagesbuild \
--build-folder ${project_root}/release/${config} \
${project_root}/build_macos/installer-macos.generated.pkgproj
if (( codesign )) {
read_codesign_installer
Expand Down
15 changes: 13 additions & 2 deletions .github/scripts/Build-Windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ param(
[string] $Target = 'x64',
[ValidateSet('Debug', 'RelWithDebInfo', 'Release', 'MinSizeRel')]
[string] $Configuration = 'RelWithDebInfo',
[ValidateSet('cpu', '12.2.0', '11.8.0')]
[string] $Cublas = 'cpu',
[switch] $SkipAll,
[switch] $SkipBuild,
[switch] $SkipDeps
[switch] $SkipDeps,
[string[]] $ExtraCmakeArgs
)

$ErrorActionPreference = 'Stop'
Expand Down Expand Up @@ -56,7 +59,8 @@ function Build {
if ( ! ( ( $SkipAll ) -or ( $SkipBuild ) ) ) {
Ensure-Location $ProjectRoot

$CmakeArgs = @()
# take cmake args from $ExtraCmakeArgs
$CmakeArgs = $ExtraCmakeArgs
$CmakeBuildArgs = @()
$CmakeInstallArgs = @()

Expand All @@ -75,6 +79,13 @@ function Build {
'--preset', $Preset
)

if ( $Cublas -ne 'cpu' ) {
$CmakeArgs += @(
'-DLOCALVOCAL_WITH_CUDA=ON',
"-DCUDA_TOOLKIT_ROOT_DIR=$Env:CUDA_TOOLKIT_ROOT_DIR"
)
}

$CmakeBuildArgs += @(
'--build'
'--preset', $Preset
Expand Down
Loading

0 comments on commit c1983cc

Please sign in to comment.