-
Notifications
You must be signed in to change notification settings - Fork 21
126 lines (105 loc) · 2.88 KB
/
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: CI
on:
push:
paths-ignore:
- "**.md"
- "**.rst"
pull_request:
paths-ignore:
- "**.md"
- "**.rst"
concurrency:
group: ci-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
tests:
name: Tests
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up V version latest
uses: vlang/[email protected]
with:
check-latest: true
- name: Verify fmt
run: make fmt-verify
- name: Verify docs
run: |
export PIP_BREAK_SYSTEM_PACKAGES=1
pip install sphinx sphinx_rtd_theme
cd docs && python3 -m pip install -r requirements.txt && cd -
make clean-docs docs
git diff --exit-code
- name: Run SQL and B-tree tests
run: make test
- name: Run examples
run: make examples
- name: Run CLI tests
run: make cli-test
macos-binary:
name: Build for macOS
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up V version latest
uses: vlang/[email protected]
with:
check-latest: true
- name: Build macOS binaries
run: |
.github/workflows/set_version.sh
make bin/vsql
zip -j vsql-macos.zip bin/vsql
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
vsql-macos.zip
linux-binary:
name: Build for Linux
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up V version latest
uses: vlang/[email protected]
with:
check-latest: true
- name: Build linux binaries
run: |
.github/workflows/set_version.sh
make bin/vsql
zip -j vsql-linux.zip bin/vsql
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
vsql-linux.zip
# I know it seems pretty silly that we're using macOS and cross compling for
# Windows. But I couldn't get window-latest to work. If you use windows please
# put in a PR to fix this.
windows-binary:
name: Build for Windows
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up V version latest
uses: vlang/[email protected]
with:
check-latest: true
- name: Build Windows binaries
run: |
brew install mingw-w64
make bin/vsql.exe
zip -j vsql-windows.zip bin/vsql.exe
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
vsql-windows.zip