-
Notifications
You must be signed in to change notification settings - Fork 10
118 lines (101 loc) · 4.01 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: CI builds
on: [push, pull_request]
jobs:
Bitstream-build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3-pip bzip2 cmake build-essential clang bison flex tcl-dev libffi-dev mercurial graphviz xdot pkg-config python3 libftdi-dev python3-dev libeigen3-dev zlib1g-dev
sudo apt update
sudo apt-get install -y libboost-dev libboost-filesystem-dev libboost-thread-dev libboost-program-options-dev libboost-iostreams-dev libboost-dev libboost-system-dev libboost-python-dev libboost-filesystem-dev
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
./install.sh
- name: Install yosys
run: |
git clone https://github.com/YosysHQ/yosys.git
cd yosys
make config-gcc
make -j`nproc`
sudo make install
cd ..
rm -rf yosys
- name: Install prjoxide
run: |
git clone --recursive https://github.com/gatecat/prjoxide
cd prjoxide/libprjoxide
export PATH=$HOME/.cargo/bin:$PATH
cargo install --path prjoxide
cd ../../
rm -rf prjoxide
- name: Install nextpnr
run: |
git clone --recursive https://github.com/YosysHQ/nextpnr
cd nextpnr
cmake -DARCH=nexus -DOXIDE_INSTALL_PREFIX=$HOME/.cargo .
make -j`nproc`
sudo make install
cd ..
rm -rf nextpnr
- name: Build bitstream
run: |
source ./init
pip3 install packaging
echo $PATH
./make.py --board=sdi_mipi_bridge --toolchain=oxide --build --csr-json csr.json
- name: Generate dts and config
run: ./third_party/litex/litex/tools/litex_json2dts_zephyr.py --dts overlay.dts --config overlay.config csr.json
- uses: actions/upload-artifact@v3
with:
name: ${{github.job}}
path: |
./build/antmicro_sdi_mipi_video_converter/gateware/antmicro_sdi_mipi_video_converter.bit
./overlay.dts
./overlay.config
Zephyr-build:
runs-on: ubuntu-22.04
needs: Bitstream-build
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v3
with:
name: Bitstream-build
- name: Install dependencies
run: |
sudo apt update
sudo apt-get install -y --no-install-recommends ninja-build gperf ccache dfu-util device-tree-compiler libssl-dev gcc g++ python3-dev python3-pip
sudo apt update
sudo apt-get install -y --no-install-recommends python3-setuptools python3-tk python3-wheel xz-utils file make gcc gcc-multilib g++-multilib libmagic1 libsdl2-dev
- name: Download Zephyr SDK
run: |
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.15.0/zephyr-sdk-0.15.0_linux-x86_64.tar.gz
tar xvf zephyr-sdk-0.15.0_linux-x86_64.tar.gz
rm -v zephyr-sdk-0.15.0_linux-x86_64.tar.gz
- name: Prepare Zephyr
run: |
pip3 install west
west init zephyrproject
cd zephyrproject/
west update
west zephyr-export
pip3 install -r zephyr/scripts/requirements.txt
cd ..
- name: Install Zephyr SDK
run: |
cd zephyr-sdk-0.15.0/
./setup.sh -h -t riscv64-zephyr-elf
cd ../
- name: Build Zephyr App
run: |
export CMAKE_PREFIX_PATH=$PWD/zephyr-sdk-0.15.0
cd zephyrproject/zephyr
cat ../../Bitstream-build/overlay.config | xargs west build -b litex_vexriscv samples/philosophers/ -- -DDTC_OVERLAY_FILE= ../../Bitstream-build/overlay.dts
cd ../../
- uses: actions/upload-artifact@v3
with:
name: ${{github.job}}
path: ./zephyrproject/zephyr/build/zephyr/zephyr.bin