This repository has been archived by the owner on Dec 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.azure_pipelines.yml
102 lines (101 loc) · 2.9 KB
/
.azure_pipelines.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
trigger:
- master
stages:
- stage: macOS
displayName: 'macOS'
jobs:
- job: macOSJob
displayName: 'macOS'
pool:
vmImage: 'macOS-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: 'Install Node.js'
- script: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
displayName: 'Install Rust'
- script: |
rustc --version --verbose
cargo --version --verbose
displayName: 'Print Rust and Cargo Versions'
- script: |
cd electron
npm install
npm run dist:mac -- --out $(Build.ArtifactStagingDirectory)/mac
displayName: 'Build App'
- task: PublishBuildArtifacts@1
displayName: 'Upload Artifact'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'Rust Electron'
publishLocation: 'Container'
- stage: linux
displayName: 'linux'
# Run in parallel
dependsOn: []
jobs:
- job: linuxJob
displayName: 'linux'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: 'Install Node.js'
- script: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
displayName: 'Install Rust'
- script: |
rustc --version --verbose
cargo --version --verbose
displayName: 'Print Rust and Cargo Versions'
- script: |
cd electron
npm install
npm run dist -- --out $(Build.ArtifactStagingDirectory)/linux
displayName: 'Build App'
- task: PublishBuildArtifacts@1
displayName: 'Upload Artifact'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'Rust Electron'
publishLocation: 'Container'
- stage: windows
displayName: 'Windows'
# Run in parallel
dependsOn: []
jobs:
- job: windowsJob
displayName: 'Windows'
pool:
vmImage: 'windows-latest'
steps:
- task: UsePythonVersion@0
displayName: 'Switch to Python 2.7'
inputs:
versionSpec: '2.7'
addToPath: true
- script: |
rustc --version --verbose
cargo --version --verbose
python --version
displayName: 'Print Rust/Cargo/Python Versions'
- script: |
cd electron
npm install
displayName: 'npm install'
- script: |
cd electron
npm run dist:windows -- --src ./rust-electron-win32-x64 --dest $(Build.ArtifactStagingDirectory)/windows
displayName: 'Build App'
- task: PublishBuildArtifacts@1
displayName: 'Upload Artifact'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'Rust Electron'
publishLocation: 'Container'