v / .github / workflows / vab_ci.yml
90 lines · 76 sloc · 2.29 KB · 93162641ddda0809e8e8c2da69af8b13982567ee
Raw
1name: vab CI
2
3on:
4 workflow_call:
5 push:
6 branches:
7 - master
8 paths:
9 - 'vlib/**'
10 - 'thirdparty/**'
11 - 'cmd/tools/builders/**.v'
12 - '**/vab_ci.yml'
13 - '!**.md'
14 pull_request:
15 paths:
16 - 'vlib/**'
17 - 'thirdparty/**'
18 - 'cmd/tools/builders/**.v'
19 - '**/vab_ci.yml'
20 - '!**.md'
21
22concurrency:
23 group: vab-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
24 cancel-in-progress: true
25
26jobs:
27 vab-compiles-v-examples:
28 runs-on: ubuntu-24.04
29 timeout-minutes: 20
30 env:
31 VAB_FLAGS: --api 30 --build-tools 29.0.0 -v 3
32 steps:
33 - uses: actions/setup-java@v5
34 with:
35 distribution: 'temurin'
36 java-version: 11
37
38 - uses: actions/checkout@v6
39 - name: Build V
40 run: make -j4 && ./v symlink
41
42 - name: Install vab
43 run: |
44 v retry -- v install vab
45 v -g ~/.vmodules/vab
46 sudo ln -s ~/.vmodules/vab/vab /usr/local/bin/vab
47
48 - name: Run tests
49 run: v -g test ~/.vmodules/vab
50
51 - name: Run vab --help
52 run: vab --help
53
54 - name: Run vab doctor
55 run: |
56 vab doctor
57 which d8 || true
58 which dx || true
59
60 - name: Build graphical V examples as APK
61 run: |
62 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')
63 mkdir apks
64 for example in "${v_examples[@]}"; do
65 safe_name=$(echo "$example" | sed 's%/%-%' | sed 's%\.%-%' )
66 vab "examples/$example" -o "apks/$safe_name.apk"
67 done
68
69 v-compiles-os-android:
70 runs-on: ubuntu-24.04
71 timeout-minutes: 20
72 steps:
73 - uses: actions/checkout@v6
74 - name: Build V
75 run: make -j4 && ./v symlink
76
77 - name: Install vab
78 run: |
79 v retry -- v install vab
80 v -g ~/.vmodules/vab
81 sudo ln -s ~/.vmodules/vab/vab /usr/local/bin/vab
82
83 - name: Run vab --help
84 run: vab --help
85
86 - name: Run vab doctor
87 run: vab doctor
88
89 - name: Check `v -os android` *without* -apk flag
90 run: .github/workflows/android_cross_compile.vsh
91