v / .github / workflows
Raw file | 74 loc (61 sloc) | 2.0 KB | Latest commit hash 298dc77c3
1name: vab CI
2
3on:
4 push:
5 paths-ignore:
6 - "**.md"
7 pull_request:
8 paths-ignore:
9 - "**.md"
10
11jobs:
12 vab-compiles-v-examples:
13 runs-on: ubuntu-20.04
14 if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
15 timeout-minutes: 121
16 env:
17 VAB_FLAGS: --api 30 --build-tools 29.0.0 -v 3
18 steps:
19 - uses: actions/setup-java@v2
20 with:
21 distribution: 'adopt'
22 java-version: 8
23
24 - uses: actions/checkout@v3
25 - name: Build V
26 run: make && sudo ./v symlink
27
28 - name: Install vab
29 run: |
30 v install vab
31 v -g ~/.vmodules/vab
32 sudo ln -s ~/.vmodules/vab/vab /usr/local/bin/vab
33
34 - name: Run tests
35 run: v test ~/.vmodules/vab
36
37 - name: Run vab --help
38 run: vab --help
39
40 - name: Run vab doctor
41 run: vab doctor
42
43 - name: Build graphical V examples as APK
44 run: |
45 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')
46 mkdir apks
47 for example in "${v_examples[@]}"; do
48 safe_name=$(echo "$example" | sed 's%/%-%' | sed 's%\.%-%' )
49 vab examples/$example -o apks/$safe_name.apk
50 done
51
52 v-compiles-os-android:
53 runs-on: ubuntu-20.04
54 if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
55 timeout-minutes: 20
56 steps:
57 - uses: actions/checkout@v3
58 - name: Build V
59 run: make && sudo ./v symlink
60
61 - name: Install vab
62 run: |
63 v install vab
64 v -g ~/.vmodules/vab
65 sudo ln -s ~/.vmodules/vab/vab /usr/local/bin/vab
66
67 - name: Run vab --help
68 run: vab --help
69
70 - name: Run vab doctor
71 run: vab doctor
72
73 - name: Check `v -os android` *without* -apk flag
74 run: .github/workflows/android_cross_compile.vsh