Advertisement
Guest User

Example Azure SBCL

a guest
Aug 3rd, 2019
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 4.60 KB | None | 0 0
  1. trigger:
  2.   branches:
  3.     include: ['*']
  4.   tags:
  5.     include: ['*']
  6.  
  7. jobs:
  8.   - job: 'Cross'
  9.     strategy:
  10.       matrix:
  11.         win:
  12.           target: 'x86_64-windows-10'
  13.           imageName: 'vs2017-win2016'
  14.         gnu:
  15.           target: 'x86_64-unknown-linux-gnu'
  16.           imageName: 'ubuntu-16.04'
  17.         mac:
  18.           target: 'x86_64-apple-darwin'
  19.           imageName: 'macos-10.13'
  20.     pool:
  21.       vmImage: $(imageName)
  22.     steps:
  23.       - bash: |
  24.          DATE="$(date +%Y-%m-%d)"
  25.           echo "##vso[task.setvariable variable=build.date]$DATE"
  26.         displayName: "Create date variable"
  27.       - bash: |
  28.          MY_TAG="$(Build.SourceBranch)"
  29.           MY_TAG=${MY_TAG#refs/tags/}
  30.           echo $MY_TAG
  31.           echo "##vso[task.setvariable variable=build.my_tag]1"
  32.         displayName: "Create my tag variable"
  33.       - script: |
  34.          sudo apt-get update && sudo apt-get install -y --no-install-recommends gnupg ca-certificates && sudo echo "deb http://ppa.launchpad.net/darabi/lisp/ubuntu bionic main" > /etc/apt/sources.list.d/darabi-lisp.list && apt-key add /tmp/launchpad-ppa-gpg.key
  35.           sudo apt-get update && sudo apt-get install -y --no-install-recommends sbcl    
  36.         displayName: Linux Install SBCL
  37.         condition: eq( variables['Agent.OS'], 'Linux' )
  38.       - script: |
  39.            curl -L https://sourceforge.net/projects/sbcl/files/sbcl/1.4.14/sbcl-1.4.14-x86-64-windows-binary.msi/download?use_mirror=pilotfiber > windows.msi
  40.             msiexec.exe /qn /i windows.msi
  41.             @echo ##vso[task.prependpath]C:\Program Files\sbcl\bin\
  42.             @echo ##vso[task.setvariable variable=sbcl_home]C:\Program Files\sbcl\lib\sbcl
  43.         displayName: Windows Install SBCL
  44.         condition: eq( variables['Agent.OS'], 'Windows_NT' )
  45.       - script: |
  46.            curl -L https://sourceforge.net/projects/sbcl/files/sbcl/1.2.11/sbcl-1.2.11-x86-64-darwin-binary.tar.bz2/download?use_mirror=astuteinternet > darwin.tar.bz2
  47.             bzip2 -cd darwin.tar.bz2 | tar xvf -
  48.             cd sbcl-1.2.11-x86-64-darwin
  49.             sh install.sh
  50.         displayName: Mac Install SBCL
  51.         condition: eq( variables['Agent.OS'], 'Darwin' )
  52.       - script: |
  53.            git clone https://github.com/sbcl/sbcl
  54.             cd sbcl
  55.             sh make.sh --prefix=$SBCL_HOME --with-sb-linkable-runtime --with-sb-dynamic-core --fancy --with-sb-core-compression --with-sb-xref-for-internals
  56.             sudo sh install.sh
  57.         displayName: Build Special SBCL
  58.         condition: ne( variables['Agent.OS'], 'Windows_NT' )
  59.       - bash: |
  60.            git clone https://github.com/sbcl/sbcl
  61.             cd sbcl
  62.             export PATH="/c/Program Files/Steel Bank Common Lisp/1.4.14:$PATH"
  63.             export SBCL_HOME="/c/Program Files/Steel Bank Common Lisp/1.4.14"
  64.             sh make.sh --with-sb-linkable-runtime --with-sb-dynamic-core --fancy --with-sb-core-compression --with-sb-xref-for-internals
  65.             export SBCL_HOME=""
  66.             sh install.sh
  67.         displayName: Windows Build Special SBCL
  68.         condition: eq( variables['Agent.OS'], 'Windows_NT' )
  69.       - bash: |
  70.            cd $HOME
  71.             curl -O http://beta.quicklisp.org/quicklisp.lisp
  72.             sbcl --load quicklisp.lisp --eval '(quicklisp-quickstart:install)' --eval '(ql-util:without-prompting (quicklisp:add-to-init-file))' --eval '(quit)'
  73.         displayName: Install Quicklisp
  74.       - script: |
  75.            make
  76.         displayName: Build Artifacts
  77.       - task: CopyFiles@2
  78.         displayName: Copy assets
  79.         inputs:
  80.           sourceFolder: '$(Build.SourcesDirectory)'
  81.           contents: |
  82.            main
  83.             main.exe
  84.             exlib/libexample.so
  85.             exlib/libexample.dll
  86.           targetFolder: '$(Build.BinariesDirectory)'
  87.       - task: ArchiveFiles@2
  88.         displayName: Gather assets
  89.         inputs:
  90.           rootFolderOrFile: '$(Build.BinariesDirectory)'
  91.           archiveType: 'tar'
  92.           tarCompression: 'gz'
  93.           archiveFile: '$(Build.ArtifactStagingDirectory)/main-$(TARGET).tar.gz'
  94.       - task: GithubRelease@0
  95.         condition: and(succeeded(), succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
  96.         inputs:
  97.           gitHubConnection: 'gluaxspeed'
  98.           repositoryName: '$(Build.Repository.Name)'
  99.           action: 'edit'
  100.           target: '$(build.sourceVersion)'
  101.           tagSource: 'manual'
  102.           tag: '$(build.my_tag)'
  103.           assets: '$(Build.ArtifactStagingDirectory)/main-$(TARGET).tar.gz'
  104.           title: '$(build.my_tag)'
  105.           assetUploadMode: 'replace'
  106.           addChangeLog: false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement