diff --git a/.travis.yml b/.travis.yml index 2271bbd2e..7ed278574 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,14 +4,17 @@ python: sudo: false env: global: - - BUILD_SOC=1 - secure: "DUk/Ihg8KbbzEgPF0qrHqlxU8e8eET9i/BtzNvFddIGX4HP/P2qz0nk3cVkmjuWhqJXSbC22RdKME9qqPzw6fJwJ6dpJ3OR6dDmSd7rewavq+niwxu52PVa+yK8mL4yf1terM7QQ5tIRf+yUL9qGKrZ2xyvEuRit6d4cFep43Ws=" + matrix: + - BUILD_SOC=0 + - BUILD_SOC=1 before_install: - mkdir -p $HOME/.mlabs - if [ $TRAVIS_PULL_REQUEST != false ]; then BUILD_SOC=0; fi - if [ $BUILD_SOC -ne 0 ]; then ./.travis/get-xilinx.sh; fi - . ./.travis/get-toolchain.sh - . ./.travis/get-anaconda.sh + - echo "BUILD_SOC=$BUILD_SOC" >> $HOME/.mlabs/build_settings.sh - source $HOME/miniconda/bin/activate py35 - conda install -q pip coverage anaconda-client migen cython - pip install coveralls @@ -22,9 +25,12 @@ script: - coverage run --source=artiq setup.py test - make -C doc/manual html after_success: - - anaconda -q login --hostname $(hostname) --username $binstar_login --password $binstar_password - - if [ "$TRAVIS_BRANCH" == "master" ]; then anaconda -q upload --user $binstar_login --channel dev --force $HOME/miniconda/conda-bld/linux-64/artiq-*.tar.bz2; fi - - anaconda -q logout + - | + if [ "$TRAVIS_BRANCH" == "master" -a $BUILD_SOC -eq 1 ]; then + anaconda -q login --hostname $(hostname) --username $binstar_login --password $binstar_password + anaconda -q upload --user $binstar_login --channel dev --force $HOME/miniconda/conda-bld/linux-64/artiq-*.tar.bz2 + anaconda -q logout + fi - coveralls notifications: email: diff --git a/.travis/get-toolchain.sh b/.travis/get-toolchain.sh index 73c268d0a..9b62ad225 100755 --- a/.travis/get-toolchain.sh +++ b/.travis/get-toolchain.sh @@ -19,11 +19,10 @@ do done export PATH=$PWD/packages/usr/local/llvm-or1k/bin:$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 +export LD_LIBRARY_PATH=$PWD/packages/usr/local/llvm-or1k/lib:$PWD/packages/usr/lib/x86_64-linux-gnu:$PWD/packages/usr/local/x86_64-unknown-linux-gnu/or1k-elf/lib:$LD_LIBRARY_PATH -echo "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" >> $HOME/.mlabs/build_settings.sh echo "export PATH=$PWD/packages/usr/local/llvm-or1k/bin:$PWD/packages/usr/local/bin:$PWD/packages/usr/bin:\$PATH" >> $HOME/.mlabs/build_settings.sh +echo "export LD_LIBRARY_PATH=$PWD/packages/usr/local/llvm-or1k/lib:$PWD/packages/usr/lib/x86_64-linux-gnu:$PWD/packages/usr/local/x86_64-unknown-linux-gnu/or1k-elf/lib:\$LD_LIBRARY_PATH" >> $HOME/.mlabs/build_settings.sh -or1k-linux-as --version llc --version clang --version diff --git a/.travis/get-xilinx.sh b/.travis/get-xilinx.sh index ccb6a5059..0f37893b3 100755 --- a/.travis/get-xilinx.sh +++ b/.travis/get-xilinx.sh @@ -30,7 +30,7 @@ git clone https://github.com/fallen/impersonate_macaddress make -C impersonate_macaddress # Tell mibuild where Xilinx toolchains are installed # and feed it the mac address corresponding to the license -cat > $HOME/.mlabs/build_settings.sh << EOF +cat >> $HOME/.mlabs/build_settings.sh << EOF MISOC_EXTRA_VIVADO_CMDLINE="-Ob vivado_path $HOME/Xilinx/Vivado" MISOC_EXTRA_ISE_CMDLINE="-Ob ise_path $HOME/opt/Xilinx/" export MACADDR=$macaddress diff --git a/conda/README.md b/conda/README.md new file mode 100644 index 000000000..e37f241c8 --- /dev/null +++ b/conda/README.md @@ -0,0 +1,18 @@ +Uploading conda packages (Python 3.5) +===================================== + +Preparing: + + 1. [Install miniconda][miniconda] + 2. `conda update -q conda` + 3. `conda install conda-build` + 4. `conda create -q -n py35 python=3.5` + 5. `conda config --add channels https://conda.anaconda.org/m-labs/channel/dev` + +Building: + + 1. `source activate py35` + 2. `conda build pkgname --python 3.5`; this command displays a path to the freshly built package + 3. `anaconda upload -c main -c dev` + +[miniconda]: http://conda.pydata.org/docs/install/quick.html#linux-miniconda-install diff --git a/conda/artiq/build.sh b/conda/artiq/build.sh index 959e8a692..4d574de48 100755 --- a/conda/artiq/build.sh +++ b/conda/artiq/build.sh @@ -20,14 +20,14 @@ mkdir -p $BIN_PREFIX/kc705 $BIN_PREFIX/pipistrello 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_SOC" != "0" ] && (cd $SRC_DIR/misoc; $PYTHON make.py -X ../soc -t artiq_kc705 $MISOC_EXTRA_VIVADO_CMDLINE build-bitstream) # install KC705 NIST_QC1 binaries mkdir -p $BIN_PREFIX/kc705/nist_qc1 cp soc/runtime/runtime.fbi $BIN_PREFIX/kc705/nist_qc1/ cp $SRC_DIR/misoc/software/bios/bios.bin $BIN_PREFIX/kc705/ -cp $SRC_DIR/misoc/build/artiq_kc705-nist_qc1-kc705.bit $BIN_PREFIX/kc705/ +[ "$BUILD_SOC" != "0" ] && cp $SRC_DIR/misoc/build/artiq_kc705-nist_qc1-kc705.bit $BIN_PREFIX/kc705/ wget http://sionneau.net/artiq/binaries/kc705/flash_proxy/bscan_spi_kc705.bit mv bscan_spi_kc705.bit $BIN_PREFIX/kc705/ @@ -35,13 +35,13 @@ mv bscan_spi_kc705.bit $BIN_PREFIX/kc705/ 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 - +[ "$BUILD_SOC" != "0" ] && (cd $SRC_DIR/misoc; $PYTHON make.py -X ../soc -t artiq_pipistrello $MISOC_EXTRA_ISE_CMDLINE build-bitstream) # 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.bit $BIN_PREFIX/pipistrello/ +[ "$BUILD_SOC" != "0" ] && cp $SRC_DIR/misoc/build/artiq_pipistrello-nist_qc1-pipistrello.bit $BIN_PREFIX/pipistrello/ wget https://people.phys.ethz.ch/~robertjo/bscan_spi_lx45_csg324.bit mv bscan_spi_lx45_csg324.bit $BIN_PREFIX/pipistrello/ @@ -49,13 +49,13 @@ mv bscan_spi_lx45_csg324.bit $BIN_PREFIX/pipistrello/ cd $SRC_DIR/misoc; $PYTHON make.py -X ../soc -t artiq_kc705 -s NIST_QC2 build-headers; cd - make -C soc/runtime clean runtime.fbi -cd $SRC_DIR/misoc; $PYTHON make.py -X ../soc -t artiq_kc705 -s NIST_QC2 $MISOC_EXTRA_VIVADO_CMDLINE build-bitstream; cd - +[ "$BUILD_SOC" != "0" ] && (cd $SRC_DIR/misoc; $PYTHON make.py -X ../soc -t artiq_kc705 -s NIST_QC2 $MISOC_EXTRA_VIVADO_CMDLINE build-bitstream) # install KC705 NIST_QC2 binaries mkdir -p $BIN_PREFIX/kc705/nist_qc2 cp soc/runtime/runtime.fbi $BIN_PREFIX/kc705/nist_qc2/ -cp $SRC_DIR/misoc/build/artiq_kc705-nist_qc2-kc705.bit $BIN_PREFIX/kc705/ +[ "$BUILD_SOC" != "0" ] && cp $SRC_DIR/misoc/build/artiq_kc705-nist_qc2-kc705.bit $BIN_PREFIX/kc705/ cp artiq/frontend/artiq_flash.sh $PREFIX/bin diff --git a/conda/artiq/meta.yaml b/conda/artiq/meta.yaml index 6dacc0293..e96b8d4bb 100644 --- a/conda/artiq/meta.yaml +++ b/conda/artiq/meta.yaml @@ -31,7 +31,7 @@ requirements: - python >=3.5.0 - setuptools - numpy - - migen + - migen 0.0 - pyelftools - binutils-or1k-linux run: diff --git a/conda/chardet/bld.bat b/conda/chardet/bld.bat new file mode 100644 index 000000000..c40a9bbef --- /dev/null +++ b/conda/chardet/bld.bat @@ -0,0 +1,2 @@ +"%PYTHON%" setup.py install +if errorlevel 1 exit 1 diff --git a/conda/chardet/build.sh b/conda/chardet/build.sh new file mode 100644 index 000000000..5a5aeeb48 --- /dev/null +++ b/conda/chardet/build.sh @@ -0,0 +1 @@ +$PYTHON setup.py install diff --git a/conda/chardet/meta.yaml b/conda/chardet/meta.yaml new file mode 100644 index 000000000..e9b7c795c --- /dev/null +++ b/conda/chardet/meta.yaml @@ -0,0 +1,33 @@ +package: + name: chardet + version: 2.2.1 + +source: + fn: chardet-2.2.1.tar.gz + url: https://pypi.python.org/packages/source/c/chardet/chardet-2.2.1.tar.gz + md5: 4a758402eaefd0331bdedc7ecb6f452c + +build: + entry_points: + - chardetect = chardet.chardetect:main + number: 0 + +requirements: + build: + - python + - setuptools + + run: + - python + +test: + # Python imports + imports: + - chardet + + commands: + - chardetect run_test.py + +about: + home: https://github.com/chardet/chardet + license: GNU Library or Lesser General Public License (LGPL) diff --git a/conda/dateutil/bld.bat b/conda/dateutil/bld.bat new file mode 100644 index 000000000..39b5e1fee --- /dev/null +++ b/conda/dateutil/bld.bat @@ -0,0 +1 @@ +%PYTHON% setup.py install diff --git a/conda/dateutil/build.sh b/conda/dateutil/build.sh new file mode 100644 index 000000000..5a5aeeb48 --- /dev/null +++ b/conda/dateutil/build.sh @@ -0,0 +1 @@ +$PYTHON setup.py install diff --git a/conda/dateutil/meta.yaml b/conda/dateutil/meta.yaml new file mode 100644 index 000000000..fd9d40a3e --- /dev/null +++ b/conda/dateutil/meta.yaml @@ -0,0 +1,30 @@ +package: + name: dateutil + version: 2.4.2 + +source: + fn: python-dateutil-2.4.2.tar.gz + url: https://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-2.4.2.tar.gz + md5: 4ef68e1c485b09e9f034e10473e5add2 + +build: + number: 0 + +requirements: + build: + - python + - setuptools + - six >=1.5 + run: + - python + - six >=1.5 + +test: + imports: + - dateutil + - dateutil.zoneinfo + +about: + home: https://dateutil.readthedocs.org + license: BSD + summary: 'Extensions to the standard Python datetime module' diff --git a/conda/pyelftools/bld.bat b/conda/pyelftools/bld.bat new file mode 100644 index 000000000..39b5e1fee --- /dev/null +++ b/conda/pyelftools/bld.bat @@ -0,0 +1 @@ +%PYTHON% setup.py install diff --git a/conda/pyelftools/build.sh b/conda/pyelftools/build.sh new file mode 100644 index 000000000..5a5aeeb48 --- /dev/null +++ b/conda/pyelftools/build.sh @@ -0,0 +1 @@ +$PYTHON setup.py install diff --git a/conda/pyelftools/meta.yaml b/conda/pyelftools/meta.yaml new file mode 100644 index 000000000..f65b271dd --- /dev/null +++ b/conda/pyelftools/meta.yaml @@ -0,0 +1,26 @@ +package: + name: pyelftools + version: 0.23 + +source: + git_url: https://github.com/eliben/pyelftools.git + git_tag: v0.23 + +build: + number: 0 + +requirements: + build: + - python + - setuptools + run: + - python + +test: + imports: + - elftools + +about: + home: https://github.com/eliben/pyelftools.git + license: Public domain + summary: 'Library for analyzing ELF files and DWARF debugging information' diff --git a/conda/sphinx-argparse/bld.bat b/conda/sphinx-argparse/bld.bat new file mode 100644 index 000000000..39b5e1fee --- /dev/null +++ b/conda/sphinx-argparse/bld.bat @@ -0,0 +1 @@ +%PYTHON% setup.py install diff --git a/conda/sphinx-argparse/build.sh b/conda/sphinx-argparse/build.sh new file mode 100644 index 000000000..5a5aeeb48 --- /dev/null +++ b/conda/sphinx-argparse/build.sh @@ -0,0 +1 @@ +$PYTHON setup.py install diff --git a/conda/sphinx-argparse/meta.yaml b/conda/sphinx-argparse/meta.yaml new file mode 100644 index 000000000..6ead92292 --- /dev/null +++ b/conda/sphinx-argparse/meta.yaml @@ -0,0 +1,28 @@ +package: + name: sphinx-argparse + version: 0.1.13 + +source: + fn: sphinx-argparse-0.1.13.tar.gz + url: https://pypi.python.org/packages/source/s/sphinx-argparse/sphinx-argparse-0.1.13.tar.gz + md5: 5ec84e75e1c4b2ae7ca5fb92a6abd738 + +build: + number: 0 + +requirements: + build: + - python + - setuptools + - sphinx + run: + - python + - sphinx + +test: + imports: + - sphinxarg + +about: + license: MIT + summary: 'Sphinx extension that automatically documents argparse commands and options'