@@ -38,8 +38,6 @@ parameters:
38
38
common_job_environment : &common_job_environment
39
39
CARGO_NET_GIT_FETCH_WITH_CLI : true
40
40
RUST_BACKTRACE : full
41
- NODE_VERSION : 14.17.5
42
- NPM_VERSION : 7.10.0
43
41
44
42
commands :
45
43
linux_install_baseline :
@@ -77,87 +75,17 @@ commands:
77
75
tar -xf jaeger.tar.gz
78
76
mv jaeger-1.33.0-windows-amd64 jaeger
79
77
80
- # This job sets up our nodejs dependencies,
81
- # and makes sure everything is ready to run integration tests
82
- macos_prepare_node_env :
78
+ # This job makes sure everything is ready to run integration tests
79
+ macos_prepare_env :
83
80
steps :
84
- # TODO[igni]: check for node version before we try to install it
85
- # Installing this with the curl nvm command was proving difficult,
86
- # so I've opted to just install the .pkg. Should be the same net
87
- # result, even if liked the opportunity for symmetry with Linux.
88
- - run :
89
- name : Installing Node.js with a .pkg.
90
- command : |
91
- curl "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}.pkg" > "$HOME/Downloads/node.pkg" && sudo installer -store -pkg "$HOME/Downloads/node.pkg" -target "/"
92
- sudo npm install --global npm@${NPM_VERSION}
93
- - run :
94
- name : Assert Node.js version
95
- command : test "$(node --version)" = "v${NODE_VERSION}"
96
- - run :
97
- name : Assert npm version
98
- command : test "$(npm --version)" = "${NPM_VERSION}"
99
81
- run :
100
82
# The jaeger exporter won't work without this
101
83
name : Increase udp packet size
102
84
command : |
103
85
sudo sysctl net.inet.udp.maxdgram=65536
104
86
sudo sysctl net.inet.udp.maxdgram
105
- linux_prepare_node_env :
106
- steps :
107
- # TODO[igni]: check for node version before we try to install it
108
- - run :
109
- name : Install nvm
110
- command : |
111
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
112
- echo '. ~/.nvm/nvm.sh' >> $BASH_ENV
113
- - run :
114
- name : Install desired Node.js version
115
- command : |
116
- nvm install $NODE_VERSION
117
- nvm alias default $NODE_VERSION
118
- npm install --global npm@${NPM_VERSION}
119
- - run :
120
- name : Assert Node.js version
121
- command : test "$(node --version)" = "v${NODE_VERSION}"
122
- - run :
123
- name : Assert npm version
124
- command : test "$(npm --version)" = "${NPM_VERSION}"
125
87
126
- windows_prepare_node_env :
127
- # TODO[igni]: check for node version before we try to install it
128
- steps :
129
- - run :
130
- name : Install desired Node.js version with nvm
131
- command : |
132
- nvm install ${Env:NODE_VERSION}
133
- nvm on
134
- - run :
135
- # https://github.com/coreybutler/nvm-windows/issues/300
136
- # Have to move the command out of the way because it can't
137
- # overwrite itself otherwise. This is madness, but apparently
138
- # accepted. Other things I tried: using yarn to install npm,
139
- # using http://npm.im/npm-windows-upgrade and even shouting.
140
- name : Install specific version of npm in a crazy Windows way
141
- command : |
142
- $node_dir = (get-item (get-command npm).source).directory.fullname
143
- foreach ($cmd in @("npm", "npx")) {
144
- foreach ($ext in @(".ps1", ".cmd", "")) {
145
- if (Test-Path "$node_dir/$cmd$ext") {
146
- rename-item -path (join-path -path $node_dir -childpath "$cmd$ext") "${cmd}-orig${ext}"
147
- }
148
- }
149
- }
150
- npm-orig install --global "npm@${Env:NPM_VERSION}"
151
- - run :
152
- name : Assert Node.js version
153
- command : |
154
- if ((node --version) -Ne "v${Env:NODE_VERSION}") { exit 1 }
155
- - run :
156
- name : Assert npm version
157
- command : |
158
- if ((npm --version) -Ne "${Env:NPM_VERSION}") { exit 1 }
159
-
160
- windows_prepare_rust_env :
88
+ windows_prepare_env :
161
89
steps :
162
90
- run :
163
91
name : Install rustup
@@ -179,7 +107,7 @@ commands:
179
107
[net]
180
108
git-fetch-with-cli = true
181
109
"@
182
- prepare_rust_env :
110
+ prepare_env :
183
111
steps :
184
112
- rust/install :
185
113
version : stable
@@ -238,9 +166,11 @@ commands:
238
166
239
167
build_common_permutations :
240
168
steps :
241
- - rust/build :
242
- with_cache : false
243
- crate : --locked -p apollo-router
169
+ - run :
170
+ name : cargo check workspace
171
+ command : |
172
+ set -e -o pipefail
173
+ cargo check --locked
244
174
build_all_permutations :
245
175
steps :
246
176
- build_common_permutations
@@ -346,8 +276,7 @@ jobs:
346
276
equal : [*rust_linux_executor, << parameters.platform >>]
347
277
steps :
348
278
- linux_install_baseline
349
- - linux_prepare_node_env
350
- - prepare_rust_env
279
+ - prepare_env
351
280
- xtask_lint :
352
281
os : linux
353
282
check_compliance :
@@ -364,8 +293,7 @@ jobs:
364
293
equal : [*rust_linux_executor, << parameters.platform >>]
365
294
steps :
366
295
- linux_install_baseline
367
- - linux_prepare_node_env
368
- - prepare_rust_env
296
+ - prepare_env
369
297
- xtask_check_compliance :
370
298
os : linux
371
299
build :
@@ -382,25 +310,22 @@ jobs:
382
310
equal : [*rust_linux_executor, << parameters.platform >>]
383
311
steps :
384
312
- linux_install_baseline
385
- - linux_prepare_node_env
386
- - prepare_rust_env
313
+ - prepare_env
387
314
- build_workspace :
388
315
os : linux
389
316
- when :
390
317
condition :
391
318
equal : [*rust_windows_executor, << parameters.platform >>]
392
319
steps :
393
320
- windows_install_baseline
394
- - windows_prepare_node_env
395
- - windows_prepare_rust_env
321
+ - windows_prepare_env
396
322
- windows_build_workspace
397
323
- when :
398
324
condition :
399
325
equal : [*rust_macos_executor, << parameters.platform >>]
400
326
steps :
401
327
- macos_install_baseline
402
- - macos_prepare_node_env
403
- - prepare_rust_env
328
+ - prepare_env
404
329
- build_workspace :
405
330
os : macos
406
331
test :
@@ -417,25 +342,22 @@ jobs:
417
342
equal : [*rust_linux_executor, << parameters.platform >>]
418
343
steps :
419
344
- linux_install_baseline
420
- - linux_prepare_node_env
421
- - prepare_rust_env
345
+ - prepare_env
422
346
- test_workspace :
423
347
os : linux
424
348
- when :
425
349
condition :
426
350
equal : [*rust_windows_executor, << parameters.platform >>]
427
351
steps :
428
352
- windows_install_baseline
429
- - windows_prepare_node_env
430
- - windows_prepare_rust_env
353
+ - windows_prepare_env
431
354
- windows_test_workspace
432
355
- when :
433
356
condition :
434
357
equal : [*rust_macos_executor, << parameters.platform >>]
435
358
steps :
436
359
- macos_install_baseline
437
- - macos_prepare_node_env
438
- - prepare_rust_env
360
+ - prepare_env
439
361
- test_workspace :
440
362
os : macos
441
363
@@ -465,23 +387,6 @@ jobs:
465
387
- run : brew install cmake
466
388
- rust/install :
467
389
version : stable
468
- # Installing this with the curl nvm command was proving difficult,
469
- # so I've opted to just install the .pkg. Should be the same net
470
- # result, even if liked the opportunity for symmetry with Linux.
471
- - run :
472
- name : Installing Node.js with a .pkg.
473
- command : |
474
- curl "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}.pkg" > "$HOME/Downloads/node.pkg" && sudo installer -store -pkg "$HOME/Downloads/node.pkg" -target "/"
475
- - run :
476
- name : Install specific version of npm
477
- command : |
478
- sudo npm install --global npm@${NPM_VERSION}
479
- - run :
480
- name : Assert Node.js version
481
- command : test "$(node --version)" = "v${NODE_VERSION}"
482
- - run :
483
- name : Assert npm version
484
- command : test "$(npm --version)" = "${NPM_VERSION}"
485
390
- run :
486
391
command : >
487
392
cargo xtask dist
@@ -510,22 +415,6 @@ jobs:
510
415
sudo apt-get install -y libssl-dev
511
416
- rust/install :
512
417
version : stable
513
- - run :
514
- name : Install nvm
515
- command : curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
516
- - run : echo '. ~/.nvm/nvm.sh' >> $BASH_ENV
517
- - run :
518
- name : Install desired Node.js version
519
- command : |
520
- nvm install $NODE_VERSION
521
- nvm alias default $NODE_VERSION
522
- npm install --global npm@${NPM_VERSION}
523
- - run :
524
- name : Assert Node.js version
525
- command : test "$(node --version)" = "v${NODE_VERSION}"
526
- - run :
527
- name : Assert npm version
528
- command : test "$(npm --version)" = "${NPM_VERSION}"
529
418
- run :
530
419
command : >
531
420
cargo xtask dist
@@ -559,36 +448,6 @@ jobs:
559
448
[net]
560
449
git-fetch-with-cli = true
561
450
"@
562
- - run :
563
- name : Install desired Node.js version with nvm
564
- command : |
565
- nvm install ${Env:NODE_VERSION}
566
- nvm on
567
- - run :
568
- # https://github.com/coreybutler/nvm-windows/issues/300
569
- # Have to move the command out of the way because it can't
570
- # overwrite itself otherwise. This is madness, but apparently
571
- # accepted. Other things I tried: using yarn to install npm,
572
- # using http://npm.im/npm-windows-upgrade and even shouting.
573
- name : Install specific version of npm in a crazy Windows way
574
- command : |
575
- $node_dir = (get-item (get-command npm).source).directory.fullname
576
- foreach ($cmd in @("npm", "npx")) {
577
- foreach ($ext in @(".ps1", ".cmd", "")) {
578
- if (Test-Path "$node_dir/$cmd$ext") {
579
- rename-item -path (join-path -path $node_dir -childpath "$cmd$ext") "${cmd}-orig${ext}"
580
- }
581
- }
582
- }
583
- npm-orig install --global "npm@${Env:NPM_VERSION}"
584
- - run :
585
- name : Assert Node.js version
586
- command : |
587
- if ((node --version) -Ne "v${Env:NODE_VERSION}") { exit 1 }
588
- - run :
589
- name : Assert npm version
590
- command : |
591
- if ((npm --version) -Ne "${Env:NPM_VERSION}") { exit 1 }
592
451
- run :
593
452
command : >
594
453
cargo xtask dist
0 commit comments