This repository has been archived by the owner on Apr 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge Mac, Windows and Linux pipelines
- Loading branch information
Showing
4 changed files
with
99 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core | ||
|
||
# Windows | ||
jobs: | ||
- job: Windows | ||
pool: | ||
vmImage: 'VS2017-Win2016' | ||
|
||
variables: | ||
buildConfiguration: 'Release' | ||
|
||
steps: | ||
- script: dotnet restore | ||
displayName: 'dotnet restore' | ||
workingDirectory: $(Build.SourcesDirectory)\src\Tel.Egram | ||
- script: dotnet publish -c $(buildConfiguration) -r win-x64 | ||
displayName: 'dotnet publish $(buildConfiguration)' | ||
workingDirectory: $(Build.SourcesDirectory)\src\Tel.Egram | ||
- script: | | ||
copy C:\Users\%USERNAME%\.nuget\packages\skiasharp\1.60.0\runtimes\win7-x64\native\libSkiaSharp.dll $(Build.SourcesDirectory)\src\Tel.Egram\bin\$(buildConfiguration)\netcoreapp2.1\win-x64\publish | ||
copy C:\Users\%USERNAME%\.nuget\packages\tdlib.native\1.3.0\runtimes\win-x64\native\LIBEAY32.dll $(Build.SourcesDirectory)\src\Tel.Egram\bin\$(buildConfiguration)\netcoreapp2.1\win-x64\publish | ||
copy C:\Users\%USERNAME%\.nuget\packages\tdlib.native\1.3.0\runtimes\win-x64\native\SSLEAY32.dll $(Build.SourcesDirectory)\src\Tel.Egram\bin\$(buildConfiguration)\netcoreapp2.1\win-x64\publish | ||
copy C:\Users\%USERNAME%\.nuget\packages\tdlib.native\1.3.0\runtimes\win-x64\native\tdjson.dll $(Build.SourcesDirectory)\src\Tel.Egram\bin\$(buildConfiguration)\netcoreapp2.1\win-x64\publish | ||
copy C:\Users\%USERNAME%\.nuget\packages\tdlib.native\1.3.0\runtimes\win-x64\native\zlib1.dll $(Build.SourcesDirectory)\src\Tel.Egram\bin\$(buildConfiguration)\netcoreapp2.1\win-x64\publish | ||
displayName: 'copy native dependencies' | ||
workingDirectory: $(Build.SourcesDirectory)\src\Tel.Egram | ||
- powershell: | | ||
Invoke-WebRequest -Uri https://github.com/egramtel/nsis/raw/master/nsis.zip -OutFile $(Build.SourcesDirectory)\build\nsis\nsis.zip | ||
Expand-Archive -Path $(Build.SourcesDirectory)\build\nsis\nsis.zip -DestinationPath $(Build.SourcesDirectory)/build/nsis | ||
displayName: 'download-nsis' | ||
- script: | | ||
copy $(Build.SourcesDirectory)\build\nsis\64bit\installer.nsi $(Build.SourcesDirectory)\src\Tel.Egram\bin\$(buildConfiguration)\netcoreapp2.1\win-x64\publish | ||
$(Build.SourcesDirectory)\build\nsis\makensis.exe $(Build.SourcesDirectory)\src\Tel.Egram\bin\$(buildConfiguration)\netcoreapp2.1\win-x64\publish\installer.nsi | ||
copy $(Build.SourcesDirectory)\src\Tel.Egram\bin\$(buildConfiguration)\netcoreapp2.1\win-x64\publish\egram-setup.exe $(Build.ArtifactStagingDirectory) | ||
displayName: 'build-nsis' | ||
- task: PublishPipelineArtifact@0 | ||
inputs: | ||
artifactName: 'installer' | ||
targetPath: $(Build.ArtifactStagingDirectory) | ||
|
||
# Linux | ||
- job: Linux | ||
pool: | ||
vmImage: 'Ubuntu-16.04' | ||
|
||
variables: | ||
buildConfiguration: 'Release' | ||
|
||
steps: | ||
- script: dotnet restore | ||
displayName: 'dotnet restore' | ||
workingDirectory: $(Build.SourcesDirectory)/src/Tel.Egram | ||
- script: dotnet publish -c $(buildConfiguration) -r linux-x64 | ||
displayName: 'dotnet publish $(buildConfiguration)' | ||
workingDirectory: $(Build.SourcesDirectory)/src/Tel.Egram | ||
- script: | | ||
cp $HOME/.nuget/packages/avalonia.skia.linux.natives/1.60.0.1/runtimes/linux-x64/native/libSkiaSharp.so $(Build.SourcesDirectory)/src/Tel.Egram/bin/$(buildConfiguration)/netcoreapp2.1/linux-x64/publish | ||
cp $HOME/.nuget/packages/tdlib.native/1.3.0/runtimes/linux-x64/native/libtdjson.so $(Build.SourcesDirectory)/src/Tel.Egram/bin/$(buildConfiguration)/netcoreapp2.1/linux-x64/publish | ||
displayName: 'copy native dependencies' | ||
workingDirectory: $(Build.SourcesDirectory)/src/Tel.Egram | ||
- script: | | ||
tar -cvzf egram-x64.tar.gz --directory=$(Build.SourcesDirectory)/src/Tel.Egram/bin/$(buildConfiguration)/netcoreapp2.1/linux-x64 publish | ||
cp $(Build.SourcesDirectory)/src/Tel.Egram/*.tar.gz $(Build.ArtifactStagingDirectory) | ||
displayName: 'archive binaries' | ||
workingDirectory: $(Build.SourcesDirectory)/src/Tel.Egram | ||
- task: PublishPipelineArtifact@0 | ||
inputs: | ||
artifactName: 'tarball' | ||
targetPath: $(Build.ArtifactStagingDirectory) | ||
|
||
# MacOS | ||
- job: MacOS | ||
pool: | ||
vmImage: 'xcode9-macos10.13' | ||
|
||
variables: | ||
buildConfiguration: 'Release' | ||
|
||
steps: | ||
- script: dotnet restore | ||
displayName: 'dotnet restore' | ||
workingDirectory: $(Build.SourcesDirectory)/src/Tel.Egram | ||
- script: dotnet bundle -c $(buildConfiguration) -r osx-x64 | ||
displayName: 'dotnet bundle $(buildConfiguration)' | ||
workingDirectory: $(Build.SourcesDirectory)/src/Tel.Egram | ||
- script: | | ||
cp $HOME/.nuget/packages/skiasharp/1.60.0/runtimes/osx/native/libSkiaSharp.dylib $(Build.SourcesDirectory)/src/Tel.Egram/bin/$(buildConfiguration)/netcoreapp2.1/osx-x64/publish/Egram.app/Contents/MacOS | ||
cp $HOME/.nuget/packages/tdlib.native/1.3.0/runtimes/osx-x64/native/libtdjson.dylib $(Build.SourcesDirectory)/src/Tel.Egram/bin/$(buildConfiguration)/netcoreapp2.1/osx-x64/publish/Egram.app/Contents/MacOS | ||
displayName: 'copy native dependencies' | ||
workingDirectory: $(Build.SourcesDirectory)/src/Tel.Egram | ||
- script: | | ||
./build-dmg $(Build.SourcesDirectory)/src/Tel.Egram/bin/$(buildConfiguration)/netcoreapp2.1/osx-x64/publish/Egram.app | ||
cp *.dmg $(Build.ArtifactStagingDirectory) | ||
displayName: 'build-dmg' | ||
workingDirectory: $(Build.SourcesDirectory)/build/dmg-builder | ||
- task: PublishPipelineArtifact@0 | ||
inputs: | ||
artifactName: 'image' | ||
targetPath: $(Build.ArtifactStagingDirectory) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.