Skip to content

Commit fead851

Browse files
committed
test: add AIO benchmark
1 parent a16a7d5 commit fead851

File tree

4 files changed

+41
-1
lines changed

4 files changed

+41
-1
lines changed

.circleci/config.yml

+21
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# `com_github_bazelbuild_buildtools` in the `/WORKSPACE` file.
1515
var_1: &docker_image angular/ngcontainer:0.3.3
1616
var_2: &cache_key angular_devkit-{{ checksum "yarn.lock" }}-0.3.3-2
17+
var_3: &benchmark_aio_cache_key angular_devkit-benchmark-aio{{ checksum "benchmark/aio/angular/aio/yarn.lock" }}-0.3.3-2
1718

1819
# Settings common to each job
1920
anchor_1: &defaults
@@ -30,6 +31,8 @@ anchor_3: &root_package_lock_key
3031
key: *cache_key
3132
anchor_4: &attach_options
3233
at: .
34+
anchor_5: &benchmark_aio_package_lock_key
35+
key: *benchmark_aio_cache_key
3336

3437
# Job definitions
3538
version: 2
@@ -93,6 +96,21 @@ jobs:
9396
- attach_workspace: *attach_options
9497
- run: npm run admin -- build
9598

99+
benchmark:
100+
<<: *defaults
101+
steps:
102+
- attach_workspace: *attach_options
103+
- restore_cache: *benchmark_aio_package_lock_key
104+
- run: yarn admin -- build --local
105+
- run: npm install --global ./dist/@angular-devkit_benchmark.tgz
106+
- run: cd benchmark/aio && yarn initialize
107+
- run: cd benchmark/aio && yarn benchmark
108+
- save_cache:
109+
<<: *benchmark_aio_package_lock_key
110+
paths:
111+
- benchmark/aio/angular/node_modules
112+
- benchmark/aio/angular/aio/node_modules
113+
96114
build-bazel:
97115
<<: *defaults
98116
resource_class: large
@@ -153,6 +171,9 @@ workflows:
153171
- e2e-cli:
154172
requires:
155173
- build
174+
- benchmark:
175+
requires:
176+
- build
156177
- snapshot_publish:
157178
requires:
158179
- test

benchmark/aio/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
angular/

benchmark/aio/package.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "aio-benchmark",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"initialize": "yarn clone && yarn setup && yarn update",
8+
"clone": "(git clone https://github.com/angular/angular || true) && cd angular && git fetch origin && git reset --hard dd2a650c3455f3bc0a88f8181758a84aacb25fea",
9+
"setup": "cd angular && yarn && cd aio && yarn && yarn setup",
10+
"//": "Shouldn't need to install the package twice, but the first install seems to leave two @ngtools/webpack installs around.",
11+
"update": "cd angular/aio && yarn add ../../../../dist/@angular-devkit_build-angular.tgz --dev && yarn add ../../../../dist/_angular-devkit_build-angular.tgz --dev",
12+
"benchmark": "cd angular/aio && benchmark --verbose -- yarn ~~build --configuration=stable"
13+
},
14+
"keywords": [],
15+
"author": "",
16+
"license": "ISC"
17+
}

tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"packages/schematics/*/*/*files/**/*",
6565
"tmp/**/*",
6666
"scripts/patches/**/*",
67-
"tests/**/*"
67+
"tests/**/*",
68+
"benchmark/**/*",
6869
]
6970
}

0 commit comments

Comments
 (0)