-
Notifications
You must be signed in to change notification settings - Fork 175
51 lines (45 loc) · 2.1 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: ci
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-22.04
steps:
# Checkout Repository
- name: Checkout
uses: actions/checkout@v2
# Install Tools
- name: Install Tools
run: |
sudo add-apt-repository -y ppa:openjdk-r/ppa
sudo apt update
sudo apt install -y wget build-essential python3 python3-pip \
verilator libevent-dev libjson-c-dev device-tree-compiler \
python3-setuptools python3-requests python3-pexpect \
python3-colorama python3-serial python3-packaging python3-yaml \
ninja-build curl apt-transport-https gnupg openjdk-8-jdk -y
sudo update-alternatives --config java
sudo update-alternatives --config javac
echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo -H gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/scalasbt-release.gpg --import
sudo chmod 644 /etc/apt/trusted.gpg.d/scalasbt-release.gpg
sudo apt update
sudo apt -y install sbt
pip3 install 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: |
wget https://static.dev.sifive.com/dev-tools/freedom-tools/v2020.12/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz
tar -xf $PWD/riscv64-*.tar.gz
sudo mkdir /usr/local/riscv
sudo cp -r $PWD/riscv64-*/* /usr/local/riscv
# Test
- name: Run Tests
run: |
export PATH=/usr/local/riscv/bin:$HOME/.local/bin:$PATH
python3 -m unittest test.test_build