Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow CI testing on arm64 hardware #12080

Merged
merged 2 commits into from Mar 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
63 changes: 63 additions & 0 deletions Dockerfile.arm64v8
@@ -0,0 +1,63 @@
FROM arm64v8/ubuntu:16.04

RUN groupadd --gid 1000 builduser \
&& useradd --uid 1000 --gid builduser --shell /bin/bash --create-home builduser

RUN groupadd --gid 114 jenkins \
&& useradd --uid 110 --gid jenkins --shell /bin/bash --create-home jenkins

# Set up TEMP directory
ENV TEMP=/tmp
RUN chmod a+rwx /tmp

RUN apt-get update && apt-get install -y\
bison \
build-essential \
clang \
curl \
gperf \
git \
libasound2 \
libasound2-dev \
libcap-dev \
libcups2-dev \
libdbus-1-dev \
libgconf-2-4 \
libgconf2-dev \
libgnome-keyring-dev \
libgtk2.0-0 \
libgtk2.0-dev \
libgtk-3-0 \
libgtk-3-dev \
libnotify-dev \
libnss3 \
libnss3-dev \
libx11-xcb-dev \
libxss1 \
libxtst-dev \
libxtst6 \
lsb-release \
locales \
ninja \
python-setuptools \
python-pip \
python-dbusmock \
wget \
xvfb

# Install node.js
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get update && apt-get install -y nodejs

# Install crcmod
RUN pip install -U crcmod

ADD tools/xvfb-init.sh /etc/init.d/xvfb
RUN chmod a+x /etc/init.d/xvfb

# Install ninja in /usr/local
RUN cd /usr/local && git clone https://github.com/martine/ninja.git -b v1.5.3
RUN cd /usr/local/ninja && ./configure.py --bootstrap

USER builduser
WORKDIR /home/builduser
35 changes: 35 additions & 0 deletions Jenkinsfile.arm64
@@ -0,0 +1,35 @@
pipeline {
agent {
docker {
image 'electronbuilds/arm64v8:0.0.1'
args '--privileged'
}
}
environment {
TARGET_ARCH='arm64'
DISPLAY=':99.0'
}
stages {
stage('Bootstrap') {
steps {
sh 'script/bootstrap.py -v --dev --target_arch=$TARGET_ARCH'
}
}
stage('Build') {
steps {
sh 'script/build.py -c D --ninja-path /usr/local/ninja/ninja'
}
}
stage('Test') {
steps {
sh '/etc/init.d/xvfb start'
sh 'script/test.py --ci'
}
}
}
post {
always {
cleanWs()
}
}
}
9 changes: 0 additions & 9 deletions brightray/brightray.gyp
Expand Up @@ -161,7 +161,6 @@
'-ldl',
'-lresolv',
'-lfontconfig',
'-lfreetype',
'-lexpat',
],
},
Expand All @@ -173,14 +172,6 @@
],
},
}],
# On ARM64 libchromiumcontent always links to system libfreetype
['target_arch=="arm64"', {
'link_settings': {
'libraries': [
'-lfreetype',
],
},
}],
],
}], # OS=="linux"
['OS=="mac"', {
Expand Down
8 changes: 7 additions & 1 deletion script/update-clang.sh
Expand Up @@ -24,6 +24,7 @@ STAMP_FILE="${LLVM_DIR}/../llvm-build/cr_build_revision"
LLVM_REPO_URL=${LLVM_URL:-https://llvm.org/svn/llvm-project}

CDS_URL=https://commondatastorage.googleapis.com/chromium-browser-clang
S3_URL=https://s3.amazonaws.com/gh-contractor-zcbenz/clang


# Die if any command dies, error on undefined variable expansions.
Expand All @@ -49,7 +50,12 @@ CDS_FILE="clang-${PACKAGE_VERSION}.tgz"
CDS_OUT_DIR=$(mktemp -d -t clang_download.XXXXXX)
CDS_OUTPUT="${CDS_OUT_DIR}/${CDS_FILE}"
if [ "${OS}" = "Linux" ]; then
CDS_FULL_URL="${CDS_URL}/Linux_x64/${CDS_FILE}"
ARCH="$(uname -m)"
if [ "${ARCH}" = "aarch64" ]; then
CDS_FULL_URL="${S3_URL}/arm64/${CDS_FILE}"
else
CDS_FULL_URL="${CDS_URL}/Linux_x64/${CDS_FILE}"
fi
elif [ "${OS}" = "Darwin" ]; then
CDS_FULL_URL="${CDS_URL}/Mac/${CDS_FILE}"
fi
Expand Down
3 changes: 2 additions & 1 deletion spec/modules-spec.js
Expand Up @@ -33,7 +33,8 @@ describe('modules support', () => {
// https://github.com/electron/electron/issues/11274
xdescribe('ffi', () => {
before(function () {
if (!nativeModulesEnabled || process.platform === 'win32') {
if (!nativeModulesEnabled || process.platform === 'win32' ||
process.arch === 'arm64') {
this.skip()
}
})
Expand Down
2 changes: 1 addition & 1 deletion vendor/libchromiumcontent
Submodule libchromiumcontent updated 35 files
+1 −2 .gitignore
+2 −2 README.md
+8 −23 chromiumcontent/args/ffmpeg.gn
+7 −20 chromiumcontent/args/shared_library.gn
+7 −20 chromiumcontent/args/static_library.gn
+0 −41 patches-mips64el/001-Use-system-ninja-build-instead-of-ninja-in-depot_too.patch
+0 −76 patches-mips64el/002-Add-support-for-mips64-with-build-gn.patch
+0 −154 patches-mips64el/003-Add-mips64el-support-and-loongson3a-for-compiler.patch
+5 −5 patches-mips64el/007-Add-mips64el-redhat-linux-to-gcc_toolchain-for-mips6.patch
+0 −25 patches-mips64el/008-Add-mips64-support-for-sysroot.patch
+53,617 −0 patches-mips64el/011-backport-sqlite-8a87f7e.patch
+308 −0 patches-mips64el/012-backport-sqlite-9851f2e.patch
+18,215 −0 patches-mips64el/013-backport-sqlite-3d8ec48.patch
+46 −0 patches-mips64el/014-support-old-nss.patch
+0 −60 patches-mips64el/third_party/ffmpeg/001-Fix-build_ffmpeg.py-with-mips64-support.patch
+1 −1 patches-mips64el/third_party/ffmpeg/002-Fix-build_ffmpeg-with-cross-prefix-mips64el-redhat-l.patch
+0 −68 patches-mips64el/v8/001-Fix-v8-sunspider-1.0.2-some-cases-test-failed-with-u.patch
+37 −0 patches/002-dcheck.patch
+13 −0 patches/082-fix-arm64-linking-error.patch
+118 −0 patches/v8/037-backport_76c3ac5.patch
+788 −0 patches/v8/038-cherry_pick_dbfe4a49d8.patch
+12 −0 patches/v8/039-cherry_pick_c3458a8.patch
+124 −0 patches/v8/040-cherry_pick_50f7455.patch
+23 −0 patches/v8/041-backport_a2b91ed.patch
+284 −0 patches/v8/041-cherry_pick_ac0fe8ec.patch
+35 −0 patches/v8/042-backport_3ecb047.patch
+15 −12 script/apply-patches
+3 −18 script/build
+8 −25 script/create-dist
+23 −0 script/lib/config.py
+80 −0 script/lib/patches.py
+0 −9 script/mips64el/ninja-mips64el
+0 −50 script/mips64el/runhooks-mips64el
+15 −23 script/patch.py
+12 −46 script/update