Skip to content

Commit

Permalink
Merged Pull Request '#362 arm-4.5->version/4.5: version/4.5: build os…
Browse files Browse the repository at this point in the history
…x-arm64 on macos arm64 runner'

version/4.5: build osx-arm64 on macos arm64 runner
  • Loading branch information
Automation51D authored Dec 23, 2024
2 parents 52d96d3 + 5c9207f commit e2fe9b6
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 @@ -38,6 +38,7 @@ if([String]::IsNullOrEmpty($Version) -eq $False) {
Push-Location $ExamplesRepoPath

Write-Output "Running Nuget Restore"
dotnet nuget list source
nuget restore
}
finally {
Expand All @@ -47,15 +48,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 @@ -79,7 +80,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 e2fe9b6

Please sign in to comment.