File: run_ci.sh

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (60 lines) | stat: -rwxr-xr-x 1,737 bytes parent folder | download | duplicates (5)
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
#!/bin/sh

# Copyright The Closure Library Authors.
# SPDX-License-Identifier: Apache-2.0

set -ex

cd "${KOKORO_ARTIFACTS_DIR}/git/closure-library-staging"

# Install Node 14.

tar xf "${KOKORO_GFILE_DIR}/node-${NODE_VERSION}-linux-x64.tar.xz"
export PATH
PATH="$(pwd)/node-${NODE_VERSION}-linux-x64/bin:${PATH}"

# Install clang-format.

tar xf "${KOKORO_GFILE_DIR}/clang+llvm-${CLANG_VERSION}-x86_64-linux-gnu-ubuntu-14.04.tar.xz"
mv "clang+llvm-${CLANG_VERSION}-x86_64-linux-gnu-ubuntu-14.04" ../clang

# Install and use OpenJDK 11 as this is required to run Closure Compiler.
sudo apt-get install -y openjdk-11-jdk
sudo update-java-alternatives --jre-headless --set java-1.11.0-openjdk-amd64
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
export PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/bin:$PATH
which java
java --version

# Generate docs (without pushing them anywhere).

export GH_PAGES
GH_PAGES=$(mktemp -d)

# TODO(user): Doc generation temporarily disabled due to Dossier issues.
# git clone --depth=1 https://github.com/google/closure-library "$GH_PAGES"
# ./scripts/ci/generate_latest_docs.sh

# Install dependencies for Closure Compiler
./scripts/ci/install_closure_deps.sh

# Compile Closure Library with the latest compiler release.
./scripts/ci/compile_closure.sh "${KOKORO_ARTIFACTS_DIR}/${LATEST_COMPILER_JAR_PATH}"

# Compile Closure Library with the nightly external compiler.
./scripts/ci/compile_closure.sh ../closure-compiler-1.0-SNAPSHOT.jar

# Ensure that all generated files are generated without error.

npm install
npm run check_closure_oss
npm run gen_deps_js
npm run gen_deps_js_with_tests
npm run gen_test_htmls
npm run gen_alltests_js

# Run tests for closure-deps.

cd closure-deps
npm install
npm test