diff --git a/.travis-build-socs.sh b/.travis-build-socs.sh new file mode 100755 index 000000000..54cd4301f --- /dev/null +++ b/.travis-build-socs.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +set -e + +# Some colors, use it like following; +# echo -e "Hello ${YELLOW}yellow${NC}" +GRAY='\033[0;30m' +GREEN='\033[0;32m' +YELLOW='\033[0;33m' +PURPLE='\033[0;35m' +NC='\033[0m' # No Color + +SPACER="echo -e ${GRAY} - ${NC}" + +travis_fold start "environment.create" +travis_time_start +echo -e "Setting up basic ${YELLOW}conda environment${NC}" +echo "-------------------------------------------------------------------" +conda env create -f environment.yml +source activate litex +echo "-------------------------------------------------------------------" +travis_time_finish +travis_fold end "environment.create" + +$SPACER + +SOC_FILES=$(find litex/boards/targets -name \*.py | grep -v sim | grep -v "__") + +COUNT=4 + +for SOC_FILE in $SOC_FILES; do + SOC=$(echo $SOC_FILE | sed -e's/\.py$//' -e's-/-.-g') + TARGET=$(echo $SOC | sed -e's/.*\.//') + + travis_fold start "$SOC.1" + travis_time_start + echo -e "Building ${GREEN}${TARGET}${NC} (${PURPLE}${SOC}${NC})" + echo "-------------------------------------------------------------------" + python -m $SOC --no-compile-gateware + echo "-------------------------------------------------------------------" + travis_time_finish + travis_fold end "$SOC.1" + travis_fold start "$SOC.2" + echo -e "Output of building ${GREEN}${TARGET}${NC} (${PURPLE}${SOC}${NC})" + echo "-------------------------------------------------------------------" + find soc_*$TARGET* | sort + echo "-------------------------------------------------------------------" + travis_fold end "$SOC.2" + + $SPACER +done diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..f870e95e0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,19 @@ +language: python +python: + - "3.6" + +install: + - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh + - bash miniconda.sh -b -p $HOME/miniconda + - export PATH="$HOME/miniconda/bin:$PATH" + - hash -r + - conda config --set always_yes yes --set changeps1 no + +before_script: + - export -f travis_nanoseconds + - export -f travis_fold + - export -f travis_time_start + - export -f travis_time_finish + +script: + - ./.travis-build-socs.sh diff --git a/README b/README index 02fdb5f59..1f8e4ca42 100644 --- a/README +++ b/README @@ -64,6 +64,23 @@ very easily! Migen documentation can be found here: https://m-labs.hk/migen/manual +[> Medium Quick start guide with Conda +----------------------------------------- + +0. Get miniconda by following instructions at https://conda.io/miniconda.html + +1. Clone LiteX + git clone --recurse-submodules https://github.com/enjoy-digital/litex.git + +2. Create a LiteX environment from environment.yml + conda env create -f environment.yml + +3. Enter conda environment + conda activate litex + +4. Build the target of your board...: + Go to boards/targets and execute the target you want to build + [> Quick start guide (for advanced users) ----------------------------------------- @@ -103,4 +120,4 @@ Migen documentation can be found here: https://m-labs.hk/migen/manual [> Contact ---------- -E-mail: florent [AT] enjoy-digital.fr \ No newline at end of file +E-mail: florent [AT] enjoy-digital.fr diff --git a/environment.yml b/environment.yml new file mode 100644 index 000000000..262e56bde --- /dev/null +++ b/environment.yml @@ -0,0 +1,13 @@ +name: litex +channels: + - timvideos +dependencies: + - python=3.6 + - pip + - binutils-lm32-elf + - gcc-lm32-elf-nostdc + - pip: + - git+https://github.com/m-labs/migen.git#egg=migen + - -e . + - git+https://github.com/enjoy-digital/liteeth.git#egg=liteeth + - git+https://github.com/enjoy-digital/litedram.git#egg=litedram