Add TravisCI build using docker (#130)

* Create befor_install.sh

* Create install_deps.sh

* Create build_onnx_mlir.sh

* Create .travis.yml

* Update .travis.yml

* Delete befor_install.sh

* Create before_install.sh

* Create .travis.yml

* Update before_install.sh

* Delete .travis.yml

* Update install_deps.sh

* Update build_onnx_mlir.sh

* Update build_onnx_mlir.sh

* Update .travis.yml

* Update before_install.sh

* Update .travis.yml

* Create install_LLVM.sh

* Create compile_LLVM.sh

* Create compile_ONNX-MLIR.sh

* Create test_ONNX-MLIR.sh

* try to start travis

* fix indentation in .travis.yml

* add debug code to second job

* Update .travis.yml

* Update .travis.yml

* add workspaces to travis script

* Update .travis.yml

* Update .travis.yml

* Update .travis.yml

* Update .travis.yml

* Update .travis.yml

* Update compile_LLVM.sh

* Update compile_LLVM.sh

* Update .travis.yml

* Update install_LLVM.sh

* Update compile_LLVM.sh

* Update .travis.yml

* Create Dockerfile

* Create compile-onnx-mlir.sh

* Update .travis.yml

* Delete before_install.sh

* Delete build_onnx_mlir.sh

* Delete compile_LLVM.sh

* Delete install_LLVM.sh

* Delete install_deps.sh

* Delete test_ONNX-MLIR.sh

* Delete compile_ONNX-MLIR.sh

Co-authored-by: Gheorghe-Teodor Bercea <gt.bercea@gmail.com>
This commit is contained in:
Kevin O'Brien 2020-05-18 10:24:05 -04:00 committed by GitHub
parent 1d5adc555d
commit 30a9070c8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 40 additions and 0 deletions

10
.travis.yml Normal file
View File

@ -0,0 +1,10 @@
sudo: required
services:
- docker
language: cpp
dist: bionic
script:
- cd docker
- chmod a+x compile-onnx-mlir.sh
- docker build --tag onnx-mlir-build:initial .

17
docker/Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM caoimhinuibrian/onnx-mlir-llvmimage:initial
WORKDIR /build
ENV HOME=/build
ENV PYENV_ROOT=$HOME/.pyenv
ENV PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
RUN pyenv global 3.7.0
RUN pyenv rehash
RUN mkdir bin
ENV PATH=$PATH:/build/bin
RUN git clone --recursive https://github.com/onnx/onnx-mlir.git
COPY compile-onnx-mlir.sh bin/compile-onnx-mlir.sh
RUN compile-onnx-mlir.sh
WORKDIR /build/onnx-mlir/build
ENV LIT_OPT=v
RUN cmake --build . --target check-onnx-lit

View File

@ -0,0 +1,13 @@
#!/bin/bash
# Export environment variables pointing to LLVM-Projects
export LLVM_PROJ_SRC=$(pwd)/llvm-project/
export LLVM_PROJ_BUILD=$(pwd)/llvm-project/build
HOME=/
PYENV_ROOT=$HOME/.pyenv
PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
eval "$(pyenv init -)"
# use python 3
pyenv shell 3.7.0
mkdir onnx-mlir/build && cd onnx-mlir/build
cmake ..
cmake --build . --target onnx-mlir