diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..fff1313 --- /dev/null +++ b/.travis.yml @@ -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 . + diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..aa0ec97 --- /dev/null +++ b/docker/Dockerfile @@ -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 diff --git a/docker/compile-onnx-mlir.sh b/docker/compile-onnx-mlir.sh new file mode 100644 index 0000000..c847e09 --- /dev/null +++ b/docker/compile-onnx-mlir.sh @@ -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