Continuous Integration #58
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 | |
run-name: Continuous Integration | |
on: [push] | |
jobs: | |
CI: | |
name: Continuous Integration | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Fetch nextpnr-ecp5 and Yosys | |
run: wget https://github.com/fallen/yosys_nextpnr_tools_for_ci/raw/main/tools.tar.gz | |
- name: Install nextpnr-ecp5 and Yosys | |
run: | | |
echo "PATH=/opt/bin:$PATH" >> "$GITHUB_ENV" | |
echo "LD_LIBRARY_PATH=/opt/lib:$LD_LIBRARY_PATH" >> "$GITHUB_ENV" | |
sudo tar -C / -xzf $PWD/tools.tar.gz | |
sudo apt-get -y install libboost-system1.74.0 libboost-python1.74.0 libboost-filesystem1.74.0 libboost-program-options1.74.0 libboost-thread1.74.0 libreadline8 libtcl8.6 libffi8 libexpat1 | |
- name: Install Python requirements | |
run: | | |
sudo apt-get -y install python3-pip | |
sudo -H pip3 install --upgrade pip | |
pip install pipenv | |
pipenv install --ignore-pipfile | |
- name: Build the FPGA bitstream | |
run: | | |
nextpnr-ecp5 --version | |
yosys --version | |
pipenv run python3 ./sucrela.py --build | |
- name: Build the software | |
run: | | |
sudo apt-get -y install libusb-1.0-0-dev libusb-1.0-0 | |
cd software/libuartbone | |
make | |
./uartbone_cli -h | |
- name: Run Simulation tests | |
run: | | |
pipenv run python3 ./sucrela.py --sim | |
- name: Fetch xpack RISC-V toolchain | |
run: wget https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz | |
- name: Unpack xpack RISC-V toolchain | |
run: | | |
sudo mkdir -p /opt | |
sudo tar -C /opt -xzf $PWD/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz | |
- name: Build SucreLA HydraUSB3 RISC-V firmware | |
run: PATH=/opt/xpack-riscv-none-elf-gcc-13.2.0-2/bin:$PATH make -C software/boards/hydrausb3/ | |