ci: Add GitHub Actions config
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
This commit is contained in:
parent
a9ae44dea2
commit
c36e52cb2c
|
@ -0,0 +1,88 @@
|
|||
name: tuttest
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
examples:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- {toolchain: "eos-s3", os: "ubuntu", os-version: "xenial", example: "eos-s3-counter"}
|
||||
- {toolchain: "eos-s3", os: "ubuntu", os-version: "bionic", example: "eos-s3-counter"}
|
||||
- {toolchain: "eos-s3", os: "ubuntu", os-version: "eoan", example: "eos-s3-counter"}
|
||||
- {toolchain: "eos-s3", os: "ubuntu", os-version: "focal", example: "eos-s3-counter"}
|
||||
- {toolchain: "eos-s3", os: "centos", os-version: "7", example: "eos-s3-counter"}
|
||||
- {toolchain: "eos-s3", os: "centos", os-version: "8", example: "eos-s3-counter"}
|
||||
|
||||
- {toolchain: "xc7", os: "ubuntu", os-version: "xenial", example: "xc7-counter"}
|
||||
- {toolchain: "xc7", os: "ubuntu", os-version: "bionic", example: "xc7-counter"}
|
||||
- {toolchain: "xc7", os: "ubuntu", os-version: "eoan", example: "xc7-counter"}
|
||||
- {toolchain: "xc7", os: "ubuntu", os-version: "focal", example: "xc7-counter"}
|
||||
- {toolchain: "xc7", os: "centos", os-version: "7", example: "xc7-counter"}
|
||||
- {toolchain: "xc7", os: "centos", os-version: "8", example: "xc7-counter"}
|
||||
|
||||
- {toolchain: "xc7", os: "ubuntu", os-version: "xenial", example: "xc7-picosoc"}
|
||||
- {toolchain: "xc7", os: "ubuntu", os-version: "bionic", example: "xc7-picosoc"}
|
||||
- {toolchain: "xc7", os: "ubuntu", os-version: "eoan", example: "xc7-picosoc"}
|
||||
- {toolchain: "xc7", os: "ubuntu", os-version: "focal", example: "xc7-picosoc"}
|
||||
- {toolchain: "xc7", os: "centos", os-version: "7", example: "xc7-picosoc"}
|
||||
- {toolchain: "xc7", os: "centos", os-version: "8", example: "xc7-picosoc"}
|
||||
|
||||
- {toolchain: "xc7", os: "ubuntu", os-version: "xenial", example: "xc7-litex"}
|
||||
- {toolchain: "xc7", os: "ubuntu", os-version: "bionic", example: "xc7-litex"}
|
||||
- {toolchain: "xc7", os: "ubuntu", os-version: "eoan", example: "xc7-litex"}
|
||||
- {toolchain: "xc7", os: "ubuntu", os-version: "focal", example: "xc7-litex"}
|
||||
- {toolchain: "xc7", os: "centos", os-version: "7", example: "xc7-litex"}
|
||||
- {toolchain: "xc7", os: "centos", os-version: "8", example: "xc7-litex"}
|
||||
|
||||
- {toolchain: "xc7", os: "ubuntu", os-version: "xenial", example: "xc7-linux"}
|
||||
- {toolchain: "xc7", os: "ubuntu", os-version: "bionic", example: "xc7-linux"}
|
||||
- {toolchain: "xc7", os: "ubuntu", os-version: "eoan", example: "xc7-linux"}
|
||||
- {toolchain: "xc7", os: "ubuntu", os-version: "focal", example: "xc7-linux"}
|
||||
- {toolchain: "xc7", os: "centos", os-version: "7", example: "xc7-linux"}
|
||||
- {toolchain: "xc7", os: "centos", os-version: "8", example: "xc7-linux"}
|
||||
|
||||
env:
|
||||
LANG: "en_US.UTF-8"
|
||||
DOCKER_NAME: test
|
||||
IN_DOCKER_EXEC: "docker exec -t test bash -ex -c"
|
||||
|
||||
steps:
|
||||
- name: Prepare Repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set Up Python
|
||||
uses: actions/setup-python@v1
|
||||
|
||||
- name: Install Prerequisites
|
||||
run: |
|
||||
sudo locale-gen $LANG
|
||||
pip3 install git+https://github.com/antmicro/tuttest#egg=tuttest dataclasses
|
||||
|
||||
- name: Set Up Docker
|
||||
run: |
|
||||
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 $PWD:$PWD --workdir $PWD --tty ${{matrix.os}}:${{matrix.os-version}}
|
||||
docker start $DOCKER_NAME
|
||||
|
||||
- name: Test Main README.rst
|
||||
run: |
|
||||
rm README.rst && make README.rst && .github/scripts/git-check.sh
|
||||
|
||||
- name: (tuttest) Install SymbiFlow Toolchain
|
||||
run: |
|
||||
source .github/scripts/tuttest_exec.sh
|
||||
tuttest_exec README.rst install-req-${{matrix.os}} | ${IN_DOCKER_EXEC} "$(cat /dev/stdin)"
|
||||
tuttest_exec README.rst wget-conda | ${IN_DOCKER_EXEC} "$(cat /dev/stdin)"
|
||||
tuttest_exec ${{matrix.toolchain}}/README.rst ${{matrix.toolchain}}-setup-toolchain | ${IN_DOCKER_EXEC} "$(cat /dev/stdin)"
|
||||
|
||||
- name: (tuttest) Test Example
|
||||
run: |
|
||||
source .github/scripts/tuttest_exec.sh
|
||||
tuttest_exec ${{matrix.toolchain}}/README.rst ${{matrix.toolchain}}-prepare-env,${{matrix.example}} | ${IN_DOCKER_EXEC} "$(cat /dev/stdin)"
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
path: |
|
||||
**/*.bit
|
||||
!xc7/litex_demo/pythondata-cpu-microwatt/**/*.bit
|
Loading…
Reference in New Issue