From ded889767129189735e4d29a34b956e610ddc772 Mon Sep 17 00:00:00 2001 From: Larpon Date: Sun, 23 May 2021 17:00:56 +0200 Subject: [PATCH] ci: add vab job compiling v graphical examples (#10171) --- .github/workflows/vab_ci.yml | 52 ++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/vab_ci.yml diff --git a/.github/workflows/vab_ci.yml b/.github/workflows/vab_ci.yml new file mode 100644 index 0000000000..9466fc8aa7 --- /dev/null +++ b/.github/workflows/vab_ci.yml @@ -0,0 +1,52 @@ +name: vab CI + +on: + push: + paths-ignore: + - "**.md" + pull_request: + paths-ignore: + - "**.md" + +jobs: + vab-compiles-v-examples: + runs-on: ubuntu-20.04 + timeout-minutes: 45 + steps: + - uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: 8 + + - uses: actions/checkout@v2 + - name: Build V + run: make -j2 && ./v -cc gcc -o v cmd/v + + - name: Clone vab + run: git clone --depth 1 https://github.com/vlang/vab + - name: Build vab + run: cd vab; ../v ./vab.v ; cd .. + + - name: Run tests + run: ./v test vab + + - name: Build vab + run: ./v -g vab/vab.v + + - name: Run vab --help + run: vab/vab --help + + - name: Run vab doctor + run: | + export VEXE=./v + vab/vab doctor + + - name: Build graphical V examples as APK + run: | + declare -a v_examples=('flappylearning' '2048' 'fireworks' 'tetris' 'sokol/particles' 'sokol/drawing.v' 'sokol/freetype_raven.v' 'gg/polygons.v' 'gg/raven_text_rendering.v' 'gg/rectangles.v' 'gg/stars.v' 'gg/worker_thread.v') + mkdir apks + export VEXE=./v + for example in "${v_examples[@]}"; do + safe_name=$(echo "$example" | sed 's%/%-%' | sed 's%\.%-%' ) + vab/vab -v 3 examples/$example -o apks/$safe_name.apk + done