-
Notifications
You must be signed in to change notification settings - Fork 11
63 lines (60 loc) · 1.63 KB
/
windows.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
name: Windows
on:
workflow_call:
jobs:
setup:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
path: vwebui
submodules: true
- name: Setup V
shell: bash
run: |
curl -Lo v_windows.zip https://github.com/vlang/v/releases/latest/download/v_windows.zip
7z x v_windows.zip
mv v ~/v && ~/v/v symlink
- name: Setup WebUI library
shell: bash
run: mkdir -p ~/.vmodules && mv vwebui ~/.vmodules/vwebui
- name: Save cache
uses: actions/cache/save@v4
with:
path: |
~/v
~/.vmodules
key: ${{ runner.os }}-${{ github.sha }}
build-examples:
needs: setup
runs-on: windows-latest
strategy:
matrix:
cc: [gcc] # only gcc on windows for now
# optimization: ['', '-W -cstrict']
fail-fast: false
env:
VFLAGS: -cg -cc ${{ matrix.cc }}
steps:
- name: Restore cache
uses: actions/cache/restore@v4
with:
path: |
~/v
~/.vmodules
key: ${{ runner.os }}-${{ github.sha }}
fail-on-cache-miss: true
- name: Symlink V
run: ~/v/v symlink
- name: Compile V
run: v -showcc self && v doctor
- name: Build
run: |
$examplePaths = Get-ChildItem -Path "$HOME/.vmodules/vwebui/examples" -Depth 0
foreach ($path in $examplePaths) {
if ($path.PSIsContainer -or $path -like "*.v") {
$cmd = "v $path"
Write-Output $cmd
Invoke-Expression $cmd
}
}