2020-05-18 22:24:05 +08:00
|
|
|
sudo: required
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
language: cpp
|
|
|
|
dist: bionic
|
2020-05-30 05:22:13 +08:00
|
|
|
arch:
|
|
|
|
- s390x
|
|
|
|
- ppc64le
|
|
|
|
- amd64
|
|
|
|
script:
|
|
|
|
- echo "CPU Architecture is " $TRAVIS_CPU_ARCH
|
|
|
|
- echo "commit is " $TRAVIS_COMMIT
|
|
|
|
- df -h
|
|
|
|
- if [ "$TRAVIS_COMMIT_MESSAGE" == "Update MLIR version" ]; then
|
|
|
|
echo "Building Prereq";
|
|
|
|
docker build --tag onnxmlirczar/onnx-mlir-llvmimage:$TRAVIS_CPU_ARCH -f ./docker/prereq.$TRAVIS_CPU_ARCH.Dockerfile ./utils;
|
|
|
|
docker login -u onnxmlirczar -p 143f1da2-332f-45a1-8587-d6cb07c13230
|
|
|
|
docker push onnxmlirczar/onnx-mlir-llvmimage:$TRAVIS_CPU_ARCH
|
|
|
|
exit;
|
|
|
|
else
|
|
|
|
echo "Regular Build";
|
|
|
|
fi
|
|
|
|
- docker build --tag onnx-mlir-build:initial --build-arg BASE="onnxmlirczar/onnx-mlir-image:$TRAVIS_CPU_ARCH" -f ./docker/$TRAVIS_CPU_ARCH.Dockerfile ./docker
|
2020-05-21 22:41:00 +08:00
|
|
|
- docker run -itd --name build onnx-mlir-build:initial
|
2020-05-30 05:22:13 +08:00
|
|
|
- echo "docker is running now"
|
|
|
|
- df -h
|
2020-05-21 22:41:00 +08:00
|
|
|
- docker cp $(pwd) build:/build/onnx-mlir
|
2020-05-18 22:24:05 +08:00
|
|
|
- cd docker
|
|
|
|
- chmod a+x compile-onnx-mlir.sh
|
2020-05-21 22:41:00 +08:00
|
|
|
- docker cp compile-onnx-mlir.sh build:/usr/bin/compile-onnx-mlir.sh
|
2020-05-30 05:22:13 +08:00
|
|
|
- echo "about to execute build inside docker"
|
|
|
|
- docker exec build df -h
|
|
|
|
- docker exec build compile-onnx-mlir.sh
|
2020-05-21 22:41:00 +08:00
|
|
|
- docker commit build onnxmlirczar/onnx-mlir-build:latest
|
|
|
|
after_success:
|
|
|
|
- if [ $TRAVIS_PULL_REQUEST == false ] && [ $TRAVIS_BRANCH == "master" ]; then
|
|
|
|
echo "Pushing new build to docker hub";
|
|
|
|
docker login -u onnxmlirczar -p 143f1da2-332f-45a1-8587-d6cb07c13230;
|
2020-05-30 05:22:13 +08:00
|
|
|
docker push onnxmlirczar/onnx-mlir-build:$TRAVIS_CPU_ARCH;
|
2020-05-21 22:41:00 +08:00
|
|
|
else
|
|
|
|
echo "Skip pushing build";
|
|
|
|
fi
|