2021-05-23 18:00:56 +03:00
|
|
|
name: vab CI
|
|
|
|
|
|
|
|
on:
|
2022-05-15 09:06:01 +03:00
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
2021-05-23 18:00:56 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
vab-compiles-v-examples:
|
|
|
|
runs-on: ubuntu-20.04
|
2022-05-22 20:19:04 +03:00
|
|
|
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
|
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:
|
2022-05-12 23:29:37 +03:00
|
|
|
- uses: actions/setup-java@v2
|
|
|
|
with:
|
|
|
|
distribution: 'adopt'
|
|
|
|
java-version: 8
|
|
|
|
|
2023-02-21 14:40:24 +03:00
|
|
|
- uses: actions/checkout@v3
|
2022-05-12 23:29:37 +03:00
|
|
|
- name: Build V
|
|
|
|
run: make && sudo ./v symlink
|
|
|
|
|
2022-06-07 12:51:43 +03:00
|
|
|
- name: Install vab
|
2022-05-12 23:29:37 +03:00
|
|
|
run: |
|
2022-06-07 12:51:43 +03:00
|
|
|
v install vab
|
|
|
|
v -g ~/.vmodules/vab
|
|
|
|
sudo ln -s ~/.vmodules/vab/vab /usr/local/bin/vab
|
2022-05-12 23:29:37 +03:00
|
|
|
|
|
|
|
- name: Run tests
|
2022-06-07 12:51:43 +03:00
|
|
|
run: v test ~/.vmodules/vab
|
2022-05-12 23:29:37 +03:00
|
|
|
|
|
|
|
- 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
|
2022-06-23 11:22:55 +03:00
|
|
|
|
|
|
|
v-compiles-os-android:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
|
2023-08-01 12:09:41 +03:00
|
|
|
timeout-minutes: 20
|
2022-06-23 11:22:55 +03:00
|
|
|
steps:
|
2023-02-21 14:40:24 +03:00
|
|
|
- uses: actions/checkout@v3
|
2022-06-23 11:22:55 +03:00
|
|
|
- name: Build V
|
|
|
|
run: make && sudo ./v symlink
|
|
|
|
|
|
|
|
- name: Install vab
|
|
|
|
run: |
|
|
|
|
v install vab
|
|
|
|
v -g ~/.vmodules/vab
|
|
|
|
sudo ln -s ~/.vmodules/vab/vab /usr/local/bin/vab
|
|
|
|
|
|
|
|
- name: Run vab --help
|
|
|
|
run: vab --help
|
|
|
|
|
|
|
|
- name: Run vab doctor
|
|
|
|
run: vab doctor
|
|
|
|
|
|
|
|
- name: Check `v -os android` *without* -apk flag
|
|
|
|
run: .github/workflows/android_cross_compile.vsh
|