build: [ci] add GN linux CI build
This commit is contained in:
Родитель
3247d789f2
Коммит
004abe3ce8
|
@ -313,6 +313,84 @@ jobs:
|
|||
xcode: "8.3.3"
|
||||
<<: *build-steps
|
||||
|
||||
electron-linux-gn:
|
||||
environment:
|
||||
DISPLAY: ':99.0'
|
||||
docker:
|
||||
- image: electronbuilds/electron:0.0.8
|
||||
resource_class: 2xlarge
|
||||
steps:
|
||||
- run:
|
||||
name: Setup depot tools
|
||||
command: |
|
||||
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
echo 'export PATH=$PATH:`pwd`/depot_tools' >> $BASH_ENV
|
||||
- checkout:
|
||||
path: src/electron
|
||||
- restore_cache:
|
||||
paths:
|
||||
- ~/.gclient-cache
|
||||
keys:
|
||||
- v1-gclient-cache-{{ checksum "src/electron/DEPS" }}
|
||||
- v1-gclient-cache-
|
||||
- run:
|
||||
name: Gclient sync
|
||||
command: |
|
||||
echo $PATH
|
||||
gclient config \
|
||||
--name "src/electron" \
|
||||
--unmanaged \
|
||||
--cache-dir "$HOME/.gclient-cache" \
|
||||
"$CIRCLE_REPOSITORY_URL"
|
||||
|
||||
gclient sync --with_branch_heads --with_tags
|
||||
- save_cache:
|
||||
paths:
|
||||
- ~/.gclient-cache
|
||||
key: v1-gclient-cache-{{ checksum "src/electron/DEPS" }}
|
||||
- run:
|
||||
name: GN gen
|
||||
command: |
|
||||
cd src
|
||||
echo 'export CHROMIUM_BUILDTOOLS_PATH=`pwd`/buildtools' >> $BASH_ENV
|
||||
source $BASH_ENV
|
||||
mkdir out/Default
|
||||
cat > out/Default/args.gn <<-EOF
|
||||
root_extra_deps = [ "//electron" ]
|
||||
is_electron_build = true
|
||||
is_component_build = true
|
||||
use_jumbo_build = true
|
||||
v8_promise_internal_field_count = 1
|
||||
v8_typed_array_max_size_in_heap = 0
|
||||
EOF
|
||||
gn gen out/Default
|
||||
- run:
|
||||
name: Ninja build
|
||||
command: |
|
||||
cd src
|
||||
ninja -C out/Default electron:electron_app
|
||||
- run:
|
||||
name: Setup for headless testing
|
||||
command: |
|
||||
sh -e /etc/init.d/xvfb start
|
||||
- run:
|
||||
name: Test
|
||||
environment:
|
||||
MOCHA_REPORTER: mocha-junit-reporter
|
||||
MOCHA_FILE: junit/test-results.xml
|
||||
ELECTRON_DISABLE_SECURITY_WARNINGS: 1
|
||||
command: |
|
||||
cd src
|
||||
ninja -C out/Default electron/build/node:headers
|
||||
export npm_config_nodedir="$PWD/out/Default/gen/node_headers"
|
||||
(cd electron/spec && npm install)
|
||||
./out/Default/electron electron/spec --ci --enable-logging
|
||||
- store_test_results:
|
||||
path: src/junit
|
||||
- store_artifacts:
|
||||
path: src/junit
|
||||
- <<: *notify-slack-failure
|
||||
- <<: *notify-slack-success
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
|
@ -340,6 +418,9 @@ workflows:
|
|||
build-mas-x64:
|
||||
jobs:
|
||||
- electron-mas-x64
|
||||
build-gn-linux:
|
||||
jobs:
|
||||
- electron-linux-gn
|
||||
|
||||
nightly-release-test:
|
||||
triggers:
|
||||
|
|
Загрузка…
Ссылка в новой задаче