Skip to content
This repository has been archived by the owner on Apr 15, 2021. It is now read-only.

Commit

Permalink
Merge Mac, Windows and Linux pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
x2bool committed Dec 15, 2018
1 parent 78cfb8f commit 4146333
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 94 deletions.
99 changes: 99 additions & 0 deletions build/azure-pipelines.yml
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)
29 changes: 0 additions & 29 deletions build/pipelines-linux.yml

This file was deleted.

29 changes: 0 additions & 29 deletions build/pipelines-mac.yml

This file was deleted.

36 changes: 0 additions & 36 deletions build/pipelines-win.yml

This file was deleted.

0 comments on commit 4146333

Please sign in to comment.