forked from ipbus/ipbus-software
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ipbus#3 from ipbus/ci
Importing test script(s) for automatic builds
- Loading branch information
Showing
1 changed file
with
46 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,46 @@ | ||
#!/usr/bin/env bash | ||
|
||
|
||
SH_SOURCE=${BASH_SOURCE} | ||
IPBUS_PATH=$(cd $(dirname ${SH_SOURCE})/../.. && pwd) | ||
WORK_ROOT=$(cd ${IPBUS_PATH}/../.. && pwd) | ||
|
||
PROJECTS=(sim enclustra_ax3_pm3_a35 enclustra_ax3_pm3_a50 kc705_basex kc705_gmii kcu105_basex) | ||
|
||
if (( $# != 1 )); then | ||
echo "No project specified." | ||
echo "Available projects: ${PROJECTS[@]}" | ||
|
||
exit -1 | ||
fi | ||
PROJ=$1 | ||
if [[ ! " ${PROJECTS[@]} " =~ " ${PROJ} " ]]; then | ||
# whatever you want to do when arr doesn't contain value | ||
echo "Project ${PROJ} not known." | ||
echo "Available projects: ${PROJECTS[@]}" | ||
exit -1 | ||
fi | ||
|
||
# Stop on the first error | ||
set -e | ||
set -x | ||
|
||
cd ${WORK_ROOT} | ||
rm -rf proj/${PROJ} | ||
echo "#------------------------------------------------" | ||
echo "Building Project ${PROJ}" | ||
echo "#------------------------------------------------" | ||
if [[ "$PROJ" == "sim" ]]; then | ||
ipbb proj create sim sim ipbus-firmware:boards/sim | ||
ipbb sim -p ${PROJ} ipcores | ||
ipbb sim -p ${PROJ} fli | ||
ipbb sim -p ${PROJ} project | ||
else | ||
ipbb proj create vivado -t top_${PROJ}.dep ${PROJ} ipbus-firmware:projects/example | ||
ipbb vivado -p ${PROJ} project | ||
ipbb vivado -p ${PROJ} synth | ||
ipbb vivado -p ${PROJ} impl | ||
ipbb vivado -p ${PROJ} bitfile | ||
fi | ||
|
||
exit 0 |