UNPKG

2.35 kBYAMLView Raw
1steps:
2# Install common dependencies.
3- name: 'node:10'
4 id: 'yarn-common'
5 entrypoint: 'yarn'
6 args: ['install']
7
8# Install tfjs-core dependencies.
9- name: 'node:10'
10 dir: 'tfjs-core'
11 id: 'yarn'
12 entrypoint: 'yarn'
13 args: ['install']
14 waitFor: ['yarn-common']
15
16# Build.
17- name: 'node:10'
18 dir: 'tfjs-core'
19 id: 'build'
20 entrypoint: 'yarn'
21 args: ['build-ci']
22 waitFor: ['yarn']
23
24# Build cpu backend. The cpu backend is included into tfjs-core with 'require()'
25# syntax to avoid circular 'import' statements between packages and is only used
26# for running tests. It is built after tfjs-core because it imports from
27# tfjs-core. In CI runs of generated cloudbuild files, tfjs-backend-cpu may be
28# built twice (here and in its own cloudbuild rules), but the second build only
29# takes about 20 seconds due to incremental tsc.
30- name: 'node:10'
31 dir: 'tfjs-core'
32 id: 'build-cpu-backend'
33 entrypoint: 'yarn'
34 args: ['build-cpu-backend-ci']
35 waitFor: ['build']
36
37# Lint.
38- name: 'node:10'
39 dir: 'tfjs-core'
40 id: 'lint'
41 entrypoint: 'yarn'
42 args: ['lint']
43 waitFor: ['yarn', 'build-cpu-backend']
44
45# Run unit tests.
46- name: 'node:10'
47 dir: 'tfjs-core'
48 id: 'test'
49 entrypoint: 'yarn'
50 args: ['test-ci']
51 waitFor: ['yarn', 'build-cpu-backend', 'lint']
52 env: ['BROWSERSTACK_USERNAME=deeplearnjs1', 'NIGHTLY=$_NIGHTLY']
53 secretEnv: ['BROWSERSTACK_KEY']
54
55# bundle size check
56- name: 'node:10'
57 dir: 'tfjs-core'
58 id: 'test-bundle-size'
59 entrypoint: 'yarn'
60 args: ['test-bundle-size']
61 waitFor: ['yarn']
62
63# test doc snippets
64- name: 'node:10'
65 dir: 'tfjs-core'
66 id: 'test-snippets'
67 entrypoint: 'yarn'
68 args: ['test-snippets-ci']
69 waitFor: ['yarn', 'build-cpu-backend']
70
71# test Async backends
72- name: 'node:10'
73 dir: 'tfjs-core'
74 id: 'test-async-backends'
75 entrypoint: 'yarn'
76 args: ['test-async-backends-ci']
77 waitFor: ['build-cpu-backend']
78
79# General configuration
80secrets:
81- kmsKeyName: projects/learnjs-174218/locations/global/keyRings/tfjs/cryptoKeys/enc
82 secretEnv:
83 BROWSERSTACK_KEY: CiQAkwyoIW0LcnxymzotLwaH4udVTQFBEN4AEA5CA+a3+yflL2ASPQAD8BdZnGARf78MhH5T9rQqyz9HNODwVjVIj64CTkFlUCGrP1B2HX9LXHWHLmtKutEGTeFFX9XhuBzNExA=
84timeout: 3600s
85logsBucket: 'gs://tfjs-build-logs'
86substitutions:
87 _NIGHTLY: ''
88options:
89 logStreamingOption: 'STREAM_ON'
90 machineType: 'N1_HIGHCPU_8'
91 substitution_option: 'ALLOW_LOOSE'