Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
bbaff3d5
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
bbaff3d5
编写于
12月 24, 2020
作者:
A
Alexandru Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adopt `Cache@2` for node modules caching
上级
caaf2a07
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
289 addition
and
112 deletion
+289
-112
build/.cachesalt
build/.cachesalt
+1
-1
build/azure-pipelines/common/listNodeModules.js
build/azure-pipelines/common/listNodeModules.js
+40
-0
build/azure-pipelines/common/listNodeModules.ts
build/azure-pipelines/common/listNodeModules.ts
+46
-0
build/azure-pipelines/darwin/continuous-build-darwin.yml
build/azure-pipelines/darwin/continuous-build-darwin.yml
+20
-12
build/azure-pipelines/darwin/product-build-darwin.yml
build/azure-pipelines/darwin/product-build-darwin.yml
+21
-13
build/azure-pipelines/linux/continuous-build-linux.yml
build/azure-pipelines/linux/continuous-build-linux.yml
+20
-12
build/azure-pipelines/linux/product-build-alpine.yml
build/azure-pipelines/linux/product-build-alpine.yml
+19
-11
build/azure-pipelines/linux/product-build-linux.yml
build/azure-pipelines/linux/product-build-linux.yml
+20
-12
build/azure-pipelines/product-compile.yml
build/azure-pipelines/product-compile.yml
+19
-11
build/azure-pipelines/product-hygiene.yml
build/azure-pipelines/product-hygiene.yml
+20
-5
build/azure-pipelines/web/product-build-web.yml
build/azure-pipelines/web/product-build-web.yml
+19
-11
build/azure-pipelines/win32/continuous-build-win32.yml
build/azure-pipelines/win32/continuous-build-win32.yml
+22
-12
build/azure-pipelines/win32/product-build-win32.yml
build/azure-pipelines/win32/product-build-win32.yml
+22
-12
未找到文件。
build/.cachesalt
浏览文件 @
bbaff3d5
2020-12-
17T07:59:24.060
Z
2020-12-
24T09:02:57
Z
build/azure-pipelines/common/listNodeModules.js
0 → 100644
浏览文件 @
bbaff3d5
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
const
fs
=
require
(
"
fs
"
);
const
path
=
require
(
"
path
"
);
if
(
process
.
argv
.
length
!==
3
)
{
console
.
error
(
'
Usage: node listNodeModules.js OUTPUT_FILE
'
);
process
.
exit
(
-
1
);
}
const
ROOT
=
path
.
join
(
__dirname
,
'
../../../
'
);
function
findNodeModulesFiles
(
location
,
inNodeModules
,
result
)
{
const
entries
=
fs
.
readdirSync
(
path
.
join
(
ROOT
,
location
));
for
(
const
entry
of
entries
)
{
const
entryPath
=
`
${
location
}
/
${
entry
}
`
;
if
(
/
(
^
\/
out
)
|
(
^
\/
src$
)
|
(
^
\/
.git$
)
|
(
^
\/
.build$
)
/
.
test
(
entryPath
))
{
continue
;
}
let
stat
;
try
{
stat
=
fs
.
statSync
(
path
.
join
(
ROOT
,
entryPath
));
}
catch
(
err
)
{
continue
;
}
if
(
stat
.
isDirectory
())
{
findNodeModulesFiles
(
entryPath
,
inNodeModules
||
(
entry
===
'
node_modules
'
),
result
);
}
else
{
if
(
inNodeModules
)
{
result
.
push
(
entryPath
.
substr
(
1
));
}
}
}
}
const
result
=
[];
findNodeModulesFiles
(
''
,
false
,
result
);
fs
.
writeFileSync
(
process
.
argv
[
2
],
result
.
join
(
'
\n
'
)
+
'
\n
'
);
build/azure-pipelines/common/listNodeModules.ts
0 → 100644
浏览文件 @
bbaff3d5
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
*
as
fs
from
'
fs
'
;
import
*
as
path
from
'
path
'
;
if
(
process
.
argv
.
length
!==
3
)
{
console
.
error
(
'
Usage: node listNodeModules.js OUTPUT_FILE
'
);
process
.
exit
(
-
1
);
}
const
ROOT
=
path
.
join
(
__dirname
,
'
../../../
'
);
function
findNodeModulesFiles
(
location
:
string
,
inNodeModules
:
boolean
,
result
:
string
[])
{
const
entries
=
fs
.
readdirSync
(
path
.
join
(
ROOT
,
location
));
for
(
const
entry
of
entries
)
{
const
entryPath
=
`
${
location
}
/
${
entry
}
`
;
if
(
/
(
^
\/
out
)
|
(
^
\/
src$
)
|
(
^
\/
.git$
)
|
(
^
\/
.build$
)
/
.
test
(
entryPath
))
{
continue
;
}
let
stat
:
fs
.
Stats
;
try
{
stat
=
fs
.
statSync
(
path
.
join
(
ROOT
,
entryPath
));
}
catch
(
err
)
{
continue
;
}
if
(
stat
.
isDirectory
())
{
findNodeModulesFiles
(
entryPath
,
inNodeModules
||
(
entry
===
'
node_modules
'
),
result
);
}
else
{
if
(
inNodeModules
)
{
result
.
push
(
entryPath
.
substr
(
1
));
}
}
}
}
const
result
:
string
[]
=
[];
findNodeModulesFiles
(
''
,
false
,
result
);
fs
.
writeFileSync
(
process
.
argv
[
2
],
result
.
join
(
'
\n
'
)
+
'
\n
'
);
build/azure-pipelines/darwin/continuous-build-darwin.yml
浏览文件 @
bbaff3d5
...
...
@@ -12,29 +12,37 @@ steps:
node build/azure-pipelines/common/computeNodeModulesCacheKey.js > .build/yarnlockhash
displayName
:
Prepare yarn cache flags
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
-
task
:
Cache@2
inputs
:
keyfile
:
"
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
vscode-build-cache"
key
:
'
continuousNodeModules
|
$(Agent.OS)
|
.build/yarnlockhash'
path
:
.build/node_modules_cache
cacheHitVar
:
NODE_MODULES_RESTORED
displayName
:
Cache node_modules archive
-
script
:
|
set -e
tar -xzf .build/node_modules_cache/cache.tgz
condition
:
and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Extract node_modules archive
-
script
:
|
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
displayName
:
Install Dependencies
condition
:
and(succeeded(), ne(variables
['CacheRestored']
, 'true'))
condition
:
and(succeeded(), ne(variables
.NODE_MODULES_RESTORED
, 'true'))
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs
:
keyfile
:
"
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
vscode-build-cache"
condition
:
and(succeeded(), ne(variables['CacheRestored'], 'true'))
-
script
:
|
set -e
node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
mkdir -p .build/node_modules_cache
tar -czf .build/node_modules_cache/cache.tgz --files-from .build/node_modules_list.txt
condition
:
and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Create node_modules archive
-
script
:
|
set -e
yarn postinstall
displayName
:
Run postinstall scripts
condition
:
and(succeeded(), eq(variables
['CacheRestored']
, 'true'))
condition
:
and(succeeded(), eq(variables
.NODE_MODULES_RESTORED
, 'true'))
-
script
:
|
yarn electron x64
...
...
build/azure-pipelines/darwin/product-build-darwin.yml
浏览文件 @
bbaff3d5
...
...
@@ -58,11 +58,18 @@ steps:
node build/azure-pipelines/common/computeNodeModulesCacheKey.js $VSCODE_ARCH $ENABLE_TERRAPIN > .build/yarnlockhash
displayName
:
Prepare yarn cache flags
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
-
task
:
Cache@2
inputs
:
keyfile
:
"
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
npm-vscode"
key
:
'
nodeModules
|
$(Agent.OS)
|
.build/yarnlockhash'
path
:
.build/node_modules_cache
cacheHitVar
:
NODE_MODULES_RESTORED
displayName
:
Cache node_modules archive
-
script
:
|
set -e
tar -xzf .build/node_modules_cache/cache.tgz
condition
:
and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Extract node_modules archive
-
script
:
|
set -e
...
...
@@ -88,14 +95,15 @@ steps:
ELECTRON_SKIP_BINARY_DOWNLOAD
:
1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD
:
1
displayName
:
Install dependencies
condition
:
and(succeeded(), ne(variables
['CacheRestored']
, 'true'))
condition
:
and(succeeded(), ne(variables
.NODE_MODULES_RESTORED
, 'true'))
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs
:
keyfile
:
"
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
npm-vscode"
condition
:
and(succeeded(), ne(variables['CacheRestored'], 'true'))
-
script
:
|
set -e
node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
mkdir -p .build/node_modules_cache
tar -czf .build/node_modules_cache/cache.tgz --files-from .build/node_modules_list.txt
condition
:
and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Create node_modules archive
-
script
:
|
set -e
...
...
@@ -166,7 +174,7 @@ steps:
set -e
yarn --cwd test/integration/browser compile
displayName
:
Compile integration tests
condition
:
and(succeeded(), eq(variables
['CacheRestored']
, 'true'), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
condition
:
and(succeeded(), eq(variables
.NODE_MODULES_RESTORED
, 'true'), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
script
:
|
# Figure out the full absolute path of the product we just built
...
...
@@ -205,7 +213,7 @@ steps:
set -e
yarn --cwd test/smoke compile
displayName
:
Compile smoke tests
condition
:
and(succeeded(), eq(variables
['CacheRestored']
, 'true'), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
condition
:
and(succeeded(), eq(variables
.NODE_MODULES_RESTORED
, 'true'), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
script
:
|
set -e
...
...
build/azure-pipelines/linux/continuous-build-linux.yml
浏览文件 @
bbaff3d5
...
...
@@ -21,29 +21,37 @@ steps:
node build/azure-pipelines/common/computeNodeModulesCacheKey.js > .build/yarnlockhash
displayName
:
Prepare yarn cache flags
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
-
task
:
Cache@2
inputs
:
keyfile
:
"
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
vscode-build-cache"
key
:
'
continuousNodeModules
|
$(Agent.OS)
|
.build/yarnlockhash'
path
:
.build/node_modules_cache
cacheHitVar
:
NODE_MODULES_RESTORED
displayName
:
Cache node_modules archive
-
script
:
|
set -e
tar -xzf .build/node_modules_cache/cache.tgz
condition
:
and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Extract node_modules archive
-
script
:
|
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
displayName
:
Install Dependencies
condition
:
and(succeeded(), ne(variables
['CacheRestored']
, 'true'))
condition
:
and(succeeded(), ne(variables
.NODE_MODULES_RESTORED
, 'true'))
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs
:
keyfile
:
"
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
vscode-build-cache"
condition
:
and(succeeded(), ne(variables['CacheRestored'], 'true'))
-
script
:
|
set -e
node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
mkdir -p .build/node_modules_cache
tar -czf .build/node_modules_cache/cache.tgz --files-from .build/node_modules_list.txt
condition
:
and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Create node_modules archive
-
script
:
|
set -e
yarn postinstall
displayName
:
Run postinstall scripts
condition
:
and(succeeded(), eq(variables
['CacheRestored']
, 'true'))
condition
:
and(succeeded(), eq(variables
.NODE_MODULES_RESTORED
, 'true'))
-
script
:
|
yarn electron x64
...
...
build/azure-pipelines/linux/product-build-alpine.yml
浏览文件 @
bbaff3d5
...
...
@@ -61,11 +61,18 @@ steps:
node build/azure-pipelines/common/computeNodeModulesCacheKey.js "alpine" $ENABLE_TERRAPIN > .build/yarnlockhash
displayName
:
Prepare yarn cache flags
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
-
task
:
Cache@2
inputs
:
keyfile
:
"
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
npm-vscode"
key
:
'
nodeModules
|
$(Agent.OS)
|
.build/yarnlockhash'
path
:
.build/node_modules_cache
cacheHitVar
:
NODE_MODULES_RESTORED
displayName
:
Cache node_modules archive
-
script
:
|
set -e
tar -xzf .build/node_modules_cache/cache.tgz
condition
:
and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Extract node_modules archive
-
script
:
|
set -e
...
...
@@ -81,14 +88,15 @@ steps:
ELECTRON_SKIP_BINARY_DOWNLOAD
:
1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD
:
1
displayName
:
Install dependencies
condition
:
and(succeeded(), ne(variables
['CacheRestored']
, 'true'))
condition
:
and(succeeded(), ne(variables
.NODE_MODULES_RESTORED
, 'true'))
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs
:
keyfile
:
"
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
npm-vscode"
condition
:
and(succeeded(), ne(variables['CacheRestored'], 'true'))
-
script
:
|
set -e
node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
mkdir -p .build/node_modules_cache
tar -czf .build/node_modules_cache/cache.tgz --files-from .build/node_modules_list.txt
condition
:
and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Create node_modules archive
-
script
:
|
set -e
...
...
build/azure-pipelines/linux/product-build-linux.yml
浏览文件 @
bbaff3d5
...
...
@@ -52,11 +52,18 @@ steps:
node build/azure-pipelines/common/computeNodeModulesCacheKey.js $VSCODE_ARCH $ENABLE_TERRAPIN > .build/yarnlockhash
displayName
:
Prepare yarn cache flags
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
-
task
:
Cache@2
inputs
:
keyfile
:
"
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
npm-vscode"
key
:
'
nodeModules
|
$(Agent.OS)
|
.build/yarnlockhash'
path
:
.build/node_modules_cache
cacheHitVar
:
NODE_MODULES_RESTORED
displayName
:
Cache node_modules archive
-
script
:
|
set -e
tar -xzf .build/node_modules_cache/cache.tgz
condition
:
and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Extract node_modules archive
-
script
:
|
set -e
...
...
@@ -92,14 +99,15 @@ steps:
ELECTRON_SKIP_BINARY_DOWNLOAD
:
1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD
:
1
displayName
:
Install dependencies
condition
:
and(succeeded(), ne(variables
['CacheRestored']
, 'true'))
condition
:
and(succeeded(), ne(variables
.NODE_MODULES_RESTORED
, 'true'))
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs
:
keyfile
:
"
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
npm-vscode"
condition
:
and(succeeded(), ne(variables['CacheRestored'], 'true'))
-
script
:
|
set -e
node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
mkdir -p .build/node_modules_cache
tar -czf .build/node_modules_cache/cache.tgz --files-from .build/node_modules_list.txt
condition
:
and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Create node_modules archive
-
script
:
|
set -e
...
...
@@ -144,7 +152,7 @@ steps:
set -e
yarn --cwd test/integration/browser compile
displayName
:
Compile integration tests
condition
:
and(succeeded(), eq(variables
['CacheRestored']
, 'true'), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
condition
:
and(succeeded(), eq(variables
.NODE_MODULES_RESTORED
, 'true'), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
-
script
:
|
# Figure out the full absolute path of the product we just built
...
...
build/azure-pipelines/product-compile.yml
浏览文件 @
bbaff3d5
...
...
@@ -41,11 +41,18 @@ steps:
node build/azure-pipelines/common/computeNodeModulesCacheKey.js $VSCODE_ARCH $ENABLE_TERRAPIN > .build/yarnlockhash
displayName
:
Prepare yarn cache flags
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
-
task
:
Cache@2
inputs
:
keyfile
:
"
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
npm-vscode"
key
:
'
nodeModules
|
$(Agent.OS)
|
.build/yarnlockhash'
path
:
.build/node_modules_cache
cacheHitVar
:
NODE_MODULES_RESTORED
displayName
:
Cache node_modules archive
-
script
:
|
set -e
tar -xzf .build/node_modules_cache/cache.tgz
condition
:
and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Extract node_modules archive
-
script
:
|
set -e
...
...
@@ -74,14 +81,15 @@ steps:
ELECTRON_SKIP_BINARY_DOWNLOAD
:
1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD
:
1
displayName
:
Install dependencies
condition
:
and(succeeded(), ne(variables
['CacheRestored']
, 'true'))
condition
:
and(succeeded(), ne(variables
.NODE_MODULES_RESTORED
, 'true'))
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs
:
keyfile
:
"
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
npm-vscode"
condition
:
and(succeeded(), ne(variables['CacheRestored'], 'true'))
-
script
:
|
set -e
node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
mkdir -p .build/node_modules_cache
tar -czf .build/node_modules_cache/cache.tgz --files-from .build/node_modules_list.txt
condition
:
and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Create node_modules archive
# Mixin must run before optimize, because the CSS loader will inline small SVGs
-
script
:
|
...
...
build/azure-pipelines/product-hygiene.yml
浏览文件 @
bbaff3d5
...
...
@@ -41,11 +41,18 @@ steps:
node build/azure-pipelines/common/computeNodeModulesCacheKey.js $VSCODE_ARCH $ENABLE_TERRAPIN > .build/yarnlockhash
displayName
:
Prepare yarn cache flags
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
-
task
:
Cache@2
inputs
:
keyfile
:
"
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
npm-vscode"
key
:
'
nodeModules
|
$(Agent.OS)
|
.build/yarnlockhash'
path
:
.build/node_modules_cache
cacheHitVar
:
NODE_MODULES_RESTORED
displayName
:
Cache node_modules archive
-
script
:
|
set -e
tar -xzf .build/node_modules_cache/cache.tgz
condition
:
and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Extract node_modules archive
-
script
:
|
set -e
...
...
@@ -61,7 +68,15 @@ steps:
ELECTRON_SKIP_BINARY_DOWNLOAD
:
1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD
:
1
displayName
:
Install dependencies
condition
:
and(succeeded(), ne(variables['CacheRestored'], 'true'))
condition
:
and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
-
script
:
|
set -e
node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
mkdir -p .build/node_modules_cache
tar -czf .build/node_modules_cache/cache.tgz --files-from .build/node_modules_list.txt
condition
:
and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Create node_modules archive
# Mixin must run before optimize, because the CSS loader will inline small SVGs
-
script
:
|
...
...
build/azure-pipelines/web/product-build-web.yml
浏览文件 @
bbaff3d5
...
...
@@ -52,11 +52,18 @@ steps:
node build/azure-pipelines/common/computeNodeModulesCacheKey.js "web" $ENABLE_TERRAPIN > .build/yarnlockhash
displayName
:
Prepare yarn cache flags
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
-
task
:
Cache@2
inputs
:
keyfile
:
"
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
npm-vscode"
key
:
'
nodeModules
|
$(Agent.OS)
|
.build/yarnlockhash'
path
:
.build/node_modules_cache
cacheHitVar
:
NODE_MODULES_RESTORED
displayName
:
Cache node_modules archive
-
script
:
|
set -e
tar -xzf .build/node_modules_cache/cache.tgz
condition
:
and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Extract node_modules archive
-
script
:
|
set -e
...
...
@@ -72,14 +79,15 @@ steps:
ELECTRON_SKIP_BINARY_DOWNLOAD
:
1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD
:
1
displayName
:
Install dependencies
condition
:
and(succeeded(), ne(variables
['CacheRestored']
, 'true'))
condition
:
and(succeeded(), ne(variables
.NODE_MODULES_RESTORED
, 'true'))
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs
:
keyfile
:
"
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
npm-vscode"
condition
:
and(succeeded(), ne(variables['CacheRestored'], 'true'))
-
script
:
|
set -e
node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
mkdir -p .build/node_modules_cache
tar -czf .build/node_modules_cache/cache.tgz --files-from .build/node_modules_list.txt
condition
:
and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Create node_modules archive
-
script
:
|
set -e
...
...
build/azure-pipelines/win32/continuous-build-win32.yml
浏览文件 @
bbaff3d5
...
...
@@ -17,32 +17,42 @@ steps:
node build/azure-pipelines/common/computeNodeModulesCacheKey.js > .build/yarnlockhash
displayName
:
Prepare yarn cache flags
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
-
task
:
Cache@2
inputs
:
keyfile
:
"
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
vscode-build-cache"
key
:
'
continuousNodeModules
|
$(Agent.OS)
|
.build/arch,
.build/terrapin,
.build/yarnlockhash'
path
:
.build/node_modules_cache
cacheHitVar
:
NODE_MODULES_RESTORED
displayName
:
Cache node_modules archive
-
powershell
:
|
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { 7z.exe x .build/node_modules_cache/cache.7z -aos }
condition
:
and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Extract node_modules archive
-
powershell
:
|
yarn --frozen-lockfile
env
:
CHILD_CONCURRENCY
:
"
1"
displayName
:
Install Dependencies
condition
:
and(succeeded(), ne(variables
['CacheRestored']
, 'true'))
condition
:
and(succeeded(), ne(variables
.NODE_MODULES_RESTORED
, 'true'))
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs
:
keyfile
:
"
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
vscode-build-cache"
condition
:
and(succeeded(), ne(variables['CacheRestored'], 'true'))
-
powershell
:
|
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt }
exec { mkdir -Force .build/node_modules_cache }
exec { 7z.exe a .build/node_modules_cache/cache.7z `@.build/node_modules_list.txt }
condition
:
and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Create node_modules archive
-
powershell
:
|
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { yarn postinstall }
displayName
:
Run postinstall scripts
condition
:
and(succeeded(), eq(variables
['CacheRestored']
, 'true'))
condition
:
and(succeeded(), eq(variables
.NODE_MODULES_RESTORED
, 'true'))
-
powershell
:
|
yarn electron
...
...
build/azure-pipelines/win32/product-build-win32.yml
浏览文件 @
bbaff3d5
...
...
@@ -57,11 +57,19 @@ steps:
node build/azure-pipelines/common/computeNodeModulesCacheKey.js > .build/yarnlockhash
displayName
:
Prepare yarn cache flags
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
-
task
:
Cache@2
inputs
:
keyfile
:
"
.build/arch,
.build/terrapin,
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
npm-vscode"
key
:
'
nodeModules
|
$(Agent.OS)
|
.build/arch,
.build/terrapin,
.build/yarnlockhash'
path
:
.build/node_modules_cache
cacheHitVar
:
NODE_MODULES_RESTORED
displayName
:
Cache node_modules archive
-
powershell
:
|
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { 7z.exe x .build/node_modules_cache/cache.7z -aos }
condition
:
and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Extract node_modules archive
-
powershell
:
|
. build/azure-pipelines/win32/exec.ps1
...
...
@@ -74,14 +82,16 @@ steps:
ELECTRON_SKIP_BINARY_DOWNLOAD
:
1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD
:
1
displayName
:
Install dependencies
condition
:
and(succeeded(), ne(variables
['CacheRestored']
, 'true'))
condition
:
and(succeeded(), ne(variables
.NODE_MODULES_RESTORED
, 'true'))
-
task
:
1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs
:
keyfile
:
"
.build/arch,
.build/terrapin,
.build/yarnlockhash"
targetfolder
:
"
**/node_modules,
!**/node_modules/**/node_modules"
vstsFeed
:
"
npm-vscode"
condition
:
and(succeeded(), ne(variables['CacheRestored'], 'true'))
-
powershell
:
|
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt }
exec { mkdir -Force .build/node_modules_cache }
exec { 7z.exe a .build/node_modules_cache/cache.7z `@.build/node_modules_list.txt }
condition
:
and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName
:
Create node_modules archive
-
powershell
:
|
. build/azure-pipelines/win32/exec.ps1
...
...
@@ -145,7 +155,7 @@ steps:
$ErrorActionPreference = "Stop"
exec { yarn --cwd test/integration/browser compile }
displayName
:
Compile integration tests
condition
:
and(succeeded(), eq(variables
['CacheRestored']
, 'true'), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
condition
:
and(succeeded(), eq(variables
.NODE_MODULES_RESTORED
, 'true'), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
-
powershell
:
|
# Figure out the full absolute path of the product we just built
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录