Skip to content

Commit ea3512e

Browse files
authored
ci: add macos-latest basic build test (#337)
1 parent d35a1eb commit ea3512e

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed

.github/workflows/ci.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,3 +392,81 @@ jobs:
392392
mkdir apks
393393
vab v\examples\sokol\particles -o apks\particles.apk
394394
# TODO vab/vab v/examples/sokol/particles -o aabs/particles.aab
395+
396+
macos-latest-build:
397+
runs-on: macos-latest
398+
timeout-minutes: 10
399+
env:
400+
VAB_FLAGS: -cg -v 3
401+
VFLAGS: -no-parallel
402+
steps:
403+
- uses: actions/setup-java@v4
404+
with:
405+
distribution: 'adopt'
406+
java-version: 17
407+
408+
- name: Checkout V
409+
uses: actions/checkout@v4
410+
with:
411+
repository: vlang/v
412+
path: v
413+
414+
- name: Build and install v
415+
run: cd ./v && make && sudo ./v symlink
416+
417+
- name: Checkout vab
418+
uses: actions/checkout@v4
419+
with:
420+
path: vab
421+
422+
- name: Simulate "v install vab"
423+
run: mv vab ~/.vmodules
424+
425+
- name: Build vab with -prod
426+
run: v -prod ~/.vmodules/vab
427+
428+
- name: Build vab
429+
run: v -g ~/.vmodules/vab
430+
431+
- name: Symlink vab
432+
run: sudo ln -s ~/.vmodules/vab/vab /usr/local/bin/vab
433+
434+
- name: Run vab --help
435+
run: vab --help
436+
437+
# - name: Ruin Android environment on purpose
438+
# run: |
439+
# sudo rm -fr /Users/runner/Library/Android/sdk
440+
#
441+
# - name: Run 'vab doctor' before
442+
# run: vab doctor
443+
#
444+
# - name: Run 'vab install auto'
445+
# run: |
446+
# unset ANDROID_SDK_ROOT # These are set in the CI by default
447+
# unset ANDROID_HOME
448+
# unset ANDROID_NDK_ROOT
449+
# vab install auto
450+
#
451+
# - name: Run 'vab doctor' after
452+
# run: vab doctor
453+
#
454+
# - name: Install SDK dependencies
455+
# run: |
456+
# vab install "build-tools;33.0.2"
457+
# vab install "platforms;android-30"
458+
# vab install bundletool
459+
# vab install aapt2
460+
461+
- name: Run vab doctor
462+
run: vab doctor
463+
464+
- name: Run tests
465+
run: v test ~/.vmodules/vab
466+
467+
- name: Build APK (Default) examples/sokol/particles
468+
run: |
469+
mkdir apks
470+
vab v/examples/sokol/particles -o apks/particles.apk
471+
[ -f apks/particles.apk ]
472+

0 commit comments

Comments
 (0)