2021-05-23 17:00:56 +02:00
|
|
|
name: vab CI
|
|
|
|
|
|
|
|
on:
|
2022-05-14 14:38:15 +02:00
|
|
|
workflow_run:
|
|
|
|
workflows: ["Other CI"]
|
|
|
|
types:
|
|
|
|
- completed
|
2021-05-23 17:00:56 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
vab-compiles-v-examples:
|
|
|
|
runs-on: ubuntu-20.04
|
2021-07-29 17:04:02 +02:00
|
|
|
timeout-minutes: 121
|
2022-01-09 18:24:47 +01:00
|
|
|
env:
|
|
|
|
VAB_FLAGS: --api 30 --build-tools 29.0.0 -v 3
|
2021-05-23 17:00:56 +02:00
|
|
|
steps:
|
2022-05-12 22:29:37 +02:00
|
|
|
- uses: actions/setup-java@v2
|
|
|
|
with:
|
|
|
|
distribution: 'adopt'
|
|
|
|
java-version: 8
|
|
|
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Build V
|
|
|
|
run: make && sudo ./v symlink
|
|
|
|
|
|
|
|
- name: Checkout vab
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: vlang/vab
|
|
|
|
path: vab
|
|
|
|
|
|
|
|
- name: Build vab
|
|
|
|
run: |
|
|
|
|
cd vab
|
|
|
|
v -g vab.v
|
|
|
|
sudo ln -s $(pwd)/vab /usr/local/bin/vab
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: v test vab
|
|
|
|
|
|
|
|
- name: Run vab --help
|
|
|
|
run: vab --help
|
|
|
|
|
|
|
|
- name: Run 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
|
|
|
|
for example in "${v_examples[@]}"; do
|
|
|
|
safe_name=$(echo "$example" | sed 's%/%-%' | sed 's%\.%-%' )
|
|
|
|
vab examples/$example -o apks/$safe_name.apk
|
|
|
|
done
|