2020-11-24 08:17:38 -05:00
|
|
|
name: ci
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
2021-10-26 06:15:13 -04:00
|
|
|
build:
|
2022-11-03 02:26:19 -04:00
|
|
|
runs-on: ubuntu-22.04
|
2020-11-24 08:17:38 -05:00
|
|
|
steps:
|
|
|
|
# Checkout Repository
|
|
|
|
- name: Checkout
|
2022-11-03 02:26:19 -04:00
|
|
|
uses: actions/checkout@v3
|
2020-11-24 08:17:38 -05:00
|
|
|
|
2022-06-27 11:50:29 -04:00
|
|
|
- name: Setup CCache
|
2022-11-03 02:26:19 -04:00
|
|
|
uses: hendrikmuhs/ccache-action@v1.2
|
2022-06-27 11:50:29 -04:00
|
|
|
|
2022-11-03 02:26:19 -04:00
|
|
|
- uses: ghdl/setup-ghdl-ci@master
|
2022-10-27 20:11:58 -04:00
|
|
|
with:
|
|
|
|
backend: llvm
|
|
|
|
|
2020-11-24 08:17:38 -05:00
|
|
|
# Install Tools
|
|
|
|
- name: Install Tools
|
|
|
|
run: |
|
2023-03-18 21:52:15 -04:00
|
|
|
sudo apt-get install wget build-essential ninja-build
|
2022-06-27 11:50:29 -04:00
|
|
|
sudo apt-get install libevent-dev libjson-c-dev flex bison
|
2022-11-03 02:26:19 -04:00
|
|
|
sudo apt-get install libfl-dev libfl2 zlib1g-dev
|
2023-03-18 21:52:15 -04:00
|
|
|
|
|
|
|
- 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
|
2020-11-24 08:17:38 -05:00
|
|
|
|
|
|
|
# Install (n)Migen / LiteX / Cores
|
|
|
|
- name: Install LiteX
|
|
|
|
run: |
|
2023-09-17 15:59:55 -04:00
|
|
|
python3 litex_setup.py --config=full --init --install --user --dev
|
2020-11-24 08:17:38 -05:00
|
|
|
|
2021-10-26 09:36:07 -04:00
|
|
|
# Install GCC Toolchains
|
|
|
|
- name: Install GCC Toolchains
|
2020-11-24 08:17:38 -05:00
|
|
|
run: |
|
2022-11-21 03:20:10 -05:00
|
|
|
sudo python3 litex_setup.py --gcc=riscv
|
|
|
|
sudo python3 litex_setup.py --gcc=openrisc
|
|
|
|
sudo python3 litex_setup.py --gcc=powerpc
|
2020-11-24 08:17:38 -05:00
|
|
|
|
2022-06-27 11:50:29 -04:00
|
|
|
# Build / Install Verilator
|
|
|
|
- name: Build Verilator
|
|
|
|
run: |
|
2023-01-19 08:52:55 -05:00
|
|
|
sudo apt-get install help2man
|
2022-06-27 11:50:29 -04:00
|
|
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
|
|
|
git clone https://github.com/verilator/verilator
|
|
|
|
cd verilator
|
2023-06-27 08:32:20 -04:00
|
|
|
git checkout 7d2d32420a630befa4097170ecbf227e04e32522
|
2022-06-27 11:50:29 -04:00
|
|
|
autoconf
|
|
|
|
./configure
|
|
|
|
make -j$(nproc)
|
|
|
|
sudo make install
|
|
|
|
|
2020-11-24 08:17:38 -05:00
|
|
|
# Install Project
|
|
|
|
- name: Install Project
|
|
|
|
run: python3 setup.py develop --user
|
|
|
|
|
|
|
|
# Test
|
|
|
|
- name: Run Tests
|
|
|
|
run: |
|
|
|
|
python3 setup.py test
|