travis: generate kc705 and pipistrello binaries in container env

This commit is contained in:
Yann Sionneau 2015-04-04 16:27:43 +02:00 committed by Sebastien Bourdeauducq
parent d8917fd94f
commit 1530f9f457
7 changed files with 91 additions and 26 deletions

View File

@ -1,21 +1,20 @@
language: python language: python
python: python:
- '3.4' - '3.4'
sudo: false
env: env:
global: global:
- MSCDIR=$TRAVIS_BUILD_DIR/misoc - MSCDIR=$TRAVIS_BUILD_DIR/misoc
- PATH=$HOME/miniconda/bin:/usr/local/llvm-or1k/bin:$PATH - PATH=$HOME/miniconda/bin:/usr/local/llvm-or1k/bin:$PATH
- CC=gcc-4.7
- CXX=g++-4.7
- BUILD_SOC=1 - BUILD_SOC=1
- secure: "DUk/Ihg8KbbzEgPF0qrHqlxU8e8eET9i/BtzNvFddIGX4HP/P2qz0nk3cVkmjuWhqJXSbC22RdKME9qqPzw6fJwJ6dpJ3OR6dDmSd7rewavq+niwxu52PVa+yK8mL4yf1terM7QQ5tIRf+yUL9qGKrZ2xyvEuRit6d4cFep43Ws=" - secure: "DUk/Ihg8KbbzEgPF0qrHqlxU8e8eET9i/BtzNvFddIGX4HP/P2qz0nk3cVkmjuWhqJXSbC22RdKME9qqPzw6fJwJ6dpJ3OR6dDmSd7rewavq+niwxu52PVa+yK8mL4yf1terM7QQ5tIRf+yUL9qGKrZ2xyvEuRit6d4cFep43Ws="
before_install: before_install:
- mkdir -p $HOME/.mlabs
- if [ $TRAVIS_PULL_REQUEST != false ]; then BUILD_SOC=0; fi - if [ $TRAVIS_PULL_REQUEST != false ]; then BUILD_SOC=0; fi
- ./.travis/get-toolchain.sh - . ./.travis/get-toolchain.sh
- if [ $BUILD_SOC -ne 0 ]; then ./.travis/get-xilinx.sh; fi - if [ $BUILD_SOC -ne 0 ]; then ./.travis/get-xilinx.sh; fi
- ./.travis/get-anaconda.sh - ./.travis/get-anaconda.sh
- source $HOME/miniconda/bin/activate py34 - source $HOME/miniconda/bin/activate py34
- sudo apt-get install --force-yes -y iverilog
- conda install pip coverage binstar migen cython - conda install pip coverage binstar migen cython
- pip install coveralls - pip install coveralls
install: install:

View File

@ -9,3 +9,4 @@ conda info -a
conda install conda-build jinja2 conda install conda-build jinja2
conda create -q -n py34 python=$TRAVIS_PYTHON_VERSION conda create -q -n py34 python=$TRAVIS_PYTHON_VERSION
conda config --add channels fallen conda config --add channels fallen
conda config --add channels https://conda.binstar.org/fallen/channel/dev

View File

@ -1,10 +1,23 @@
#!/bin/sh #!/bin/sh
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test packages="https://people.phys.ethz.ch/~robertjo/artiq-dev/or1k-gcc_20141105-1_amd64.deb
sudo apt-add-repository -y "deb http://www.phys.ethz.ch/~robertjo/artiq-dev ./" https://people.phys.ethz.ch/~robertjo/artiq-dev/or1k-binutils_20141105-1_amd64.deb
sudo apt-add-repository -y "deb http://archive.ubuntu.com/ubuntu saucy main universe" http://us.archive.ubuntu.com/ubuntu/pool/universe/i/iverilog/iverilog_0.9.7-1_amd64.deb"
sudo apt-get -qq --force-yes -y update
sudo apt-get install --force-yes -y gcc-4.7 g++-4.7 artiq-dev mkdir -p packages
for p in $packages
do
wget $p
pkg_name=$(echo $p | sed -e 's!.*/\(.*\)\.deb!\1\.deb!')
dpkg -x $pkg_name packages
done
export PATH=$PWD/packages/usr/local/bin:$PWD/packages/usr/bin:$PATH
export LD_LIBRARY_PATH=$PWD/packages/usr/lib/x86_64-linux-gnu:$PWD/packages/usr/local/x86_64-unknown-linux-gnu/or1k-elf/lib:$LD_LIBRARY_PATH
echo -e "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $HOME/.mlabs/build_settings.sh
or1k-elf-as --version or1k-elf-as --version
or1k-elf-gcc --version or1k-elf-gcc --version
clang --version clang --version

View File

@ -1,9 +1,35 @@
#!/bin/sh #!/bin/sh
wget http://www.phys.ethz.ch/~robertjo/xilinx_ise_14.7_s3_s6.tar.gz.gpg wget http://sionneau.net/artiq/Xilinx/xilinx_ise_14.7_s3_s6.tar.gz.gpg
echo "$secret" | gpg --passphrase-fd 0 xilinx_ise_14.7_s3_s6.tar.gz.gpg echo "$secret" | gpg --passphrase-fd 0 xilinx_ise_14.7_s3_s6.tar.gz.gpg
sudo tar -C / -xzf xilinx_ise_14.7_s3_s6.tar.gz tar -C $HOME/ -xzf xilinx_ise_14.7_s3_s6.tar.gz
wget http://www.phys.ethz.ch/~robertjo/xilinx_webpack.lic.gpg wget http://sionneau.net/artiq/Xilinx/Xilinx_Vivado_2015_1_k7.tar.gz.gpg
echo "$secret" | gpg --passphrase-fd 0 xilinx_webpack.lic.gpg echo "$secret" | gpg --passphrase-fd 0 Xilinx_Vivado_2015_1_k7.tar.gz.gpg
mkdir ~/.Xilinx tar -C $HOME/ -xzf Xilinx_Vivado_2015_1_k7.tar.gz
mv xilinx_webpack.lic ~/.Xilinx/Xilinx.lic
# Relocate Vivado from /opt to $HOME
for i in $(grep -Rsn "/opt/Xilinx" $HOME/Xilinx | cut -d':' -f1)
do
sed -i -e "s!/opt!$HOME!g" $i
done
# Relocate ISE from /opt to $HOME
for i in $(grep -Rsn "/opt/Xilinx" $HOME/opt | cut -d':' -f1)
do
sed -i -e "s!/opt/Xilinx!$HOME/opt/Xilinx!g" $i
done
wget http://sionneau.net/artiq/Xilinx/Xilinx.lic.gpg
echo "$secret" | gpg --passphrase-fd 0 Xilinx.lic.gpg
mkdir -p ~/.Xilinx
mv Xilinx.lic ~/.Xilinx/Xilinx.lic
# Tell mibuild where Vivado is installed
echo "MISOC_EXTRA_VIVADO_CMDLINE=\"-Ob vivado_path $HOME/Xilinx/Vivado\"" >> $HOME/.mlabs/build_settings.sh
echo "MISOC_EXTRA_ISE_CMDLINE=\"-Ob ise_path $HOME/opt/Xilinx/\"" >> $HOME/.mlabs/build_settings.sh
# Lie to Vivado by hooking the ioctl used to retrieve mac address for license verification
git clone https://github.com/fallen/impersonate_macaddress
make -C impersonate_macaddress
echo "export MACADDR=$macaddress" >> $HOME/.mlabs/build_settings.sh
echo "export LD_PRELOAD=$PWD/impersonate_macaddress/impersonate_macaddress.so" >> $HOME/.mlabs/build_settings.sh

View File

@ -1,19 +1,43 @@
#!/bin/bash #!/bin/bash
BUILD_SETTINGS_FILE=$HOME/.mlabs/build_settings.sh
if [ -f $BUILD_SETTINGS_FILE ]
then
source $BUILD_SETTINGS_FILE
fi
ARTIQ_GUI=1 $PYTHON setup.py install --single-version-externally-managed --record=record.txt ARTIQ_GUI=1 $PYTHON setup.py install --single-version-externally-managed --record=record.txt
git clone --recursive https://github.com/m-labs/misoc git clone --recursive https://github.com/m-labs/misoc
git clone https://github.com/GadgetFactory/Papilio-Loader
export MSCDIR=$SRC_DIR/misoc export MSCDIR=$SRC_DIR/misoc
cd $SRC_DIR/misoc; python make.py -X ../soc -t artiq_ppro build-headers build-bios; cd -
make -C soc/runtime runtime.fbi
cd $SRC_DIR/misoc; python make.py -X $SRC_DIR/soc -t artiq_ppro build-bitstream; cd -
ARTIQ_PREFIX=$PREFIX/lib/python3.4/site-packages/artiq ARTIQ_PREFIX=$PREFIX/lib/python3.4/site-packages/artiq
BIN_PREFIX=$ARTIQ_PREFIX/binaries/ BIN_PREFIX=$ARTIQ_PREFIX/binaries/
mkdir -p $ARTIQ_PREFIX/misc mkdir -p $ARTIQ_PREFIX/misc
cp misc/99-ppro.rules $ARTIQ_PREFIX/misc/ mkdir -p $BIN_PREFIX/kc705 $BIN_PREFIX/pipistrello
mkdir -p $BIN_PREFIX/ppro $BIN_PREFIX/kc705
cp $SRC_DIR/misoc/build/artiq_ppro-up-papilio_pro.bin $BIN_PREFIX/ppro # build for KC705
cp $SRC_DIR/misoc/software/bios/bios.bin $BIN_PREFIX/ppro
cp soc/runtime/runtime.fbi $BIN_PREFIX/ppro cd $SRC_DIR/misoc; python make.py -X ../soc -t artiq_kc705 build-headers build-bios; cd -
make -C soc/runtime clean runtime.fbi
cd $SRC_DIR/misoc; python make.py -X ../soc -t artiq_kc705 $MISOC_EXTRA_VIVADO_CMDLINE build-bitstream; cd -
# build for Pipistrello
cd $SRC_DIR/misoc; python make.py -X ../soc -t artiq_pipistrello build-headers build-bios; cd -
make -C soc/runtime clean runtime.fbi
cd $SRC_DIR/misoc; python make.py -X ../soc -t artiq_pipistrello $MISOC_EXTRA_ISE_CMDLINE build-bitstream; cd -
# install KC705 binaries
cp soc/runtime/runtime.fbi $BIN_PREFIX/kc705/
cp $SRC_DIR/misoc/software/bios/bios.bin $BIN_PREFIX/kc705/
cp $SRC_DIR/misoc/build/artiq_kc705-nist_qc1-kc705.bin $BIN_PREFIX/kc705/
# install Pipistrello binaries
cp soc/runtime/runtime.fbi $BIN_PREFIX/pipistrello/
cp $SRC_DIR/misoc/software/bios/bios.bin $BIN_PREFIX/pipistrello/
cp $SRC_DIR/misoc/build/artiq_pipistrello-nist_qc1-pipistrello.bin $BIN_PREFIX/pipistrello/
cp artiq/frontend/artiq_flash.sh $PREFIX/bin cp artiq/frontend/artiq_flash.sh $PREFIX/bin
cp Papilio-Loader/xc3sprog/trunk/bscan_spi/bscan_spi_lx9_papilio.bit $BIN_PREFIX/ppro

View File

@ -29,6 +29,7 @@ requirements:
- setuptools - setuptools
- numpy - numpy
- migen - migen
- pyelftools
run: run:
- python - python
- llvmlite-or1k - llvmlite-or1k
@ -41,6 +42,7 @@ requirements:
- h5py - h5py
- dateutil - dateutil
- pydaqmx - pydaqmx
- pyelftools
- gbulb-artiq # [not win] - gbulb-artiq # [not win]
- cairoplot3-artiq # [not win] - cairoplot3-artiq # [not win]

View File

@ -6,7 +6,7 @@ import os
requirements = [ requirements = [
"sphinx", "sphinx-argparse", "pyserial", "numpy", "scipy", "sphinx", "sphinx-argparse", "pyserial", "numpy", "scipy",
"python-dateutil", "prettytable", "h5py", "pydaqmx" "python-dateutil", "prettytable", "h5py", "pydaqmx", "pyelftools"
] ]
scripts = [ scripts = [