Close

Gitlab CI template for ULX3S + cocotb

A project log for Poly94

Yet another faux-retro game system

Martin CejpMartin Cejp 05/20/2022 at 19:270 Comments

This installs the OSS CAD Suite, builds the bitstream ('ulx3s.bit') in one job, and runs your cocotb tests in another.

default:
  image: ubuntu:20.04

  before_script:
    - apt update
    - apt install -y curl make
    - curl -sL https://github.com/YosysHQ/oss-cad-suite-build/releases/download/2022-05-20/oss-cad-suite-linux-x64-20220520.tgz | tar xz
    - export PATH=`pwd`/oss-cad-suite/bin:$PATH
    - echo $PATH

build_ulx3s:
  stage: build
  needs: []

  script:
    - make ulx3s.bit

  artifacts:
    paths:
      - ulx3s.bit

test_cocotb:
  stage: test
  needs: []

  script:
    - make -f Makefile.cocotb

  artifacts:
    paths:
      - "*.vcd"

This could be improved further by automatically picking the latest nightly release of the OSS CAD Suite.

Discussions