Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate mac dsyms #29

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .pipelines/build-package-custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ trigger: none

parameters:

# We could map this parameter to a combination of default triplets for Mac and windows, as well as the default feature flags to pass to each
# for example, ffmpeg might map to: ffmpeg[avcodec,avdevice,avfilter,avformat,avresample,postproc,swscale,swresample,mp3lame,sdl2,zlib,dav1d]
- name: package
displayName: Package to install, plus any optional feature flags (ex. "somepackage" or "somepackage[feature1,feature2]")
type: string
Expand Down
1 change: 0 additions & 1 deletion .pipelines/build-package-preconfigured.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ parameters:
displayName: Package to install (builds as a dynamic library, unless otherwise specified)
type: string
values:
- expat
- ffmpeg
- hunspell
- hunspell-debug
Expand Down
4 changes: 2 additions & 2 deletions .pipelines/templates/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ stages:
- template: steps/full-checkout.yml

- powershell: |
./build-and-stage-preconfigured.ps1 -PackageName "${{ parameters.packageName }}" -StagedArtifactsPath "$(Build.ArtifactStagingDirectory)"
./build-package.ps1 -PackageName "${{ parameters.packageName }}" -StagedArtifactsPath "$(Build.ArtifactStagingDirectory)"
displayName: 'Run: install & stage (preconfigured)'
condition: and(succeeded(), ${{ parameters.isPreconfiguredBuild }})

- powershell: |
./build-and-stage.ps1 -PackageAndFeatures "${{ parameters.package }}" -LinkType "${{ parameters.linkType }}" -BuildType "${{ parameters.buildType }}" -StagedArtifactsPath "$(Build.ArtifactStagingDirectory)"
./invoke-build.ps1 -PackageAndFeatures "${{ parameters.package }}" -LinkType "${{ parameters.linkType }}" -BuildType "${{ parameters.buildType }}" -StagedArtifactsPath "$(Build.ArtifactStagingDirectory)"
displayName: 'Run: install & stage (custom)'
condition: and(succeeded(), ${{ parameters.isCustomBuild }})

Expand Down
4 changes: 2 additions & 2 deletions build-and-stage-preconfigured.ps1 → build-package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Import-Module "$PSScriptRoot/ps-modules/Build" -Force -DisableNameChecking
Write-Banner -Level 1 -Title "Installing preconfigured package: `"$PackageName`""
$pkg = Get-PackageInfo -PackageName $PackageName

Write-Message "$(NL)Running build-and-stage.ps1...$(NL)"
./build-and-stage.ps1 -PackageName $PackageName -PackageAndFeatures $pkg.package -LinkType $pkg.linkType -BuildType $pkg.buildType -StagedArtifactsPath $StagedArtifactsPath -VcpkgHash $pkg.vcpkgHash -ShowDebug:$ShowDebug
Write-Message "$(NL)Running invoke-build.ps1...$(NL)"
./invoke-build.ps1 -PackageName $PackageName -PackageAndFeatures $pkg.package -LinkType $pkg.linkType -BuildType $pkg.buildType -StagedArtifactsPath $StagedArtifactsPath -VcpkgHash $pkg.vcpkgHash -ShowDebug:$ShowDebug
33 changes: 33 additions & 0 deletions custom-ports/helloworld-meson/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# helloworld-meson
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mike-malburg/helloworld-meson
REF "d8f1be526a4116d889bf7b60841d878d961cb851"
SHA512 f8bf85e4a42ed30208632be1457bc3bf03bcafe6d77680362f8d36b6f49c538f1b95b0ffb4e0f847c4285b77d1ba1dc0989bc450cdec38ac0dd23e22ce51928b
HEAD_REF main
)

vcpkg_configure_meson(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${OPTIONS}
)
vcpkg_install_meson()

# For some reason, the meson install is not copying the files to the package directory
set(HELLOWORLD_MESON_BUILDTREE_DIR_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
if(VCPKG_TARGET_IS_WINDOWS)
file(GLOB BIN_FILES "${HELLOWORLD_MESON_BUILDTREE_DIR_RELEASE}/*.dll" "${HELLOWORLD_MESON_BUILDTREE_DIR_RELEASE}/*.pdb")
foreach(BIN_FILE ${BIN_FILES})
file(COPY "${BIN_FILE}" DESTINATION "${CURRENT_PACKAGES_DIR}/bin/")
endforeach()
endif()

file(GLOB LIB_FILES "${HELLOWORLD_MESON_BUILDTREE_DIR_RELEASE}/*.lib" "${HELLOWORLD_MESON_BUILDTREE_DIR_RELEASE}/*.dylib" "${HELLOWORLD_MESON_BUILDTREE_DIR_RELEASE}/*.a")
foreach(LIB_FILE ${LIB_FILES})
file(COPY "${LIB_FILE}" DESTINATION "${CURRENT_PACKAGES_DIR}/lib/")
endforeach()

vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
14 changes: 14 additions & 0 deletions custom-ports/helloworld-meson/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "helloworld-meson",
"version": "1.0.0",
"port-version": 1,
"description": "A library to test out building a hello world app using meson.",
"homepage": "",
"dependencies": [
{
"name": "vcpkg-tool-meson",
"host": true
}
]
}

18 changes: 10 additions & 8 deletions custom-ports/whispercpp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ggerganov/whisper.cpp
REF e72e4158debb04126a0fabedf0452a5551780ea0
SHA512 67939e665542931a75a5ea05a873e5e0a73fc18b443720bcfeb340eb7e39818937c0078976320d9799f0643d8759a64adcb2da371e072f1053232802c1c107af
REF "v${VERSION}"
SHA512 1623b7e4a94895cdf0af12e5808f16409336d18b24af13d97e77bb0dbe97141ed220e19aac7457ed40c93f2474010fa73231521fa3e2b284fd0a9b2a9847cf02
HEAD_REF master
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)

vcpkg_install_cmake()
vcpkg_cmake_configure(SOURCE_PATH ${SOURCE_PATH})
vcpkg_cmake_install()
vcpkg_copy_pdbs()

# Store all .libs in the root lib directory. For Windows SHARED builds, these will be import libraries (not static libs).
Expand All @@ -23,4 +19,10 @@ foreach(LIB_FILE ${LIB_FILES})
endforeach()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/static")

# Copy other files required in the bin dir for Mac
if(APPLE)
file(COPY "${SOURCE_PATH}/ggml-metal.metal" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
file(COPY "${SOURCE_PATH}/ggml-common.h" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
endif()

file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
2 changes: 1 addition & 1 deletion custom-ports/whispercpp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "whispercpp",
"version": "1.5.4",
"version": "1.5.5",
"port-version": 1,
"description": "A high-performance inference of OpenAI's Whisper automatic speech recognition (ASR) model.",
"homepage": "https://github.com/ggerganov/whisper.cpp",
Expand Down
11 changes: 7 additions & 4 deletions custom-steps/expat/post-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ param (
[Parameter(Mandatory=$true)][string]$BuildArtifactsPath,
[Parameter(Mandatory=$false)][string]$PackageAndFeatures,
[Parameter(Mandatory=$false)][string]$LinkType,
[Parameter(Mandatory=$false)][string]$BuildType
[Parameter(Mandatory=$false)][string]$BuildType,
[Parameter(Mandatory=$false)][string]$ModulesRoot
)

if ((Get-IsOnMacOS)) {
Remove-DylibSymlinks -BuildArtifactsPath $BuildArtifactsPath
$moduleName = "Build"
if(-not (Get-Module -Name $moduleName)) {
Import-Module "$ModulesRoot/$moduleName" -Force -DisableNameChecking
}
elseif((Get-IsOnWindowsOS)) {

if((Get-IsOnWindowsOS)) {
Update-VersionInfoForDlls -buildArtifactsPath $buildArtifactsPath -versionInfoJsonPath "$PSScriptRoot/version-info.json"
}

11 changes: 7 additions & 4 deletions custom-steps/ffmpeg/post-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ param (
[Parameter(Mandatory=$true)][string]$BuildArtifactsPath,
[Parameter(Mandatory=$false)][string]$PackageAndFeatures,
[Parameter(Mandatory=$false)][string]$LinkType,
[Parameter(Mandatory=$false)][string]$BuildType
[Parameter(Mandatory=$false)][string]$BuildType,
[Parameter(Mandatory=$false)][string]$ModulesRoot
)

if ((Get-IsOnMacOS)) {
Remove-DylibSymlinks -BuildArtifactsPath $BuildArtifactsPath
$moduleName = "Build"
if(-not (Get-Module -Name $moduleName)) {
Import-Module "$ModulesRoot/$moduleName" -Force -DisableNameChecking
}
elseif((Get-IsOnWindowsOS)) {

if((Get-IsOnWindowsOS)) {
Update-VersionInfoForDlls -buildArtifactsPath $buildArtifactsPath -versionInfoJsonPath "$PSScriptRoot/version-info.json"
}

11 changes: 7 additions & 4 deletions custom-steps/hunspell/post-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ param (
[Parameter(Mandatory=$true)][string]$BuildArtifactsPath,
[Parameter(Mandatory=$false)][string]$PackageAndFeatures,
[Parameter(Mandatory=$false)][string]$LinkType,
[Parameter(Mandatory=$false)][string]$BuildType
[Parameter(Mandatory=$false)][string]$BuildType,
[Parameter(Mandatory=$false)][string]$ModulesRoot
)

if ((Get-IsOnMacOS)) {
Remove-DylibSymlinks -BuildArtifactsPath $BuildArtifactsPath
$moduleName = "Build"
if(-not (Get-Module -Name $moduleName)) {
Import-Module "$ModulesRoot/$moduleName" -Force -DisableNameChecking
}
elseif ((Get-IsOnWindowsOS)) {

if((Get-IsOnWindowsOS)) {
Update-VersionInfoForDlls -buildArtifactsPath $buildArtifactsPath -versionInfoJsonPath "$PSScriptRoot/version-info.json"
}
10 changes: 0 additions & 10 deletions custom-steps/libpng/post-build.ps1

This file was deleted.

11 changes: 7 additions & 4 deletions custom-steps/libzip/post-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ param (
[Parameter(Mandatory=$true)][string]$BuildArtifactsPath,
[Parameter(Mandatory=$false)][string]$PackageAndFeatures,
[Parameter(Mandatory=$false)][string]$LinkType,
[Parameter(Mandatory=$false)][string]$BuildType
[Parameter(Mandatory=$false)][string]$BuildType,
[Parameter(Mandatory=$false)][string]$ModulesRoot
)

if ((Get-IsOnMacOS)) {
Remove-DylibSymlinks -BuildArtifactsPath $BuildArtifactsPath
$moduleName = "Build"
if(-not (Get-Module -Name $moduleName)) {
Import-Module "$ModulesRoot/$moduleName" -Force -DisableNameChecking
}
elseif((Get-IsOnWindowsOS)) {

if((Get-IsOnWindowsOS)) {
if($LinkType -eq "dynamic") {
Update-VersionInfoForDlls -buildArtifactsPath $BuildArtifactsPath -versionInfoJsonPath "$PSScriptRoot/version-info.json"
}
Expand Down
11 changes: 7 additions & 4 deletions custom-steps/minizip/post-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ param (
[Parameter(Mandatory=$true)][string]$BuildArtifactsPath,
[Parameter(Mandatory=$false)][string]$PackageAndFeatures,
[Parameter(Mandatory=$false)][string]$LinkType,
[Parameter(Mandatory=$false)][string]$BuildType
[Parameter(Mandatory=$false)][string]$BuildType,
[Parameter(Mandatory=$false)][string]$ModulesRoot
)

if ((Get-IsOnMacOS)) {
Remove-DylibSymlinks -BuildArtifactsPath $BuildArtifactsPath
$moduleName = "Build"
if(-not (Get-Module -Name $moduleName)) {
Import-Module "$ModulesRoot/$moduleName" -Force -DisableNameChecking
}
elseif((Get-IsOnWindowsOS)) {

if((Get-IsOnWindowsOS)) {
Update-VersionInfoForDlls -buildArtifactsPath $buildArtifactsPath -versionInfoJsonPath "$PSScriptRoot/version-info.json"
}
10 changes: 0 additions & 10 deletions custom-steps/opencv4/post-build.ps1

This file was deleted.

11 changes: 7 additions & 4 deletions custom-steps/pango/post-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ param (
[Parameter(Mandatory=$true)][string]$BuildArtifactsPath,
[Parameter(Mandatory=$false)][string]$PackageAndFeatures,
[Parameter(Mandatory=$false)][string]$LinkType,
[Parameter(Mandatory=$false)][string]$BuildType
[Parameter(Mandatory=$false)][string]$BuildType,
[Parameter(Mandatory=$false)][string]$ModulesRoot
)

if ((Get-IsOnMacOS)) {
Remove-DylibSymlinks -BuildArtifactsPath $BuildArtifactsPath
$moduleName = "Build"
if(-not (Get-Module -Name $moduleName)) {
Import-Module "$ModulesRoot/$moduleName" -Force -DisableNameChecking
}
elseif((Get-IsOnWindowsOS)) {

if((Get-IsOnWindowsOS)) {
Update-VersionInfoForDlls -buildArtifactsPath $buildArtifactsPath -versionInfoJsonPath "$PSScriptRoot/version-info.json"
}
10 changes: 0 additions & 10 deletions custom-steps/skia/post-build.ps1

This file was deleted.

8 changes: 7 additions & 1 deletion custom-steps/tinyxml/post-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ param (
[Parameter(Mandatory=$true)][string]$BuildArtifactsPath,
[Parameter(Mandatory=$false)][string]$PackageAndFeatures,
[Parameter(Mandatory=$false)][string]$LinkType,
[Parameter(Mandatory=$false)][string]$BuildType
[Parameter(Mandatory=$false)][string]$BuildType,
[Parameter(Mandatory=$false)][string]$ModulesRoot
)

$moduleName = "Build"
if(-not (Get-Module -Name $moduleName)) {
Import-Module "$ModulesRoot/$moduleName" -Force -DisableNameChecking
}

Write-Message "Test: Running post-build script..."
if (-not (Get-IsOnMacOS)) {
Write-Message "> Running on Windows!"
Expand Down
12 changes: 9 additions & 3 deletions custom-steps/whispercpp/post-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ param (
[Parameter(Mandatory=$true)][string]$BuildArtifactsPath,
[Parameter(Mandatory=$false)][string]$PackageAndFeatures,
[Parameter(Mandatory=$false)][string]$LinkType,
[Parameter(Mandatory=$false)][string]$BuildType
[Parameter(Mandatory=$false)][string]$BuildType,
[Parameter(Mandatory=$false)][string]$ModulesRoot
)

if ((Get-IsOnWindowsOS)) {
$moduleName = "Build"
if(-not (Get-Module -Name $moduleName)) {
Import-Module "$ModulesRoot/$moduleName" -Force -DisableNameChecking
}

if((Get-IsOnWindowsOS)) {
Update-VersionInfoForDlls -buildArtifactsPath $buildArtifactsPath -versionInfoJsonPath "$PSScriptRoot/version-info.json"
}
}
6 changes: 3 additions & 3 deletions custom-triplets/arm64-osx-dynamic-release.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ set(VCPKG_OSX_ARCHITECTURES arm64)

set(VCPKG_BUILD_TYPE release)

set(VCPKG_C_FLAGS -mmacosx-version-min=11.0)
set(VCPKG_CXX_FLAGS -mmacosx-version-min=11.0)
set(VCPKG_LINKER_FLAGS -mmacosx-version-min=11.0)
set(VCPKG_C_FLAGS "-mmacosx-version-min=11.0 -g2 -gdwarf-2")
set(VCPKG_CXX_FLAGS "-mmacosx-version-min=11.0 -g2 -gdwarf-2")
set(VCPKG_LINKER_FLAGS -mmacosx-version-min=11.0)
4 changes: 2 additions & 2 deletions custom-triplets/arm64-osx-static-release.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ set(VCPKG_OSX_ARCHITECTURES arm64)

set(VCPKG_BUILD_TYPE release)

set(VCPKG_C_FLAGS -mmacosx-version-min=11.0)
set(VCPKG_CXX_FLAGS -mmacosx-version-min=11.0)
set(VCPKG_C_FLAGS "-mmacosx-version-min=11.0 -g2 -gdwarf-2")
set(VCPKG_CXX_FLAGS "-mmacosx-version-min=11.0 -g2 -gdwarf-2")
set(VCPKG_LINKER_FLAGS -mmacosx-version-min=11.0)
4 changes: 2 additions & 2 deletions custom-triplets/x64-osx-dynamic-release.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES x86_64)
set(VCPKG_BUILD_TYPE release)

set(VCPKG_C_FLAGS -mmacosx-version-min=11.0)
set(VCPKG_CXX_FLAGS -mmacosx-version-min=11.0)
set(VCPKG_C_FLAGS "-mmacosx-version-min=11.0 -g2 -gdwarf-2")
set(VCPKG_CXX_FLAGS "-mmacosx-version-min=11.0 -g2 -gdwarf-2")
set(VCPKG_LINKER_FLAGS -mmacosx-version-min=11.0)
4 changes: 2 additions & 2 deletions custom-triplets/x64-osx-static-release.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES x86_64)
set(VCPKG_BUILD_TYPE release)

set(VCPKG_C_FLAGS -mmacosx-version-min=11.0)
set(VCPKG_CXX_FLAGS -mmacosx-version-min=11.0)
set(VCPKG_C_FLAGS "-mmacosx-version-min=11.0 -g2 -gdwarf-2")
set(VCPKG_CXX_FLAGS "-mmacosx-version-min=11.0 -g2 -gdwarf-2")
set(VCPKG_LINKER_FLAGS -mmacosx-version-min=11.0)
File renamed without changes.
Loading