-
Notifications
You must be signed in to change notification settings - Fork 12
203 lines (203 loc) · 6.58 KB
/
test.yaml
File metadata and controls
203 lines (203 loc) · 6.58 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
on: [push]
name: "test"
jobs:
build-linux_x86-extension:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
# using actions/setup-go@v1 is the only way to get macos build to work.
# otherwise, with v2, would get this cgo error: 'cgo-generated-wrappers:13:13: error: redefinition of 'free' as different kind of symbol'
- name: Set up Go 1.20
uses: actions/setup-go@v1
with:
go-version: 1.20
- run: make loadable
- uses: actions/upload-artifact@v3
with:
name: sqlite-html-linux_x86
path: dist/html0.so
build-linux_x86-python:
runs-on: ubuntu-20.04
needs: [build-linux_x86-extension]
steps:
- uses: actions/checkout@v3
- name: Download workflow artifacts
uses: actions/download-artifact@v3
with:
name: sqlite-html-linux_x86
path: dist/
- uses: actions/setup-python@v3
- run: pip install wheel
- run: make python
- run: make datasette
- uses: actions/upload-artifact@v3
with:
name: sqlite-html-linux_x86-wheels
path: dist/wheels/*.whl
test-linux_x86:
runs-on: ubuntu-20.04
needs: [build-linux_x86-extension, build-linux_x86-python]
env:
DENO_DIR: deno_cache
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: sqlite-html-linux_x86
path: dist/
- uses: actions/download-artifact@v3
with:
name: sqlite-html-linux_x86-wheels
path: dist/
- run: cp dist/html0.so npm/sqlite-html-linux-x64/lib
- run: pip3 install --find-links dist/ sqlite_html
- run: make test-loadable
- run: make test-python
# for test-npm
- uses: actions/setup-node@v3
with:
cache: "npm"
cache-dependency-path: npm/sqlite-html/package.json
- run: npm install
working-directory: npm/sqlite-html
- run: make test-npm
# for test-deno
- uses: denoland/setup-deno@v1
with:
deno-version: v1.30
- name: Cache Deno dependencies
uses: actions/cache@v3
with:
path: ${{ env.DENO_DIR }}
key: ${{ runner.os }}-${{ hashFiles('deno/deno.lock') }}
- run: make test-deno
env:
DENO_SQLITE_HTML_PATH: ${{ github.workspace }}/dist/html0
build-macos-extension:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
# using actions/setup-go@v1 is the only way to get macos build to work.
# otherwise, with v2, would get this cgo error: 'cgo-generated-wrappers:13:13: error: redefinition of 'free' as different kind of symbol'
- name: Set up Go 1.20
uses: actions/setup-go@v1
with:
go-version: 1.20
- run: make loadable
- uses: actions/upload-artifact@v3
with:
name: sqlite-html-macos
path: dist/html0.dylib
build-macos-python:
runs-on: macos-latest
needs: [build-macos-extension]
steps:
- uses: actions/checkout@v3
- name: Download workflow artifacts
uses: actions/download-artifact@v3
with:
name: sqlite-html-macos
path: dist/
- uses: actions/setup-python@v3
- run: pip install wheel
- run: make python
- run: make datasette
- uses: actions/upload-artifact@v3
with:
name: sqlite-html-macos-wheels
path: dist/wheels/*.whl
test-macos:
runs-on: macos-latest
needs: [build-macos-extension, build-macos-python]
env:
DENO_DIR: deno_cache
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: sqlite-html-macos
path: dist/
- run: cp dist/html0.dylib npm/sqlite-html-darwin-x64/lib
- uses: actions/download-artifact@v3
with:
name: sqlite-html-macos-wheels
path: dist/
- run: brew install python
- run: /usr/local/opt/python@3/libexec/bin/pip install --find-links dist/ sqlite_html
- run: make test-loadable python=/usr/local/opt/python@3/libexec/bin/python
- run: make test-python python=/usr/local/opt/python@3/libexec/bin/python
# for test-npm
- uses: actions/setup-node@v3
with:
cache: "npm"
cache-dependency-path: npm/sqlite-html/package.json
- run: npm install
working-directory: npm/sqlite-html
- run: make test-npm
# for test-deno
- uses: denoland/setup-deno@v1
with:
deno-version: v1.30
- name: Cache Deno dependencies
uses: actions/cache@v3
with:
path: ${{ env.DENO_DIR }}
key: ${{ runner.os }}-${{ hashFiles('deno/deno.lock') }}
- run: make test-deno
env:
DENO_SQLITE_HTML_PATH: ${{ github.workspace }}/dist/html0.dylib
build-windows-extension:
name: Building windows extension
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
# using actions/setup-go@v1 is the only way to get macos build to work.
# otherwise, with v2, would get this cgo error: 'cgo-generated-wrappers:13:13: error: redefinition of 'free' as different kind of symbol'
- name: Set up Go 1.20
uses: actions/setup-go@v1
with:
go-version: 1.20
- run: make loadable
- uses: actions/upload-artifact@v3
with:
name: sqlite-html-windows
path: dist/html0.dll
build-windows-python:
runs-on: windows-latest
needs: [build-windows-extension]
steps:
- uses: actions/checkout@v3
- name: Download workflow artifacts
uses: actions/download-artifact@v3
with:
name: sqlite-html-windows
path: dist/
- uses: actions/setup-python@v3
- run: pip install wheel
- run: make python
- run: make datasette
- uses: actions/upload-artifact@v3
with:
name: sqlite-html-windows-wheels
path: dist/wheels/*.whl
test-windows:
runs-on: windows-2022
needs: [build-windows-extension, build-windows-python]
env:
DENO_DIR: deno_cache
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: sqlite-html-windows
path: dist/
- uses: actions/download-artifact@v3
with:
name: sqlite-html-windows
path: npm/sqlite-html-windows-x64/lib
- uses: actions/download-artifact@v3
with:
name: sqlite-html-windows-wheels
path: dist/
- run: pip install --find-links dist/ sqlite_html
- run: make test-loadable