-
Notifications
You must be signed in to change notification settings - Fork 3
75 lines (66 loc) · 2.17 KB
/
build-examples.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: build-examples
on:
push:
paths:
- 'examples/**'
- '.github/workflows/build-examples.yml'
pull_request:
paths:
- 'examples/**'
- '.github/workflows/build-examples.yml'
jobs:
build-examples:
runs-on: ubuntu-22.04
steps:
# Checkout repository
- name: Checkout
uses: actions/checkout@v4
# Install build dependencies
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get -y install build-essential clang bison flex libreadline-dev gawk \
tcl-dev libffi-dev git graphviz xdot pkg-config python3 \
libboost-system-dev libboost-python-dev libboost-filesystem-dev \
zlib1g-dev cmake libboost-all-dev libeigen3-dev libftdi-dev \
python3-dev python3-pip
# Install icestorm
- name: Install icestorm
run: |
mkdir icestorm
pushd icestorm
git init
git remote add origin https://github.com/YosysHQ/icestorm.git
git fetch --depth 1 origin 1a40ae75d4eebee9cce73a2c4d634fd42ed0110f
git reset --hard FETCH_HEAD
make -j$(nproc)
sudo make install
popd
# Install nextpnr
- name: Install nextpnr
run: |
git clone https://github.com/YosysHQ/nextpnr.git -b nextpnr-0.6 --depth 1
pushd nextpnr
cmake -DARCH=ice40 -DCMAKE_INSTALL_PREFIX=/usr/local .
make -j$(nproc)
sudo make install
popd
# Install yosys
- name: Install yosys
run: |
git clone https://github.com/YosysHQ/yosys.git -b yosys-0.36 --depth 1
pushd yosys
make -j$(nproc)
sudo make install
popd
# Install gbdk-2020
- name: Install gbdk-2020
run: |
wget https://github.com/gbdk-2020/gbdk-2020/releases/download/4.2.0/gbdk-linux64.tar.gz
sudo tar -axvf gbdk-linux64.tar.gz -C /opt
# Build examples
- name: Build examples
run: |
pushd ./examples
make
popd