2017-09-13 13:48:19 +00:00
|
|
|
|
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
electron-linux-arm:
|
|
|
|
docker:
|
2017-12-05 20:01:01 +00:00
|
|
|
- image: electronbuilds/electron:0.0.4
|
2017-09-13 13:48:19 +00:00
|
|
|
environment:
|
|
|
|
TARGET_ARCH: arm
|
2017-11-24 02:03:02 +00:00
|
|
|
resource_class: 2xlarge
|
2017-09-13 13:48:19 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2017-09-28 17:05:42 +00:00
|
|
|
- run:
|
|
|
|
name: Check for release
|
|
|
|
command: |
|
2017-10-24 16:42:45 +00:00
|
|
|
if [ -n "${RUN_RELEASE_BUILD}" ]; then
|
|
|
|
echo 'release build triggered from api'
|
2017-11-02 08:06:28 +00:00
|
|
|
echo 'export ELECTRON_RELEASE=1 TRIGGERED_BY_API=1' >> $BASH_ENV
|
2017-10-24 16:42:45 +00:00
|
|
|
fi
|
2017-09-28 17:05:42 +00:00
|
|
|
- run:
|
|
|
|
name: Bootstrap
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
|
|
|
echo 'Bootstrapping Electron for release build'
|
|
|
|
script/bootstrap.py --target_arch=$TARGET_ARCH
|
|
|
|
else
|
|
|
|
echo 'Bootstrapping Electron for debug build'
|
|
|
|
script/bootstrap.py --target_arch=$TARGET_ARCH --dev
|
|
|
|
fi
|
|
|
|
- run: npm run lint
|
|
|
|
- run:
|
|
|
|
name: Build
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
|
|
|
echo 'Building Electron for release'
|
|
|
|
script/build.py -c R
|
|
|
|
else
|
|
|
|
echo 'Building Electron for debug'
|
|
|
|
script/build.py -c D
|
|
|
|
fi
|
|
|
|
- run:
|
|
|
|
name: Create distribution
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
|
|
|
echo 'Creating Electron release distribution'
|
|
|
|
script/create-dist.py
|
|
|
|
else
|
|
|
|
echo 'Skipping create distribution because build is not for release'
|
|
|
|
fi
|
|
|
|
- run:
|
|
|
|
name: Upload distribution
|
|
|
|
command: |
|
2017-11-02 08:06:28 +00:00
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ] && [ "$TRIGGERED_BY_API" != "1" ]; then
|
|
|
|
echo 'Uploading Electron release distribution to github releases'
|
2017-09-28 17:05:42 +00:00
|
|
|
script/upload.py
|
2017-11-02 08:06:28 +00:00
|
|
|
elif [ "$ELECTRON_RELEASE" == "1" ] && [ "$TRIGGERED_BY_API" == "1" ]; then
|
|
|
|
echo 'Uploading Electron release distribution to s3'
|
|
|
|
script/upload.py --upload_to_s3
|
2017-09-28 17:05:42 +00:00
|
|
|
else
|
|
|
|
echo 'Skipping upload distribution because build is not for release'
|
|
|
|
fi
|
2017-12-13 19:42:01 +00:00
|
|
|
- run:
|
|
|
|
name: Zip out directory
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" != "1" ]; then
|
|
|
|
zip -r electron.zip out/D
|
|
|
|
fi
|
|
|
|
- persist_to_workspace:
|
|
|
|
root: /home/builduser
|
|
|
|
paths:
|
|
|
|
- project/out
|
|
|
|
- store_artifacts:
|
|
|
|
path: electron.zip
|
|
|
|
electron-linux-arm-test:
|
|
|
|
machine: true
|
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
|
|
|
at: /tmp/workspace
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Test in ARM docker container
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" != "1" ]; then
|
|
|
|
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
|
|
|
docker run -it \
|
|
|
|
--mount type=bind,source=/tmp/workspace,target=/tmp/workspace \
|
|
|
|
--rm electronbuilds/electronarm7:0.0.4 > version.txt
|
|
|
|
cat version.txt
|
|
|
|
if grep -q `script/get-version.py` version.txt; then
|
|
|
|
echo "Versions match"
|
|
|
|
else
|
|
|
|
echo "Versions do not match"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "Skipping test for release build"
|
|
|
|
fi
|
2017-09-13 13:48:19 +00:00
|
|
|
electron-linux-arm64:
|
|
|
|
docker:
|
2017-12-05 20:01:01 +00:00
|
|
|
- image: electronbuilds/electron:0.0.4
|
2017-09-13 13:48:19 +00:00
|
|
|
environment:
|
|
|
|
TARGET_ARCH: arm64
|
2017-11-24 02:03:02 +00:00
|
|
|
resource_class: 2xlarge
|
2017-09-13 13:48:19 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2017-09-28 17:05:42 +00:00
|
|
|
- run:
|
|
|
|
name: Check for release
|
|
|
|
command: |
|
2017-11-03 04:45:30 +00:00
|
|
|
if [ -n "${RUN_RELEASE_BUILD}" ]; then
|
|
|
|
echo 'release build triggered from api'
|
|
|
|
echo 'export ELECTRON_RELEASE=1 TRIGGERED_BY_API=1' >> $BASH_ENV
|
|
|
|
fi
|
2017-09-28 17:05:42 +00:00
|
|
|
- run:
|
|
|
|
name: Bootstrap
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
|
|
|
echo 'Bootstrapping Electron for release build'
|
|
|
|
script/bootstrap.py --target_arch=$TARGET_ARCH
|
|
|
|
else
|
|
|
|
echo 'Bootstrapping Electron for debug build'
|
|
|
|
script/bootstrap.py --target_arch=$TARGET_ARCH --dev
|
|
|
|
fi
|
|
|
|
- run: npm run lint
|
|
|
|
- run:
|
|
|
|
name: Build
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
|
|
|
echo 'Building Electron for release'
|
|
|
|
script/build.py -c R
|
|
|
|
else
|
|
|
|
echo 'Building Electron for debug'
|
|
|
|
script/build.py -c D
|
|
|
|
fi
|
|
|
|
- run:
|
|
|
|
name: Create distribution
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
|
|
|
echo 'Creating Electron release distribution'
|
|
|
|
script/create-dist.py
|
|
|
|
else
|
|
|
|
echo 'Skipping create distribution because build is not for release'
|
|
|
|
fi
|
|
|
|
- run:
|
|
|
|
name: Upload distribution
|
|
|
|
command: |
|
2017-11-03 06:36:25 +00:00
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ] && [ "$TRIGGERED_BY_API" != "1" ]; then
|
|
|
|
echo 'Uploading Electron release distribution to github releases'
|
2017-09-28 17:05:42 +00:00
|
|
|
script/upload.py
|
2017-11-03 04:45:30 +00:00
|
|
|
elif [ "$ELECTRON_RELEASE" == "1" ] && [ "$TRIGGERED_BY_API" == "1" ]; then
|
|
|
|
echo 'Uploading Electron release distribution to s3'
|
|
|
|
script/upload.py --upload_to_s3
|
2017-09-28 17:05:42 +00:00
|
|
|
else
|
|
|
|
echo 'Skipping upload distribution because build is not for release'
|
|
|
|
fi
|
2017-12-13 19:42:01 +00:00
|
|
|
- run:
|
|
|
|
name: Zip out directory
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" != "1" ]; then
|
|
|
|
zip -r electron.zip out/D
|
|
|
|
fi
|
|
|
|
- persist_to_workspace:
|
|
|
|
root: /home/builduser
|
|
|
|
paths:
|
|
|
|
- project/out
|
|
|
|
- store_artifacts:
|
|
|
|
path: electron.zip
|
|
|
|
electron-linux-arm64-test:
|
|
|
|
machine: true
|
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
|
|
|
at: /tmp/workspace
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Test in ARM64 docker container
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" != "1" ]; then
|
|
|
|
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
|
|
|
docker run -it \
|
|
|
|
--mount type=bind,source=/tmp/workspace,target=/tmp/workspace \
|
|
|
|
--rm electronbuilds/electronarm64:0.0.5 > version.txt
|
|
|
|
cat version.txt
|
|
|
|
if grep -q `script/get-version.py` version.txt; then
|
|
|
|
echo "Versions match"
|
|
|
|
else
|
|
|
|
echo "Versions do not match"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "Skipping test for release build"
|
|
|
|
fi
|
2017-09-13 13:48:19 +00:00
|
|
|
electron-linux-ia32:
|
|
|
|
docker:
|
2017-12-05 20:01:01 +00:00
|
|
|
- image: electronbuilds/electron:0.0.4
|
2017-09-13 13:48:19 +00:00
|
|
|
environment:
|
|
|
|
TARGET_ARCH: ia32
|
2018-01-17 17:57:42 +00:00
|
|
|
DISPLAY: ':99.0'
|
2017-09-28 17:05:42 +00:00
|
|
|
resource_class: xlarge
|
2017-11-22 02:17:19 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2017-12-13 19:42:01 +00:00
|
|
|
- run:
|
|
|
|
name: Setup for headless testing
|
|
|
|
command: sh -e /etc/init.d/xvfb start
|
2017-11-22 02:17:19 +00:00
|
|
|
- run:
|
|
|
|
name: Check for release
|
|
|
|
command: |
|
|
|
|
if [ -n "${RUN_RELEASE_BUILD}" ]; then
|
|
|
|
echo 'release build triggered from api'
|
|
|
|
echo 'export ELECTRON_RELEASE=1 TRIGGERED_BY_API=1' >> $BASH_ENV
|
|
|
|
fi
|
|
|
|
- run:
|
|
|
|
name: Bootstrap
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
|
|
|
echo 'Bootstrapping Electron for release build'
|
|
|
|
script/bootstrap.py --target_arch=$TARGET_ARCH
|
|
|
|
else
|
|
|
|
echo 'Bootstrapping Electron for debug build'
|
|
|
|
script/bootstrap.py --target_arch=$TARGET_ARCH --dev
|
|
|
|
fi
|
|
|
|
- run: npm run lint
|
|
|
|
- run:
|
|
|
|
name: Build
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
|
|
|
echo 'Building Electron for release'
|
|
|
|
script/build.py -c R
|
|
|
|
else
|
|
|
|
echo 'Building Electron for debug'
|
|
|
|
script/build.py -c D
|
|
|
|
fi
|
|
|
|
- run:
|
|
|
|
name: Create distribution
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
|
|
|
echo 'Creating Electron release distribution'
|
|
|
|
script/create-dist.py
|
|
|
|
else
|
|
|
|
echo 'Skipping create distribution because build is not for release'
|
|
|
|
fi
|
|
|
|
- run:
|
|
|
|
name: Upload distribution
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ] && [ "$TRIGGERED_BY_API" != "1" ]; then
|
|
|
|
echo 'Uploading Electron release distribution to github releases'
|
|
|
|
script/upload.py
|
|
|
|
elif [ "$ELECTRON_RELEASE" == "1" ] && [ "$TRIGGERED_BY_API" == "1" ]; then
|
|
|
|
echo 'Uploading Electron release distribution to s3'
|
|
|
|
script/upload.py --upload_to_s3
|
|
|
|
else
|
|
|
|
echo 'Skipping upload distribution because build is not for release'
|
|
|
|
fi
|
2017-12-13 19:42:01 +00:00
|
|
|
- run:
|
|
|
|
name: Test
|
|
|
|
environment:
|
|
|
|
MOCHA_FILE: junit/test-results.xml
|
|
|
|
MOCHA_REPORTER: mocha-junit-reporter
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" != "1" ]; then
|
|
|
|
echo 'Testing Electron debug build'
|
|
|
|
out/D/electron --version
|
|
|
|
mkdir junit
|
|
|
|
script/test.py --ci --rebuild_native_modules
|
|
|
|
else
|
|
|
|
echo 'Skipping testing on release build'
|
|
|
|
fi
|
|
|
|
- run:
|
|
|
|
name: Verify FFmpeg
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" != "1" ]; then
|
|
|
|
echo 'Verifying ffmpeg on debug build'
|
|
|
|
script/verify-ffmpeg.py
|
|
|
|
else
|
|
|
|
echo 'Skipping verify ffmpeg on release build'
|
|
|
|
fi
|
2017-11-22 02:17:19 +00:00
|
|
|
electron-linux-mips64el:
|
|
|
|
docker:
|
2017-12-05 20:01:01 +00:00
|
|
|
- image: electronbuilds/electron:0.0.4
|
2017-11-22 02:17:19 +00:00
|
|
|
environment:
|
|
|
|
TARGET_ARCH: mips64el
|
|
|
|
resource_class: xlarge
|
2017-09-13 13:48:19 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2017-09-28 17:05:42 +00:00
|
|
|
- run:
|
|
|
|
name: Check for release
|
|
|
|
command: |
|
2017-11-03 04:45:30 +00:00
|
|
|
if [ -n "${RUN_RELEASE_BUILD}" ]; then
|
|
|
|
echo 'release build triggered from api'
|
|
|
|
echo 'export ELECTRON_RELEASE=1 TRIGGERED_BY_API=1' >> $BASH_ENV
|
|
|
|
fi
|
2017-09-28 17:05:42 +00:00
|
|
|
- run:
|
|
|
|
name: Bootstrap
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
|
|
|
echo 'Bootstrapping Electron for release build'
|
|
|
|
script/bootstrap.py --target_arch=$TARGET_ARCH
|
|
|
|
else
|
|
|
|
echo 'Bootstrapping Electron for debug build'
|
|
|
|
script/bootstrap.py --target_arch=$TARGET_ARCH --dev
|
|
|
|
fi
|
|
|
|
- run: npm run lint
|
|
|
|
- run:
|
|
|
|
name: Build
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
|
|
|
echo 'Building Electron for release'
|
|
|
|
script/build.py -c R
|
|
|
|
else
|
|
|
|
echo 'Building Electron for debug'
|
|
|
|
script/build.py -c D
|
|
|
|
fi
|
|
|
|
- run:
|
|
|
|
name: Create distribution
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
|
|
|
echo 'Creating Electron release distribution'
|
|
|
|
script/create-dist.py
|
|
|
|
else
|
|
|
|
echo 'Skipping create distribution because build is not for release'
|
|
|
|
fi
|
|
|
|
- run:
|
|
|
|
name: Upload distribution
|
|
|
|
command: |
|
2017-11-03 06:36:25 +00:00
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ] && [ "$TRIGGERED_BY_API" != "1" ]; then
|
|
|
|
echo 'Uploading Electron release distribution to github releases'
|
2017-09-28 17:05:42 +00:00
|
|
|
script/upload.py
|
2017-11-03 04:45:30 +00:00
|
|
|
elif [ "$ELECTRON_RELEASE" == "1" ] && [ "$TRIGGERED_BY_API" == "1" ]; then
|
|
|
|
echo 'Uploading Electron release distribution to s3'
|
|
|
|
script/upload.py --upload_to_s3
|
2017-09-28 17:05:42 +00:00
|
|
|
else
|
|
|
|
echo 'Skipping upload distribution because build is not for release'
|
|
|
|
fi
|
2017-09-13 13:48:19 +00:00
|
|
|
|
|
|
|
electron-linux-x64:
|
|
|
|
docker:
|
2017-12-05 20:01:01 +00:00
|
|
|
- image: electronbuilds/electron:0.0.4
|
2017-09-13 13:48:19 +00:00
|
|
|
environment:
|
|
|
|
TARGET_ARCH: x64
|
2017-11-15 15:47:36 +00:00
|
|
|
DISPLAY: ':99.0'
|
2017-09-28 17:05:42 +00:00
|
|
|
resource_class: xlarge
|
2017-09-13 13:48:19 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2017-09-28 17:05:42 +00:00
|
|
|
- run:
|
|
|
|
name: Setup for headless testing
|
|
|
|
command: sh -e /etc/init.d/xvfb start
|
|
|
|
- run:
|
|
|
|
name: Check for release
|
|
|
|
command: |
|
2017-11-03 04:45:30 +00:00
|
|
|
if [ -n "${RUN_RELEASE_BUILD}" ]; then
|
|
|
|
echo 'release build triggered from api'
|
|
|
|
echo 'export ELECTRON_RELEASE=1 TRIGGERED_BY_API=1' >> $BASH_ENV
|
|
|
|
fi
|
2017-09-28 17:05:42 +00:00
|
|
|
- run:
|
|
|
|
name: Bootstrap
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
|
|
|
echo 'Bootstrapping Electron for release build'
|
|
|
|
script/bootstrap.py --target_arch=$TARGET_ARCH
|
|
|
|
else
|
|
|
|
echo 'Bootstrapping Electron for debug build'
|
|
|
|
script/bootstrap.py --target_arch=$TARGET_ARCH --dev
|
|
|
|
fi
|
|
|
|
- run: npm run lint
|
|
|
|
- run:
|
|
|
|
name: Build
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
|
|
|
echo 'Building Electron for release'
|
|
|
|
script/build.py -c R
|
|
|
|
else
|
|
|
|
echo 'Building Electron for debug'
|
|
|
|
script/build.py -c D
|
|
|
|
fi
|
|
|
|
- run:
|
|
|
|
name: Create distribution
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ]; then
|
|
|
|
echo 'Creating Electron release distribution'
|
|
|
|
script/create-dist.py
|
|
|
|
else
|
|
|
|
echo 'Skipping create distribution because build is not for release'
|
|
|
|
fi
|
|
|
|
- run:
|
|
|
|
name: Upload distribution
|
|
|
|
command: |
|
2017-11-03 06:36:25 +00:00
|
|
|
if [ "$ELECTRON_RELEASE" == "1" ] && [ "$TRIGGERED_BY_API" != "1" ]; then
|
|
|
|
echo 'Uploading Electron release distribution to github releases'
|
2017-09-28 17:05:42 +00:00
|
|
|
script/upload.py
|
2017-11-03 04:45:30 +00:00
|
|
|
elif [ "$ELECTRON_RELEASE" == "1" ] && [ "$TRIGGERED_BY_API" == "1" ]; then
|
|
|
|
echo 'Uploading Electron release distribution to s3'
|
|
|
|
script/upload.py --upload_to_s3
|
2017-09-28 17:05:42 +00:00
|
|
|
else
|
|
|
|
echo 'Skipping upload distribution because build is not for release'
|
|
|
|
fi
|
|
|
|
- run:
|
|
|
|
name: Test
|
|
|
|
environment:
|
|
|
|
MOCHA_FILE: junit/test-results.xml
|
|
|
|
MOCHA_REPORTER: mocha-junit-reporter
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" != "1" ]; then
|
|
|
|
echo 'Testing Electron debug build'
|
|
|
|
mkdir junit
|
|
|
|
script/test.py --ci --rebuild_native_modules
|
|
|
|
else
|
|
|
|
echo 'Skipping testing on release build'
|
|
|
|
fi
|
|
|
|
- run:
|
|
|
|
name: Verify FFmpeg
|
|
|
|
command: |
|
|
|
|
if [ "$ELECTRON_RELEASE" != "1" ]; then
|
|
|
|
echo 'Verifying ffmpeg on debug build'
|
|
|
|
script/verify-ffmpeg.py
|
|
|
|
else
|
|
|
|
echo 'Skipping verify ffmpeg on release build'
|
|
|
|
fi
|
2017-11-08 03:55:24 +00:00
|
|
|
- run:
|
|
|
|
name: Generate Typescript Definitions
|
|
|
|
command: npm run create-typescript-definitions
|
2017-09-28 17:05:42 +00:00
|
|
|
- store_test_results:
|
|
|
|
path: junit
|
|
|
|
- store_artifacts:
|
|
|
|
path: junit
|
2017-11-08 03:55:24 +00:00
|
|
|
- store_artifacts:
|
|
|
|
path: out/electron.d.ts
|
|
|
|
- store_artifacts:
|
|
|
|
path: out/electron-api.json
|
2017-09-13 13:48:19 +00:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
build-arm:
|
|
|
|
jobs:
|
|
|
|
- electron-linux-arm
|
2017-12-13 19:42:01 +00:00
|
|
|
- electron-linux-arm-test:
|
|
|
|
requires:
|
|
|
|
- electron-linux-arm
|
2017-09-13 13:48:19 +00:00
|
|
|
build-arm64:
|
|
|
|
jobs:
|
|
|
|
- electron-linux-arm64
|
2017-12-13 19:42:01 +00:00
|
|
|
- electron-linux-arm64-test:
|
|
|
|
requires:
|
|
|
|
- electron-linux-arm64
|
2017-09-13 13:48:19 +00:00
|
|
|
build-ia32:
|
|
|
|
jobs:
|
|
|
|
- electron-linux-ia32
|
|
|
|
build-x64:
|
2017-12-13 19:42:01 +00:00
|
|
|
jobs:
|
|
|
|
- electron-linux-x64
|