2020-11-24 08:17:38 -05:00
|
|
|
name: ci
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
2021-10-26 06:15:13 -04:00
|
|
|
build:
|
2020-11-24 08:17:38 -05:00
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
|
|
# Checkout Repository
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
# Install Tools
|
|
|
|
- name: Install Tools
|
|
|
|
run: |
|
2021-10-26 06:15:13 -04:00
|
|
|
sudo apt-get install wget build-essential python3 ninja-build
|
2021-10-24 06:08:58 -04:00
|
|
|
sudo apt-get install verilator libevent-dev libjson-c-dev
|
2020-11-24 08:17:38 -05:00
|
|
|
pip3 install setuptools
|
|
|
|
pip3 install requests
|
2021-10-26 06:15:13 -04:00
|
|
|
pip3 install pexpect
|
2021-09-27 10:10:01 -04:00
|
|
|
pip3 install meson
|
2021-12-10 12:07:03 -05:00
|
|
|
pip3 install amaranth-yosys
|
2020-11-24 08:17:38 -05:00
|
|
|
|
|
|
|
# Install (n)Migen / LiteX / Cores
|
|
|
|
- name: Install LiteX
|
|
|
|
run: |
|
|
|
|
wget https://raw.githubusercontent.com/enjoy-digital/litex/master/litex_setup.py
|
2021-10-26 09:36:07 -04:00
|
|
|
python3 litex_setup.py --init --install --user
|
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: |
|
|
|
|
wget https://raw.githubusercontent.com/enjoy-digital/litex/master/litex_setup.py
|
2021-10-26 09:36:07 -04:00
|
|
|
python3 litex_setup.py --gcc=riscv
|
2021-10-26 06:15:13 -04:00
|
|
|
sudo mkdir /usr/local/riscv
|
|
|
|
sudo cp -r $PWD/../riscv64-*/* /usr/local/riscv
|
2021-10-26 09:36:07 -04:00
|
|
|
python3 litex_setup.py --gcc=openrisc
|
|
|
|
sudo mkdir /usr/local/openrisc
|
|
|
|
sudo cp -r $PWD/../openrisc-*/* /usr/local/openrisc
|
2020-11-24 08:17:38 -05:00
|
|
|
|
|
|
|
# Install Project
|
|
|
|
- name: Install Project
|
|
|
|
run: python3 setup.py develop --user
|
|
|
|
|
|
|
|
# Test
|
|
|
|
- name: Run Tests
|
|
|
|
run: |
|
2021-10-26 06:15:13 -04:00
|
|
|
export PATH=/usr/local/riscv/bin:$PATH
|
2021-10-26 09:36:07 -04:00
|
|
|
export PATH=/usr/local/openrisc/bin:$PATH
|
2020-11-24 08:17:38 -05:00
|
|
|
python3 setup.py test
|