-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
120 lines (110 loc) · 3.99 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
stages:
- stage: Build
jobs:
- job: macOS
pool:
vmImage: 'macOS-latest'
variables:
AZP_CACHING_TAR: true
INSTALL_PADDING: "/3_______________________________________________/i"
CACHE_FOLDER: $(Pipeline.Workspace)/cache
ESY__CACHE_INSTALL_PATH: /Users/vsts/.esy/3____________________________________________________________________/i
steps:
- template: ./.ci/cache.yml
parameters:
ESY_PREFIX: $(ESY__PREFIX)
INSTALL_PADDING: $(INSTALL_PADDING)
HASH_FILE: esy.json | test.sh
- template: ./.ci/use-esy.yml
- bash: ./test.sh
displayName: "Test package"
- template: ./.ci/copy-install.yml
parameters:
platform: darwin
- template: ./.ci/prepare-cache.yml
- job: Linux
pool:
vmImage: 'Ubuntu-latest'
variables:
INSTALL_PADDING: "/3______________________________________________________________/i"
CACHE_FOLDER: $(Pipeline.Workspace)/cache
ESY__CACHE_INSTALL_PATH: /home/vsts/.esy/3_____________________________________________________________________/i
steps:
- template: ./.ci/cache.yml
parameters:
HASH_FILE: esy.json | test.sh
- template: ./.ci/use-esy.yml
- bash: ./test.sh
displayName: "Test package"
- template: ./.ci/copy-install.yml
parameters:
platform: linux
- template: ./.ci/prepare-cache.yml
# - job: Windows
# pool:
# vmImage: 'windows-latest'
# variables:
# AZP_CACHING_TAR: true
# INSTALL_PADDING: "\\3_\\i"
# CACHE_FOLDER: $(Pipeline.Workspace)\cache
# ESY__CACHE_INSTALL_PATH: C:\Users\VssAdministrator\.esy\3_\i
# steps:
# - template: ./.ci/cache.yml
# parameters:
# HASH_FILE: windows.json | test.sh
# - template: ./.ci/use-esy.yml
# - bash: mkdir -p test_dir
# displayName: 'make test dir'
# - bash: |
# echo '{"name": "esy-fswatch-prebuilx","esy": {"buildsInSource": "unsafe","build": "EsyPrebuiltApp.exe -action export -target \"#{self.root / os}\" -package \"#{esy-fswatch-prebuilt.install}\""}, "dependencies": {"esy-fswatch-prebuilt" : "ulrikstrid/esy-fswatch:windows.json#'$(git rev-parse --short HEAD)'", "esy-prebuilt-util": "0.1.5"}}' > package.json
# displayName: 'create test package.json'
# workingDirectory: test_dir
# - script: esy install
# displayName: 'Install esy-deps'
# workingDirectory: test_dir
# - script: esy build --verbose
# displayName: 'Build test project'
# workingDirectory: test_dir
# - script: esy b fswatch --help
# displayName: 'Test if fswatch is installed'
# workingDirectory: test_dir
# - script: esy b which fswatch
# displayName: 'Test if fswatch is installed'
# workingDirectory: test_dir
# - template: ./.ci/copy-install.yml
# parameters:
# platform: windows
# - template: ./.ci/prepare-cache.yml
- stage: Create_package
dependsOn: [Build]
jobs:
- job: Create_package
displayName: Create package
pool:
vmImage: 'macOS-latest'
steps:
- task: NodeTool@0
displayName: "Use Node 8.x"
inputs:
versionSpec: 8.x
- download: current
artifact: darwin
- download: current
artifact: linux
# - download: current
# artifact: windows
- script: |
mkdir -p $(Pipeline.Workspace)/package
cp ./.ci/package.json $(Pipeline.Workspace)/package/package.json
displayName: Copy the package.json
- script: |
mv $(Pipeline.Workspace)/darwin $(Pipeline.Workspace)/package
mv $(Pipeline.Workspace)/linux $(Pipeline.Workspace)/package
displayName: Move artifacts in place
- script: |
npm pack .
mv esy-fswatch-prebuilt-* esy-fswatch-prebuilt.tgz
displayName: npm pack
workingDirectory:
$(Pipeline.Workspace)/package
- upload: $(Pipeline.Workspace)/package/esy-fswatch-prebuilt.tgz