From b1165ee7c1a3096fc3cc076fca6048c90f965534 Mon Sep 17 00:00:00 2001 From: Qstick Date: Fri, 24 Dec 2021 11:54:40 -0600 Subject: [PATCH] New: Add osx-arm64 and linux-musl-arm builds --- azure-pipelines.yml | 23 +++++++++++++++---- build.sh | 19 ++++++++------- src/Directory.Build.props | 2 +- src/NzbDrone.Common/Lidarr.Common.csproj | 2 +- .../Lidarr.Mono.Test.csproj | 2 +- src/NzbDrone.Mono/Lidarr.Mono.csproj | 2 +- 6 files changed, 34 insertions(+), 16 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 67f89a846..95fb5ed29 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -259,20 +259,35 @@ stages: includeRootFolder: false rootFolderOrFile: $(artifactsFolder)/win-x86/net6.0 - task: ArchiveFiles@2 - displayName: Create MacOS Core app + displayName: Create MacOS Core X64 app inputs: archiveFile: '$(Build.ArtifactStagingDirectory)/Lidarr.$(buildName).osx-app-core-x64.zip' archiveType: 'zip' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/macos-app/net6.0 + rootFolderOrFile: $(artifactsFolder)/osx-x64-app/net6.0 - task: ArchiveFiles@2 - displayName: Create MacOS Core tar + displayName: Create MacOS Core Arm64 app + inputs: + archiveFile: '$(Build.ArtifactStagingDirectory)/Lidarr.$(buildName).osx-app-core-arm64.zip' + archiveType: 'zip' + includeRootFolder: false + rootFolderOrFile: $(artifactsFolder)/osx-arm64-app/net6.0 + - task: ArchiveFiles@2 + displayName: Create MacOS Core X64 tar inputs: archiveFile: '$(Build.ArtifactStagingDirectory)/Lidarr.$(buildName).osx-core-x64.tar.gz' archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/macos/net6.0 + rootFolderOrFile: $(artifactsFolder)/osx-x64/net6.0 + - task: ArchiveFiles@2 + displayName: Create ARM64 Linux Core tar + inputs: + archiveFile: '$(Build.ArtifactStagingDirectory)/Lidarr.$(buildName).osx-core-arm64.tar.gz' + archiveType: 'tar' + tarCompression: 'gz' + includeRootFolder: false + rootFolderOrFile: $(artifactsFolder)/osx-arm64/net6.0 - task: ArchiveFiles@2 displayName: Create Linux Core tar inputs: diff --git a/build.sh b/build.sh index 16f6c2580..4b181d348 100755 --- a/build.sh +++ b/build.sh @@ -143,12 +143,13 @@ PackageLinux() PackageMacOS() { local framework="$1" + local runtime="$2" - ProgressStart "Creating MacOS Package for $framework" + ProgressStart "Creating $runtime Package for $framework" - local folder=$artifactsFolder/macos/$framework/Lidarr + local folder=$artifactsFolder/$runtime/$framework/Lidarr - PackageFiles "$folder" "$framework" "osx-x64" + PackageFiles "$folder" "$framework" "$runtime" echo "Removing Service helpers" rm -f $folder/ServiceUninstall.* @@ -170,10 +171,11 @@ PackageMacOS() PackageMacOSApp() { local framework="$1" + local runtime="$2" - ProgressStart "Creating macOS App Package for $framework" + ProgressStart "Creating $runtime App Package for $framework" - local folder=$artifactsFolder/macos-app/$framework + local folder=$artifactsFolder/$runtime-app/$framework rm -rf $folder mkdir -p $folder @@ -181,7 +183,7 @@ PackageMacOSApp() mkdir -p $folder/Lidarr.app/Contents/MacOS echo "Copying Binaries" - cp -r $artifactsFolder/macos/$framework/Lidarr/* $folder/Lidarr.app/Contents/MacOS + cp -r $artifactsFolder/$runtime/$framework/Lidarr/* $folder/Lidarr.app/Contents/MacOS echo "Removing Update Folder" rm -r $folder/Lidarr.app/Contents/MacOS/Lidarr.Update @@ -228,8 +230,8 @@ Package() PackageWindows "$framework" "$runtime" ;; osx) - PackageMacOS "$framework" - PackageMacOSApp "$framework" + PackageMacOS "$framework" "$runtime" + PackageMacOSApp "$framework" "$runtime" ;; esac } @@ -373,6 +375,7 @@ then Package "net6.0" "linux-musl-arm64" Package "net6.0" "linux-arm" Package "net6.0" "osx-x64" + Package "net6.0" "osx-arm64" if [ "$ENABLE_BSD" = "YES" ]; then Package "net6.0" "freebsd-x64" diff --git a/src/Directory.Build.props b/src/Directory.Build.props index c2b008847..0a200ad25 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -5,7 +5,7 @@ false AnyCPU true - win-x64;win-x86;osx-x64;linux-x64;linux-musl-x64;linux-arm;linux-arm64;linux-musl-arm64 + win-x64;win-x86;osx-x64;osx-arm64;linux-x64;linux-musl-x64;linux-arm;linux-arm64;linux-musl-arm64 $(MSBuildThisFileDirectory)..\ diff --git a/src/NzbDrone.Common/Lidarr.Common.csproj b/src/NzbDrone.Common/Lidarr.Common.csproj index bb21b4bdd..f7bf70bb9 100644 --- a/src/NzbDrone.Common/Lidarr.Common.csproj +++ b/src/NzbDrone.Common/Lidarr.Common.csproj @@ -15,7 +15,7 @@ - + diff --git a/src/NzbDrone.Mono.Test/Lidarr.Mono.Test.csproj b/src/NzbDrone.Mono.Test/Lidarr.Mono.Test.csproj index e2105f5fe..e4304df24 100644 --- a/src/NzbDrone.Mono.Test/Lidarr.Mono.Test.csproj +++ b/src/NzbDrone.Mono.Test/Lidarr.Mono.Test.csproj @@ -3,7 +3,7 @@ net6.0 - + diff --git a/src/NzbDrone.Mono/Lidarr.Mono.csproj b/src/NzbDrone.Mono/Lidarr.Mono.csproj index 27115264f..dadbf7005 100644 --- a/src/NzbDrone.Mono/Lidarr.Mono.csproj +++ b/src/NzbDrone.Mono/Lidarr.Mono.csproj @@ -5,7 +5,7 @@ - +