Merge pull request #2125 from trabucayre/ecp5_diamond_tristate #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
# Checkout Repository | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup CCache | |
uses: hendrikmuhs/[email protected] | |
# Install Tools | |
- name: Install Tools | |
run: | | |
sudo apt-get install wget build-essential ninja-build | |
sudo apt-get install libevent-dev libjson-c-dev flex bison | |
sudo apt-get install libfl-dev libfl2 zlib1g-dev | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
cache: "pip" | |
cache-dependency-path: "setup.py" | |
- name: Install Python dependencies | |
run: | | |
python3 -m pip install setuptools requests pexpect meson | |
# Install (n)Migen / LiteX / Cores | |
- name: Install LiteX | |
run: | | |
python3 litex_setup.py --config=full --init --install --user --dev | |
# Install GCC Toolchains | |
- name: Install GCC Toolchains | |
run: | | |
sudo python3 litex_setup.py --gcc=riscv | |
sudo python3 litex_setup.py --gcc=openrisc | |
sudo python3 litex_setup.py --gcc=powerpc | |
# Build / Install GHDL | |
- name: Build GHDL | |
run: | | |
sudo apt-get install gnat llvm | |
git clone https://github.com/ghdl/ghdl.git | |
cd ghdl | |
./configure --with-llvm-config | |
make | |
sudo make install | |
# Build / Install Verilator | |
- name: Build Verilator | |
run: | | |
sudo apt-get install help2man | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
git clone https://github.com/verilator/verilator | |
cd verilator | |
git checkout 7d2d32420a630befa4097170ecbf227e04e32522 | |
autoconf | |
./configure | |
make -j$(nproc) | |
sudo make install | |
# Install Project | |
- name: Install Project | |
run: python3 setup.py develop --user | |
# Test | |
- name: Run Tests | |
run: | | |
python3 setup.py test |