| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | function show() { |
| 6 | printf "\u001b[35m$1\u001b[0m\n" |
| 7 | } |
| 8 | |
| 9 | rm -rf ~/.vmodules/gui/ ~/.vmodules/vglyph/ |
| 10 | |
| 11 | export VJOBS=1 |
| 12 | show "Clone https://github.com/vlang/vglyph" |
| 13 | v retry -- git clone --filter=blob:none --quiet https://github.com/vlang/vglyph ~/.vmodules/vglyph/ |
| 14 | show "Use latest vlang/vglyph commit" |
| 15 | git -C ~/.vmodules/vglyph/ log -1 --oneline |
| 16 | show "Clone https://github.com/vlang/gui" |
| 17 | v retry -- git clone --filter=blob:none --quiet https://github.com/vlang/gui ~/.vmodules/gui/ |
| 18 | show "Use latest vlang/gui commit" |
| 19 | git -C ~/.vmodules/gui/ log -1 --oneline |
| 20 | if [[ "$(uname)" == 'Darwin' ]]; then |
| 21 | export VFLAGS="${VFLAGS:-} -cc clang" |
| 22 | fi |
| 23 | show "Check module for syntax and semantic errors" |
| 24 | v -shared -check ~/.vmodules/gui |
| 25 | show "Execute Tests" |
| 26 | v test ~/.vmodules/gui/ |
| 27 | show "Compile Examples" |
| 28 | v should-compile-all -no-parallel ~/.vmodules/gui/examples/ |
| 29 | rm -rf ~/.vmodules/gui/ ~/.vmodules/vglyph/ |
| 30 | |