Merge pull request #46 from antmicro/multi-os-test

Run tests on multiple Linux OS versions (using Travis).
This commit is contained in:
Tim Ansell 2020-09-28 06:48:53 -07:00 committed by GitHub
commit 2ef044b502
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 90 additions and 38 deletions

View File

@ -1,40 +1,58 @@
os: linux os: linux
dist: focal dist: focal
language: c++ language: minimal
services:
- docker
env: env:
global: # Testing QuickLogic toolchain on all OSes
- DEBIAN_FRONTEND: noninteractive - TOOLCHAIN=quicklogic OS=ubuntu OS_VERSION=trusty
addons: - TOOLCHAIN=quicklogic OS=ubuntu OS_VERSION=xenial
apt: - TOOLCHAIN=quicklogic OS=ubuntu OS_VERSION=bionic
packages: - TOOLCHAIN=quicklogic OS=ubuntu OS_VERSION=eoan
- wget - TOOLCHAIN=quicklogic OS=ubuntu OS_VERSION=focal
- locales - TOOLCHAIN=quicklogic OS=centos OS_VERSION=6
- python3-pip - TOOLCHAIN=quicklogic OS=centos OS_VERSION=7
- TOOLCHAIN=quicklogic OS=centos OS_VERSION=8
# Testing Xilinx 7 Series toolchain on all OSes
- TOOLCHAIN=xilinx-series-7 OS=ubuntu OS_VERSION=trusty
- TOOLCHAIN=xilinx-series-7 OS=ubuntu OS_VERSION=xenial
- TOOLCHAIN=xilinx-series-7 OS=ubuntu OS_VERSION=bionic
- TOOLCHAIN=xilinx-series-7 OS=ubuntu OS_VERSION=eoan
- TOOLCHAIN=xilinx-series-7 OS=ubuntu OS_VERSION=focal
- TOOLCHAIN=xilinx-series-7 OS=centos OS_VERSION=6
- TOOLCHAIN=xilinx-series-7 OS=centos OS_VERSION=7
- TOOLCHAIN=xilinx-series-7 OS=centos OS_VERSION=8
before_install: before_install:
- sudo locale-gen "en_US.UTF-8" - sudo locale-gen "en_US.UTF-8"
- export LANG="en_US.UTF-8" - export LANG="en_US.UTF-8"
- source .github/travis/common.sh - source .github/travis/common.sh
- rm README.rst && make README.rst && .github/travis/git-check.sh - rm README.rst && make README.rst && .github/travis/git-check.sh
- pip install git+https://github.com/antmicro/tuttest - pip install git+https://github.com/antmicro/tuttest#egg=tuttest
- tuttest README.rst wget-conda | bash -ex -
jobs:
include:
- stage: SymbiFlow
install: install:
- export INSTALL_DIR=$PWD/../opt/symbiflow/xc7 - export DOCKER_NAME=test
- tuttest xc7/README.rst xc7-setup-toolchain | bash -ex - - export IN_DOCKER_EXEC="docker exec -t $DOCKER_NAME bash -c"
- docker create
--name $DOCKER_NAME
--env LANG="en_US.UTF-8"
--env LANGUAGE="en_US"
--env DEBIAN_FRONTEND="noninteractive"
--env INSTALL_DIR=~/opt/symbiflow/
-v /home/travis:/home/travis
--workdir $PWD
--tty
$OS:$OS_VERSION
- docker start $DOCKER_NAME
- if [ "$OS" = "ubuntu" ]; then tuttest README.rst install-wget-ubuntu --prefix-lines-with "$IN_DOCKER_EXEC" | bash -ex -; fi
- if [ "$OS" = "centos" ]; then tuttest README.rst install-wget-centos --prefix-lines-with "$IN_DOCKER_EXEC" | bash -ex -; fi
- tuttest README.rst wget-conda --prefix-lines-with "$IN_DOCKER_EXEC" | bash -ex -
- if [ "$TOOLCHAIN" = "xilinx-series-7" ]; then tuttest xc7/README.rst xc7-setup-toolchain --prefix-lines-with "$IN_DOCKER_EXEC" | bash -ex -; fi
- if [ "$TOOLCHAIN" = "quicklogic" ]; then tuttest eos-s3/README.rst eoss3-setup-toolchain --prefix-lines-with "$IN_DOCKER_EXEC" | bash -ex -; fi
script: script:
- export INSTALL_DIR=$PWD/../opt/symbiflow/xc7 - if [ "$TOOLCHAIN" = "xilinx-series-7" ]; then tuttest xc7/README.rst xc7-prepare-env,xc7-counter,xc7-picosoc,xc7-litex,xc7-linux --prefix-lines-with "$IN_DOCKER_EXEC" --single-command | bash -ex -; fi
- tuttest xc7/README.rst xc7-prepare-env,xc7-counter,xc7-picosoc,xc7-litex,xc7-linux | bash -ex - - if [ "$TOOLCHAIN" = "quicklogic" ]; then tuttest eos-s3/README.rst eoss3-prepare-env,eoss3-counter --prefix-lines-with "$IN_DOCKER_EXEC" --single-command | bash -ex -; fi
- #
install:
- export INSTALL_DIR=$PWD/../opt/symbiflow/eos-s3
- tuttest eos-s3/README.rst eoss3-setup-toolchain | bash -ex -
script:
- export INSTALL_DIR=$PWD/../opt/symbiflow/eos-s3
- tuttest eos-s3/README.rst eoss3-prepare-env,eoss3-counter | bash -ex -

View File

@ -22,7 +22,6 @@ The repository includes:
* `.travis.yml <.travis.yml>`_ - Travis CI configuration file * `.travis.yml <.travis.yml>`_ - Travis CI configuration file
Clone this repository Clone this repository
--------------------- ---------------------
@ -34,6 +33,24 @@ If you have not already done so, clone this repository and ``cd`` into it:
git clone https://github.com/SymbiFlow/symbiflow-examples.git && cd symbiflow-examples git clone https://github.com/SymbiFlow/symbiflow-examples.git && cd symbiflow-examples
Prerequisites
-------------
The only required prerequisite is ``wget``. You can install it using:
* For Ubuntu:
.. code:: bash
:name: install-wget-ubuntu
apt update && apt install -y wget
* For CentOS:
.. code:: bash
:name: install-wget-centos
yum install -y wget
Toolchain installation Toolchain installation
---------------------- ----------------------
@ -84,8 +101,7 @@ and so you will need to add some ``sudo`` commands to the instructions below.
source "$INSTALL_DIR/eos-s3/conda/etc/profile.d/conda.sh" source "$INSTALL_DIR/eos-s3/conda/etc/profile.d/conda.sh"
conda env create -f eos-s3/environment.yml conda env create -f eos-s3/environment.yml
conda activate eos-s3 conda activate eos-s3
wget -qO- https://quicklogic-my.sharepoint.com/:u:/p/kkumar/Eb7341Bq-XRAukVQ6oQ6PrgB-qdFbrsrPEON1yTa4krFSA?download=1 | tar -xJ -C $INSTALL_DIR/eos-s3 wget -qO- https://quicklogic-my.sharepoint.com/:u:/p/kkumar/EWuqtXJmalROpI2L5XeewMIBRYVCY8H4yc10nlli-Xq79g?download=1 | tar -xJ -C $INSTALL_DIR/eos-s3/
cp -r $INSTALL_DIR/eos-s3/conda/envs/eos-s3/share/yosys/* $INSTALL_DIR/eos-s3/conda/envs/eos-s3/share/
conda deactivate conda deactivate
Build Example Designs Build Example Designs

View File

@ -22,7 +22,6 @@ The repository includes:
* `.travis.yml <.travis.yml>`_ - Travis CI configuration file * `.travis.yml <.travis.yml>`_ - Travis CI configuration file
Clone this repository Clone this repository
--------------------- ---------------------
@ -34,6 +33,24 @@ If you have not already done so, clone this repository and ``cd`` into it:
git clone https://github.com/SymbiFlow/symbiflow-examples.git && cd symbiflow-examples git clone https://github.com/SymbiFlow/symbiflow-examples.git && cd symbiflow-examples
Prerequisites
-------------
The only required prerequisite is ``wget``. You can install it using:
* For Ubuntu:
.. code:: bash
:name: install-wget-ubuntu
apt update && apt install -y wget
* For CentOS:
.. code:: bash
:name: install-wget-centos
yum install -y wget
Toolchain installation Toolchain installation
---------------------- ----------------------

View File

@ -33,8 +33,7 @@ Choose the installation directory (see the `README <../README.rst>`_ one level u
source "$INSTALL_DIR/eos-s3/conda/etc/profile.d/conda.sh" source "$INSTALL_DIR/eos-s3/conda/etc/profile.d/conda.sh"
conda env create -f eos-s3/environment.yml conda env create -f eos-s3/environment.yml
conda activate eos-s3 conda activate eos-s3
wget -qO- https://quicklogic-my.sharepoint.com/:u:/p/kkumar/Eb7341Bq-XRAukVQ6oQ6PrgB-qdFbrsrPEON1yTa4krFSA?download=1 | tar -xJ -C $INSTALL_DIR/eos-s3 wget -qO- https://quicklogic-my.sharepoint.com/:u:/p/kkumar/EWuqtXJmalROpI2L5XeewMIBRYVCY8H4yc10nlli-Xq79g?download=1 | tar -xJ -C $INSTALL_DIR/eos-s3/
cp -r $INSTALL_DIR/eos-s3/conda/envs/eos-s3/share/yosys/* $INSTALL_DIR/eos-s3/conda/envs/eos-s3/share/
conda deactivate conda deactivate
.. toolchain_include_end_label .. toolchain_include_end_label

View File

@ -1,17 +1,19 @@
name: eos-s3 name: eos-s3
channels: channels:
- conda-forge - conda-forge
- quicklogic-corp - quicklogic-corp/label/ql
dependencies: dependencies:
- quicklogic-corp::yosys=0.6.0_0013_g2478b28 - yosys=0.5_7972_g4045d484=20200817_053125
- quicklogic-corp::yosys-plugins=0.1.0_0005_g6bbbc9b - yosys-plugins=1.2.0_0009_g9ab211c=20200817_053125
- quicklogic-corp::vtr=v8.0.0_rc2_4006_g36a4d4b - vtr=v8.0.0_rc2_4003_g8980e4621=20200817_053125
- make - make
- lxml - lxml
- simplejson - simplejson
- intervaltree - intervaltree
- git - git
- pip - pip
- coreutils
- util-linux
# Packages installed from PyPI # Packages installed from PyPI
- pip: - pip:
- -r file:requirements.txt - -r file:requirements.txt