Skip to content

Commit

Permalink
Merged Pull Request '#361 arm->main : build osx-arm64 package on arm6…
Browse files Browse the repository at this point in the history
…4 runner'

build osx-arm64 package on arm64 runner
  • Loading branch information
Automation51D authored Dec 23, 2024
2 parents c0cacbf + 677b93c commit d6429ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
22 changes: 7 additions & 15 deletions ci/build-package-requirements.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,13 @@ elseif ($IsWindows) {
}
elseif ($IsMacOS) {
$Subfolder = "macos"
$Archs = @("x64", "ARM64")
foreach($a in $Archs){
$ExtraArgs = ""
if ($a -eq "ARM64") {
$ExtraArgs += " -DCMAKE_OSX_ARCHITECTURES=arm64"
$ExtraArgs += " -DBUILD_TESTING=OFF"
}
./cxx/build-project.ps1 -RepoName $RepoName -ProjectDir $ProjectDir -Configuration "Release" -ExtraArgs $ExtraArgs -Arch $a
$PackageFolder = "package-files/$SubFolder/$a"
New-Item -Path $PackageFolder -ItemType Directory -Force
Copy-Item -Path $NativeFile -Destination "$PackageFolder/$NativeName" -Force

# CMake generates build files specific to the architecture. We are deleting the build folder to ensure clean build enviroment.
Remove-Item -LiteralPath "$RepoPath/$ProjectDir/build" -Force -Recurse -ErrorAction SilentlyContinue
}
./cxx/build-project.ps1 -RepoName $RepoName -ProjectDir $ProjectDir -Configuration "Release" -Arch $Arch
$PackageFolder = "package-files/$SubFolder/$Arch"
New-Item -Path $PackageFolder -ItemType Directory -Force
Copy-Item -Path $NativeFile -Destination "$PackageFolder/$NativeName" -Force

# CMake generates build files specific to the architecture. We are deleting the build folder to ensure clean build enviroment.
Remove-Item -LiteralPath "$RepoPath/$ProjectDir/build" -Force -Recurse -ErrorAction SilentlyContinue
}
else {
Write-Host "Unsupported OS."
Expand Down
7 changes: 4 additions & 3 deletions ci/run-integration-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ if([String]::IsNullOrEmpty($Version) -eq $False) {
Push-Location $ExamplesRepoPath

Write-Output "Running Nuget Restore"
dotnet nuget list source
nuget restore
}
finally {
Expand All @@ -46,15 +47,15 @@ if([String]::IsNullOrEmpty($Version) -eq $False) {
}

$LocalFeed = [IO.Path]::Combine($Home, ".nuget", "packages")

# Install the nuget packages to the local feed.
# The packages in the 'package' folder must be pushed to local feed and cannot be used directly,
# as all the other dependencies will already be installed in the local feed.
try{
Write-Output "Entering '$NugetPackageFolder' folder"
Push-Location "$NugetPackageFolder"

Write-Output "Pushing nuget packages to the local feed"
dotnet nuget add source "$LocalFeed"
dotnet nuget push "*.nupkg" -s "$LocalFeed"
}
finally{
Expand All @@ -78,7 +79,7 @@ if([String]::IsNullOrEmpty($Version) -eq $False) {
$NextFullName = $_.FullName
Write-Output ""
Write-Output "Will set the version of the DeviceDetection package to '$Version' in $NextFullName..."
dotnet add $NextFullName package "FiftyOne.DeviceDetection" --version $Version --source "$LocalFeed"
dotnet add $NextFullName package "FiftyOne.DeviceDetection" --version $Version
Write-Output "Did set the version of the DeviceDetection package to '$Version' in $NextFullName..."
Write-Output ""
}
Expand Down

0 comments on commit d6429ad

Please sign in to comment.