-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add workflow for build verification of examples
- Loading branch information
Showing
2 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: build-examples | ||
|
||
on: [push, pull_request] | ||
|
||
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 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
SUBDIRS = mbc_128k_rom midi_sound_gen | ||
|
||
.PHONY: build | ||
build: | ||
@ for d in $(SUBDIRS); do \ | ||
cd $$d; \ | ||
$(MAKE); \ | ||
cd ..; \ | ||
done | ||
|
||
.PHONY: clean | ||
clean: | ||
@ for d in $(SUBDIRS); do \ | ||
cd $$d; \ | ||
$(MAKE) $@; \ | ||
cd ..; \ | ||
done | ||
|