tests: Enable AArch64 Jenkins CI with unit tests for GNU

This commit enables the AArch64 Jenkins CI with build and running
unit tests for GNU toolchain.

Signed-off-by: Henry Wang <Henry.Wang@arm.com>
This commit is contained in:
Henry Wang 2020-06-17 18:16:19 +08:00 committed by Rob Bradford
parent ba3f1bcde2
commit 462c58d58b
4 changed files with 27 additions and 3 deletions

View File

@ -25,7 +25,7 @@ jobs:
- name: Install arm64 libfdt
run: wget http://ftp.us.debian.org/debian/pool/main/d/device-tree-compiler/libfdt-dev_1.6.0-1_arm64.deb && dpkg-deb -xv libfdt-dev_1.6.0-1_arm64.deb ./tlibfdtdev && sudo mkdir /tmmmp && mkdir target && mkdir target/debug && mkdir target/debug/deps && sudo cp ./tlibfdtdev/usr/lib/aarch64-linux-gnu/libfdt.a target/debug/deps/libfdt.a && echo "libfdt installed"
- name: Disable "with-serde" in kvm-bindings
run: sed -i 's/"with-serde",\ //g' vmm/Cargo.toml && sed -i 's/"with-serde",\ //g' hypervisor/Cargo.toml
run: sed -i 's/"with-serde",\ //g' hypervisor/Cargo.toml
- name: Build
uses: actions-rs/cargo@v1
with:

25
Jenkinsfile vendored
View File

@ -67,6 +67,29 @@ pipeline{
}
}
}
stage ('AArch64 worker build') {
agent { node { label 'bionic-arm64' } }
options {
timeout(time: 1, unit: 'HOURS')
}
stages {
stage ('Checkout') {
steps {
checkout scm
}
}
stage ('Build') {
steps {
sh "scripts/dev_cli.sh build --release"
}
}
stage ('Run unit tests') {
steps {
sh "scripts/dev_cli.sh tests --unit"
}
}
}
}
stage ('Worker build (musl)') {
agent { node { label 'bionic' } }
options {
@ -108,4 +131,4 @@ def cancelPreviousBuilds() {
build.doStop()
}
}
}
}

View File

@ -210,7 +210,7 @@ cmd_build() {
# A workaround on Arm64 to avoid build errors in kvm-bindings
if [ $(uname -m) = "aarch64" ]; then
sed -i 's/"with-serde",\ //g' "$CLH_ROOT_DIR"/vmm/Cargo.toml
sed -i 's/"with-serde",\ //g' "$CLH_ROOT_DIR"/hypervisor/Cargo.toml
fi
$DOCKER_RUNTIME run \

View File

@ -6,6 +6,7 @@ BUILD_TARGET=${BUILD_TARGET-x86_64-unknown-linux-gnu}
cargo_args=("$@")
[ $(uname -m) = "aarch64" ] && cargo_args+=("--no-default-features")
[ $(uname -m) = "aarch64" ] && cargo_args+=("--features mmio")
[ $(uname -m) = "aarch64" ] && sed -i 's/"with-serde",\ //g' hypervisor/Cargo.toml
cargo test --target $BUILD_TARGET --workspace --no-run ${cargo_args[@]}
pushd target/$BUILD_TARGET/debug