trigger:
- master

pool:
  vmImage: 'ubuntu-latest'

jobs:
- job: Setup
  steps:
  - script: git submodule update --recursive --init
  - script: nuget restore SpaceStation14.sln

- job: Test
  dependsOn: Setup
  steps:
  - script: msbuild SpaceStation14.sln /p:Configuration=Debug /p:Platform=x64 /nologo /m SpaceStation14.sln
  - script: mono packages/nunit.consolerunner/3.10.0/tools/nunit3-console.exe bin/Content.Tests/Content.Tests.dll bin/Content.IntegrationTests/Content.IntegrationTests.dll

- job: Package
  dependsOn: Test
  steps:
  - script: Tools/package_release_build.py -p windows mac linux
  - script: mv release/*.zip $(Build.ArtifactStagingDirectory)
  - task: PublishPipelineArtifact@1
    inputs:
      path: '$(Build.ArtifactStagingDirectory)'
      artifactName: 'Builds'
