-
-
Notifications
You must be signed in to change notification settings - Fork 9
138 lines (121 loc) · 4.02 KB
/
Copy pathdocs.yml
File metadata and controls
138 lines (121 loc) · 4.02 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
name: Publish Documentation
on:
workflow_dispatch:
push:
branches:
- main
tags:
- 'v*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pages: write
id-token: write
jobs:
build-extension:
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@v1.5.5
with:
duckdb_version: v1.5.5
ci_tools_version: v1.5.5
extension_name: onager
enable_rust: true
upload_all_extensions: true
exclude_archs: "linux_amd64;linux_arm64;linux_amd64_musl;linux_arm64_musl;osx_amd64;osx_arm64;windows_amd64;windows_amd64_mingw;wasm_threads"
build-playground:
name: Assemble playground
needs: build-extension
runs-on: ubuntu-latest
env:
DUCKDB_VERSION: v1.5.5
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download Wasm extension artifacts
uses: actions/download-artifact@v4
with:
pattern: onager-${{ env.DUCKDB_VERSION }}-extension-wasm_*
path: wasm-extensions
- name: Vendor DuckDB-Wasm
working-directory: web/vendor-src
run: |
set -euo pipefail
npm ci
npm run check-version -- "${DUCKDB_VERSION}"
npm run bundle
- name: Assemble playground tree
run: |
set -euo pipefail
mkdir -p playground
cp -R web/. playground/
rm -rf playground/vendor-src
mkdir -p playground/vendor/duckdb-wasm
cp web/vendor-src/out/duckdb-browser.mjs \
web/vendor-src/node_modules/@duckdb/duckdb-wasm/dist/duckdb-browser-mvp.worker.js \
web/vendor-src/node_modules/@duckdb/duckdb-wasm/dist/duckdb-mvp.wasm \
playground/vendor/duckdb-wasm/
printf '{"branch": "%s", "commit": "%s"}\n' \
"${GITHUB_REF_NAME}" "${GITHUB_SHA:0:5}" > playground/build-info.json
for platform in wasm_eh wasm_mvp; do
src=$(find "wasm-extensions/onager-${DUCKDB_VERSION}-extension-${platform}" \
-name 'onager.duckdb_extension.wasm' | head -n1)
if [ -z "$src" ]; then
echo "::error::No ${platform} onager extension found in downloaded artifacts"
exit 1
fi
dest="playground/extensions/${DUCKDB_VERSION}/${platform}"
mkdir -p "$dest"
cp "$src" "$dest/onager.duckdb_extension.wasm"
done
echo "Assembled playground tree:"
find playground -type f | sort
- name: Upload playground artifact
uses: actions/upload-artifact@v4
with:
name: playground
path: playground
retention-days: 7
if-no-files-found: error
build-docs:
needs: build-playground
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up GitHub Pages
uses: actions/configure-pages@v5
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install -y gcc curl pkg-config libssl-dev make
- name: Generate documentation
run: |
pip install uv && uv sync --extra dev
source .venv/bin/activate && make docs
- name: Download playground artifact
uses: actions/download-artifact@v4
with:
name: playground
path: ./site/playground
- name: Upload documentation artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./site
deploy-docs:
needs: build-docs
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy documentation
id: deployment
uses: actions/deploy-pages@v4