2021-05-23 18:00:56 +03:00
|
|
|
name: vab CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
vab-compiles-v-examples:
|
|
|
|
runs-on: ubuntu-20.04
|
2021-07-29 18:04:02 +03:00
|
|
|
timeout-minutes: 121
|
2022-01-09 20:24:47 +03:00
|
|
|
env:
|
|
|
|
VAB_FLAGS: --api 30 --build-tools 29.0.0 -v 3
|
2021-05-23 18:00:56 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/setup-java@v2
|
|
|
|
with:
|
|
|
|
distribution: 'adopt'
|
|
|
|
java-version: 8
|
|
|
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Build V
|
2022-01-09 20:24:47 +03:00
|
|
|
run: make && sudo ./v symlink
|
|
|
|
|
|
|
|
- name: Checkout vab
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: vlang/vab
|
|
|
|
path: vab
|
2021-05-23 18:00:56 +03:00
|
|
|
|
|
|
|
- name: Build vab
|
2022-01-09 20:24:47 +03:00
|
|
|
run: |
|
|
|
|
cd vab
|
|
|
|
v -g vab.v
|
|
|
|
sudo ln -s $(pwd)/vab /usr/local/bin/vab
|
2021-05-23 18:00:56 +03:00
|
|
|
|
|
|
|
- name: Run tests
|
2022-01-09 20:24:47 +03:00
|
|
|
run: v test vab
|
2021-05-23 18:00:56 +03:00
|
|
|
|
|
|
|
- name: Run vab --help
|
2022-01-09 20:24:47 +03:00
|
|
|
run: vab --help
|
2021-05-23 18:00:56 +03:00
|
|
|
|
|
|
|
- name: Run vab doctor
|
2022-01-09 20:24:47 +03:00
|
|
|
run: vab doctor
|
2021-05-23 18:00:56 +03:00
|
|
|
|
2021-07-25 21:29:00 +03:00
|
|
|
- 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%\.%-%' )
|
2022-01-09 20:24:47 +03:00
|
|
|
vab examples/$example -o apks/$safe_name.apk
|
2021-07-25 21:29:00 +03:00
|
|
|
done
|