-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
88 lines (74 loc) · 2.25 KB
/
vab_ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: vab CI
on:
workflow_call:
push:
paths:
- 'vlib/**'
- 'thirdparty/**'
- 'cmd/tools/builders/**.v'
- '**/vab_ci.yml'
- '!**.md'
pull_request:
paths:
- 'vlib/**'
- 'thirdparty/**'
- 'cmd/tools/builders/**.v'
- '**/vab_ci.yml'
- '!**.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true
jobs:
vab-compiles-v-examples:
runs-on: ubuntu-20.04
timeout-minutes: 121
env:
VAB_FLAGS: --api 30 --build-tools 29.0.0 -v 3
steps:
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
- uses: actions/checkout@v4
- name: Build V
run: make -j4 && ./v symlink
- name: Install vab
run: |
v retry -- v install vab
v -g ~/.vmodules/vab
sudo ln -s ~/.vmodules/vab/vab /usr/local/bin/vab
- name: Run tests
run: v -g test ~/.vmodules/vab
- name: Run vab --help
run: vab --help
- name: Run vab doctor
run: |
vab doctor
which d8 || true
which dx || true
- 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
v-compiles-os-android:
runs-on: ubuntu-20.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Build V
run: make -j4 && ./v symlink
- name: Install vab
run: |
v retry -- 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