diff options
author | Dean Arnold <dean.arnold@arm.com> | 2021-04-30 14:05:48 +0100 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2021-05-06 08:59:27 +0300 |
commit | 47f428d76228dba24d9366c23a72ee58794ea602 (patch) | |
tree | f1500e9d6e7b08abf88b069f1fee11e92d19d810 /scripts | |
parent | f5beb3931b062ac8679558dd3a7b440e50d71c42 (diff) |
github_ci: enable native arm64 ci jobs
To enable the arm64 CI, ci-pipeline-arm64.yaml file has been added
with approximately 40+ jobs. Some of the CI scripts were also
modified to add an ARCH environment variable for allowing native
arm64 builds for the jobs.
Jobs have been restricted to only run when the repo is owned by
OpenDataPlane. This is to prevent the CI triggering on forks of the
project where Graviton2 self-hosted runners are not available.
Signed-off-by: Dean Arnold <dean.arnold@arm.com>
Signed-off-by: Malvika Gupta <Malvika.Gupta@arm.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/ci/build.sh | 4 | ||||
-rwxr-xr-x | scripts/ci/build_arm64.sh | 4 | ||||
-rwxr-xr-x | scripts/ci/check.sh | 2 | ||||
-rwxr-xr-x | scripts/ci/check_inline_timer.sh | 2 | ||||
-rwxr-xr-x | scripts/ci/check_pktio.sh | 2 |
5 files changed, 9 insertions, 5 deletions
diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh index 12f2c7d64..d92d830d4 100755 --- a/scripts/ci/build.sh +++ b/scripts/ci/build.sh @@ -4,7 +4,7 @@ set -e cd "$(dirname "$0")"/../.. ./bootstrap ./configure \ - --host=${TARGET_ARCH} --build=x86_64-linux-gnu \ + --host=${TARGET_ARCH} --build=${BUILD_ARCH:-x86_64-linux-gnu} \ --enable-dpdk \ --prefix=/opt/odp \ ${CONF} @@ -17,7 +17,7 @@ make install pushd ${HOME} ${CC} ${CFLAGS} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst_dynamic `PKG_CONFIG_PATH=/opt/odp/lib/pkgconfig:${PKG_CONFIG_PATH} pkg-config --cflags --libs libodp-linux` -if [ -z "$TARGET_ARCH" ] +if [ -z "$TARGET_ARCH" ] || [ "$TARGET_ARCH" == "$BUILD_ARCH" ] then LD_LIBRARY_PATH="/opt/odp/lib:$LD_LIBRARY_PATH" ./odp_hello_inst_dynamic fi diff --git a/scripts/ci/build_arm64.sh b/scripts/ci/build_arm64.sh index abdc5acb8..ad3b95e75 100755 --- a/scripts/ci/build_arm64.sh +++ b/scripts/ci/build_arm64.sh @@ -2,6 +2,10 @@ set -e export TARGET_ARCH=aarch64-linux-gnu +if [[ $(uname -m) =~ ^(arm64|aarch64)$ ]]; then + export BUILD_ARCH=aarch64-linux-gnu +fi + if [ "${CC#clang}" != "${CC}" ] ; then export CC="clang --target=${TARGET_ARCH}" export CXX="clang++ --target=${TARGET_ARCH}" diff --git a/scripts/ci/check.sh b/scripts/ci/check.sh index 948149300..cfb9e4b55 100755 --- a/scripts/ci/check.sh +++ b/scripts/ci/check.sh @@ -5,7 +5,7 @@ echo 1500 | tee /proc/sys/vm/nr_hugepages mkdir -p /mnt/huge mount -t hugetlbfs nodev /mnt/huge -"`dirname "$0"`"/build_x86_64.sh +"`dirname "$0"`"/build_${ARCH}.sh cd "$(dirname "$0")"/../.. diff --git a/scripts/ci/check_inline_timer.sh b/scripts/ci/check_inline_timer.sh index d2eff7145..1fa9c21f5 100755 --- a/scripts/ci/check_inline_timer.sh +++ b/scripts/ci/check_inline_timer.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -"`dirname "$0"`"/build_x86_64.sh +"`dirname "$0"`"/build_${ARCH}.sh cd "$(dirname "$0")"/../.. diff --git a/scripts/ci/check_pktio.sh b/scripts/ci/check_pktio.sh index d82fe8aad..e61bacc98 100755 --- a/scripts/ci/check_pktio.sh +++ b/scripts/ci/check_pktio.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -"`dirname "$0"`"/build_x86_64.sh +"`dirname "$0"`"/build_${ARCH}.sh cd "$(dirname "$0")"/../.. |