X Tutup
Skip to content

Commit 06481b5

Browse files
author
John Kleinschmidt
committed
Add testing for arm, arm64 and ia32 linux builds
1 parent a6228b9 commit 06481b5

File tree

6 files changed

+206
-2
lines changed

6 files changed

+206
-2
lines changed

.circleci/config.yml

Lines changed: 114 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,46 @@ jobs:
5858
else
5959
echo 'Skipping upload distribution because build is not for release'
6060
fi
61+
- run:
62+
name: Zip out directory
63+
command: |
64+
if [ "$ELECTRON_RELEASE" != "1" ]; then
65+
zip -r electron.zip out/D
66+
fi
67+
- persist_to_workspace:
68+
root: /home/builduser
69+
paths:
70+
- project/out
71+
- store_artifacts:
72+
path: electron.zip
73+
electron-linux-arm-test:
74+
machine: true
75+
steps:
76+
- attach_workspace:
77+
at: /tmp/workspace
78+
- checkout
79+
- run:
80+
name: Test in ARM docker container
81+
command: |
82+
if [ "$ELECTRON_RELEASE" != "1" ]; then
83+
docker run --rm --privileged multiarch/qemu-user-static:register --reset
84+
docker run -it \
85+
--mount type=bind,source=/tmp/workspace,target=/tmp/workspace \
86+
--rm electronbuilds/electronarm7:0.0.4 > version.txt
87+
cat version.txt
88+
if grep -q `script/get-version.py` version.txt; then
89+
echo "Versions match"
90+
else
91+
echo "Versions do not match"
92+
exit 1
93+
fi
94+
if grep -q "core dumped" version.txt; then
95+
echo "Core dump detected"
96+
exit 1
97+
fi
98+
else
99+
echo "Skipping test for release build"
100+
fi
61101
electron-linux-arm64:
62102
docker:
63103
- image: electronbuilds/electron:0.0.4
@@ -115,6 +155,46 @@ jobs:
115155
else
116156
echo 'Skipping upload distribution because build is not for release'
117157
fi
158+
- run:
159+
name: Zip out directory
160+
command: |
161+
if [ "$ELECTRON_RELEASE" != "1" ]; then
162+
zip -r electron.zip out/D
163+
fi
164+
- persist_to_workspace:
165+
root: /home/builduser
166+
paths:
167+
- project/out
168+
- store_artifacts:
169+
path: electron.zip
170+
electron-linux-arm64-test:
171+
machine: true
172+
steps:
173+
- attach_workspace:
174+
at: /tmp/workspace
175+
- checkout
176+
- run:
177+
name: Test in ARM64 docker container
178+
command: |
179+
if [ "$ELECTRON_RELEASE" != "1" ]; then
180+
docker run --rm --privileged multiarch/qemu-user-static:register --reset
181+
docker run -it \
182+
--mount type=bind,source=/tmp/workspace,target=/tmp/workspace \
183+
--rm electronbuilds/electronarm64:0.0.5 > version.txt
184+
cat version.txt
185+
if grep -q `script/get-version.py` version.txt; then
186+
echo "Versions match"
187+
else
188+
echo "Versions do not match"
189+
exit 1
190+
fi
191+
if grep -q "core dumped" version.txt; then
192+
echo "Core dump detected"
193+
exit 1
194+
fi
195+
else
196+
echo "Skipping test for release build"
197+
fi
118198
electron-linux-ia32:
119199
docker:
120200
- image: electronbuilds/electron:0.0.4
@@ -123,6 +203,9 @@ jobs:
123203
resource_class: xlarge
124204
steps:
125205
- checkout
206+
- run:
207+
name: Setup for headless testing
208+
command: sh -e /etc/init.d/xvfb start
126209
- run:
127210
name: Check for release
128211
command: |
@@ -172,6 +255,29 @@ jobs:
172255
else
173256
echo 'Skipping upload distribution because build is not for release'
174257
fi
258+
- run:
259+
name: Test
260+
environment:
261+
MOCHA_FILE: junit/test-results.xml
262+
MOCHA_REPORTER: mocha-junit-reporter
263+
command: |
264+
if [ "$ELECTRON_RELEASE" != "1" ]; then
265+
echo 'Testing Electron debug build'
266+
out/D/electron --version
267+
mkdir junit
268+
script/test.py --ci --rebuild_native_modules
269+
else
270+
echo 'Skipping testing on release build'
271+
fi
272+
- run:
273+
name: Verify FFmpeg
274+
command: |
275+
if [ "$ELECTRON_RELEASE" != "1" ]; then
276+
echo 'Verifying ffmpeg on debug build'
277+
script/verify-ffmpeg.py
278+
else
279+
echo 'Skipping verify ffmpeg on release build'
280+
fi
175281
electron-linux-mips64el:
176282
docker:
177283
- image: electronbuilds/electron:0.0.4
@@ -330,12 +436,18 @@ workflows:
330436
build-arm:
331437
jobs:
332438
- electron-linux-arm
439+
- electron-linux-arm-test:
440+
requires:
441+
- electron-linux-arm
333442
build-arm64:
334443
jobs:
335444
- electron-linux-arm64
445+
- electron-linux-arm64-test:
446+
requires:
447+
- electron-linux-arm64
336448
build-ia32:
337449
jobs:
338450
- electron-linux-ia32
339451
build-x64:
340-
jobs:
341-
- electron-linux-x64
452+
jobs:
453+
- electron-linux-x64

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*
22
!tools/xvfb-init.sh
3+
!tools/run-electron.sh

Dockerfile.arm64

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM multiarch/debian-debootstrap:arm64-jessie
2+
3+
RUN apt-get update && apt-get install -y\
4+
bison \
5+
build-essential \
6+
clang \
7+
curl \
8+
gperf \
9+
libasound2 \
10+
libasound2-dev \
11+
libcap-dev \
12+
libcups2-dev \
13+
libdbus-1-dev \
14+
libgconf-2-4 \
15+
libgconf2-dev \
16+
libgnome-keyring-dev \
17+
libgtk-3-0 \
18+
libgtk2.0-0 \
19+
libgtk2.0-dev \
20+
libnotify-dev \
21+
libnss3 \
22+
libnss3-dev \
23+
libx11-xcb-dev \
24+
libxss1 \
25+
libxtst-dev \
26+
libxtst6 \
27+
python-dbusmock \
28+
wget \
29+
xvfb
30+
31+
ADD tools/xvfb-init.sh /etc/init.d/xvfb
32+
RUN chmod a+x /etc/init.d/xvfb
33+
ADD tools/run-electron.sh /run-electron.sh
34+
RUN chmod a+x /run-electron.sh
35+
CMD sh /run-electron.sh

Dockerfile.armv7

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
FROM multiarch/debian-debootstrap:armhf-jessie
2+
3+
RUN apt-get update && apt-get install -y\
4+
bison \
5+
build-essential \
6+
clang \
7+
curl \
8+
gperf \
9+
libasound2 \
10+
libasound2-dev \
11+
libcap-dev \
12+
libcups2-dev \
13+
libdbus-1-dev \
14+
libgconf-2-4 \
15+
libgconf2-dev \
16+
libgnome-keyring-dev \
17+
libgtk-3-0 \
18+
libgtk2.0-0 \
19+
libgtk2.0-dev \
20+
libnotify-dev \
21+
libnss3 \
22+
libnss3-dev \
23+
libx11-xcb-dev \
24+
libxss1 \
25+
libxtst-dev \
26+
libxtst6 \
27+
python-dbusmock \
28+
git \
29+
wget \
30+
xvfb
31+
32+
# Install node.js
33+
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
34+
RUN apt-get update && apt-get install -y nodejs
35+
36+
ADD tools/xvfb-init.sh /etc/init.d/xvfb
37+
RUN chmod a+x /etc/init.d/xvfb
38+
ADD tools/run-electron.sh /run-electron.sh
39+
RUN chmod a+x /run-electron.sh
40+
41+
CMD sh /run-electron.sh

script/get-version.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env python
2+
3+
import sys
4+
5+
from lib.util import get_electron_version
6+
7+
def main():
8+
print get_electron_version()
9+
10+
if __name__ == '__main__':
11+
sys.exit(main())

tools/run-electron.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export DISPLAY=":99.0"
2+
sh -e /etc/init.d/xvfb start
3+
cd /tmp/workspace/project/
4+
out/D/electron --version

0 commit comments

Comments
 (0)
X Tutup