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