/
build-test-freeze.yml
54 lines (53 loc) · 1.75 KB
/
build-test-freeze.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
steps:
- template: ./setup-variables.yml
parameters:
platform: ${{ parameters.platform }}
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
# Initial install will most likely fail on some platforms because
# noble won't build correctly, so don't && it against build/test
# steps.
- script: |
yarn
displayName: 'Install packages'
env: { "CI": "true" }
- script: |
yarn tslint
displayName: 'Lint'
env: { "CI": "true" }
- script: |
yarn build:main
displayName: 'Build'
env: { "CI": "true" }
- script: |
yarn test
displayName: 'Test'
# Mac has intermittent network errors that don't show up anywhere
# else. If linux fails, something is wrong. So test but ignore on
# mac for now.
condition: not(eq('${{ parameters.platform }}', 'macos-x64'))
env: { "CI": "true" }
- script: |
yarn workspace buttplug-server-cli freeze:${{ parameters.platform }}
displayName: 'Freeze server executable'
env: { "CI": "true" }
- task: CopyFiles@2
displayName: "Copy frozen executables to staging"
inputs:
sourceFolder: "$(System.DefaultWorkingDirectory)/packages/buttplug-server-cli/buttplug-node-server/"
contents: "*"
targetFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: true
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: "$(Build.ArtifactStagingDirectory)"
archiveFile: '$(Build.ArtifactStagingDirectory)/$(cliBuildName).zip'
includeRootFolder: false
archiveType: 'zip'
- task: PublishPipelineArtifact@0
displayName: "Publish frozen executables to artifacts"
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: '$(cliBuildName)'