mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 13:05:45 +00:00
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:
parent
ba3f1bcde2
commit
462c58d58b
2
.github/workflows/cross-build.yaml
vendored
2
.github/workflows/cross-build.yaml
vendored
@ -25,7 +25,7 @@ jobs:
|
|||||||
- name: Install arm64 libfdt
|
- 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"
|
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
|
- 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
|
- name: Build
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
|
23
Jenkinsfile
vendored
23
Jenkinsfile
vendored
@ -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)') {
|
stage ('Worker build (musl)') {
|
||||||
agent { node { label 'bionic' } }
|
agent { node { label 'bionic' } }
|
||||||
options {
|
options {
|
||||||
|
@ -210,7 +210,7 @@ cmd_build() {
|
|||||||
|
|
||||||
# A workaround on Arm64 to avoid build errors in kvm-bindings
|
# A workaround on Arm64 to avoid build errors in kvm-bindings
|
||||||
if [ $(uname -m) = "aarch64" ]; then
|
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
|
fi
|
||||||
|
|
||||||
$DOCKER_RUNTIME run \
|
$DOCKER_RUNTIME run \
|
||||||
|
@ -6,6 +6,7 @@ BUILD_TARGET=${BUILD_TARGET-x86_64-unknown-linux-gnu}
|
|||||||
cargo_args=("$@")
|
cargo_args=("$@")
|
||||||
[ $(uname -m) = "aarch64" ] && cargo_args+=("--no-default-features")
|
[ $(uname -m) = "aarch64" ] && cargo_args+=("--no-default-features")
|
||||||
[ $(uname -m) = "aarch64" ] && cargo_args+=("--features mmio")
|
[ $(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[@]}
|
cargo test --target $BUILD_TARGET --workspace --no-run ${cargo_args[@]}
|
||||||
pushd target/$BUILD_TARGET/debug
|
pushd target/$BUILD_TARGET/debug
|
||||||
|
Loading…
Reference in New Issue
Block a user