litedram/.github/workflows/ci.yml

65 lines
1.7 KiB
YAML
Raw Normal View History

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/ccache-action@v1.2
# 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
2023-04-07 19:08:35 -04:00
- name: Set up Python 3.9
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: |
wget https://raw.githubusercontent.com/enjoy-digital/litex/master/litex_setup.py
python3 litex_setup.py init install --user
# Install RISC-V GCC
- name: Install RISC-V GCC
run: |
sudo python3 litex_setup.py --gcc=riscv
# 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
autoconf
./configure
make -j$(nproc)
sudo make install
# Install Project
- name: Install Project
run: python3 setup.py develop --user
# Test
- name: Run Tests
2020-12-17 11:13:58 -05:00
run: |
python3 setup.py test