ci: simplify vab_ci.yml (#13109)

pull/13113/head
Larpon 2022-01-09 18:24:47 +01:00 committed by GitHub
parent 236a1d0255
commit 535317eba3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 14 deletions

View File

@ -12,6 +12,8 @@ jobs:
vab-compiles-v-examples:
runs-on: ubuntu-20.04
timeout-minutes: 121
env:
VAB_FLAGS: --api 30 --build-tools 29.0.0 -v 3
steps:
- uses: actions/setup-java@v2
with:
@ -20,33 +22,34 @@ jobs:
- uses: actions/checkout@v2
- name: Build V
run: make -j2 && ./v -cc gcc -o v cmd/v
run: make && sudo ./v symlink
- name: Checkout vab
uses: actions/checkout@v2
with:
repository: vlang/vab
path: vab
- name: Clone vab
run: git clone --depth 1 https://github.com/vlang/vab
- name: Build vab
run: cd vab; ../v ./vab.v ; cd ..
run: |
cd vab
v -g vab.v
sudo ln -s $(pwd)/vab /usr/local/bin/vab
- name: Run tests
run: ./v test vab
- name: Build vab
run: ./v -g vab/vab.v
run: v test vab
- name: Run vab --help
run: vab/vab --help
run: vab --help
- name: Run vab doctor
run: |
export VEXE=./v
vab/vab doctor
run: 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 --api 29 --build-tools '29.0.0' -v 3 examples/$example -o apks/$safe_name.apk
vab examples/$example -o apks/$safe_name.apk
done