Skip to content

Commit

Permalink
update travis for arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
anmol372 committed Sep 24, 2024
1 parent 79a6739 commit b9a1ce5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 33 deletions.
34 changes: 4 additions & 30 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,14 @@
os: linux
arch: arm64-graviton2
language: c++
compiler:
- gcc
services: docker
os: linux
dist: jammy

jobs:
include:
- stage: check
if: tag IS NOT present
addons:
apt:
packages:
- libuv1-dev
- libboost-all-dev
- rapidjson-dev
- autoconf
- openjdk-11-jdk-headless
- maven
- lcov
- cmake
- libunbound8
- libunbound-dev
# In case we need to run perf, install the below in bionic:
# linux-tools-common
# linux-tools-4.15.0-72-generic
install: bash ./.travis/install-dependencies.sh
before_script: sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
env:
- TEST_SUITE=travis-build.sh
script: bash ./.travis/$TEST_SUITE
after_success:
- bash ./.travis/coveralls-deploy.sh

- stage: build-images
if: tag IS present
before_install:
- mkdir -vp ~/.docker/cli-plugins/
- curl --silent -L "https://github.com/docker/buildx/releases/download/v0.3.0/buildx-v0.3.0.linux-amd64" > ~/.docker/cli-plugins/docker-buildx
Expand All @@ -46,8 +20,8 @@ jobs:
- export UPSTREAM_ID=81c2369
script:
- echo "Skip running UTs"
- git clone http://www.github.com/noironetworks/cicd -b main /tmp/cicd
- /tmp/cicd/travis/check-git-tag.sh; RETURN_CODE=$? ; if [ $RETURN_CODE -eq 140 ]; then travis_terminate 0; elif [ $RETURN_CODE -ne 0 ]; then travis_terminate $RETURN_CODE; fi
- git clone http://www.github.com/noironetworks/cicd -b arm64-build /tmp/cicd
#- /tmp/cicd/travis/check-git-tag.sh; RETURN_CODE=$? ; if [ $RETURN_CODE -eq 140 ]; then travis_terminate 0; elif [ $RETURN_CODE -ne 0 ]; then travis_terminate $RETURN_CODE; fi
- /tmp/cicd/travis/build-push-opflex-images.sh || travis_terminate 1

cache:
Expand Down
6 changes: 3 additions & 3 deletions docker/travis/build-opflex-travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ set -Eeuxo pipefail

echo "starting opflex build"

docker buildx build $BUILDARG $SECOPT --platform linux/arm64 -t $DOCKER_HUB_ID/opflex-build-base:$DOCKER_TAG -f $DOCKER_DIR/Dockerfile-opflex-build-base . &> /tmp/opflex-build-base.log &
docker build $BUILDARG $SECOPT -t $DOCKER_HUB_ID/opflex-build-base:$DOCKER_TAG -f $DOCKER_DIR/Dockerfile-opflex-build-base . &> /tmp/opflex-build-base.log &
while [ ! -f /tmp/opflex-build-base.log ]; do sleep 10; done
tail -f /tmp/opflex-build-base.log | awk 'NR%100-1==0' &

Expand All @@ -45,7 +45,7 @@ tar cvfz opflex.tgz opflex
cp opflex.tgz opflex/
popd

docker buildx build $BUILDARG --build-arg DOCKER_HUB_ID=$DOCKER_HUB_ID --build-arg DOCKER_TAG=$DOCKER_TAG $SECOPT --platform linux/arm64 -t $DOCKER_HUB_ID/opflex-build:$DOCKER_TAG -f $DOCKER_DIR/Dockerfile-opflex-build $OPFLEX_DIR &> /tmp/opflex-build.log &
docker build $BUILDARG --build-arg DOCKER_HUB_ID=$DOCKER_HUB_ID --build-arg DOCKER_TAG=$DOCKER_TAG $SECOPT -t $DOCKER_HUB_ID/opflex-build:$DOCKER_TAG -f $DOCKER_DIR/Dockerfile-opflex-build $OPFLEX_DIR &> /tmp/opflex-build.log &
#docker buildx build $SECOPT --platform linux/arm64 -t $DOCKER_HUB_ID/opflex-build:$DOCKER_TAG -f $DOCKER_DIR/Dockerfile-opflex-build $OPFLEX_DIR
##docker push $DOCKER_HUB_ID/opflex-build$DOCKER_TAG
while [ ! -f /tmp/opflex-build.log ]; do sleep 10; done
Expand Down Expand Up @@ -124,4 +124,4 @@ mkdir build/opflex/dist/licenses
cp $DOCKER_DIR/../licenses/* build/opflex/dist/licenses

#######################################################################################
docker buildx build $BUILDARG --platform linux/arm64 -t $DOCKER_HUB_ID/opflex:$DOCKER_TAG -f ./build/opflex/dist/Dockerfile-opflex build/opflex/dist
docker build $BUILDARG -t $DOCKER_HUB_ID/opflex:$DOCKER_TAG -f ./build/opflex/dist/Dockerfile-opflex build/opflex/dist

0 comments on commit b9a1ce5

Please sign in to comment.