forked from hez2010/H-Judge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hjudge_ci.yml
78 lines (76 loc) · 2.4 KB
/
hjudge_ci.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
pool:
vmImage: 'windows-latest'
trigger:
- master
- develop
steps:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '3.1.102'
includePreviewVersions: false
- task: CmdLine@2
inputs:
script: |
cd hjudge.Exec.Windows
mkdir x64
cd x64
mkdir Release
cd ../../hjudge.Exec.Linux
mkdir target
cd target
mkdir release
cd ../..
- task: CmdLine@2
inputs:
script: |
fake run build.fsx -t Build
- task: CmdLine@2
inputs:
script: |
fake run build.fsx -t Test
- task: ArchiveFiles@2
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
inputs:
rootFolderOrFile: 'hjudge.JudgeHost/src/bin/Release/netcoreapp3.1/publish'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/hjudge.JudgeHost.zip'
replaceExistingArchive: true
- task: ArchiveFiles@2
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
inputs:
rootFolderOrFile: 'hjudge.FileHost/src/bin/Release/netcoreapp3.1/publish'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/hjudge.FileHost.zip'
replaceExistingArchive: true
- task: ArchiveFiles@2
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
inputs:
rootFolderOrFile: 'hjudge.WebHost/src/bin/Release/netcoreapp3.1/publish'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/hjudge.WebHost.zip'
replaceExistingArchive: true
- task: ArchiveFiles@2
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
inputs:
rootFolderOrFile: 'hjudge.Exec.Windows/x64/Release'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/hjudge.Exec.Windows.zip'
replaceExistingArchive: true
- task: ArchiveFiles@2
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
inputs:
rootFolderOrFile: 'hjudge.Exec.Linux/target/release'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/hjudge.Exec.Linux.zip'
replaceExistingArchive: true
- task: PublishPipelineArtifact@1
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'hjudge_artifacts_$(Build.BuildId)'