Skip to content

Commit f0f9421

Browse files
authored
Publish website (#80)
Closes GH-25
1 parent 290ac89 commit f0f9421

36 files changed

+1480
-38
lines changed

.github/workflows/doc.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Doc
19+
20+
on:
21+
pull_request:
22+
push:
23+
24+
concurrency:
25+
group: ${{ github.head_ref || github.sha }}-${{ github.workflow }}
26+
cancel-in-progress: true
27+
28+
permissions:
29+
contents: write
30+
31+
jobs:
32+
publish:
33+
name: Publish
34+
timeout-minutes: 10
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v3
38+
- uses: ruby/setup-ruby@v1
39+
with:
40+
ruby-version: ruby
41+
- uses: actions/setup-python@v4
42+
with:
43+
python-version: 3
44+
- name: Install dependencies
45+
run: |
46+
pip3 install -r doc/requirements.txt
47+
- name: Build
48+
run: |
49+
rake doc:html
50+
- uses: actions/upload-artifact@v3
51+
with:
52+
name: doc
53+
path: doc/build
54+
- uses: actions/checkout@v3
55+
with:
56+
fetch-depth: 0
57+
path: site
58+
persist-credentials: true
59+
ref: asf-site
60+
- name: Publish
61+
run: |
62+
git config --global user.name 'github-actions[bot]'
63+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
64+
rake doc:publish

.github/workflows/package.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ jobs:
171171
password: ${{ github.token }}
172172
- name: Build
173173
run: |
174-
pushd ${BASE_NAME}/packages/${PACKAGE}
174+
pushd ${BASE_NAME}/package/${PACKAGE}
175175
if [ "${GITHUB_REF_TYPE}" != "tag" ]; then
176176
rake version:update
177177
fi
@@ -181,7 +181,7 @@ jobs:
181181
- name: Prepare artifacts
182182
run: |
183183
cp -a \
184-
${BASE_NAME}/packages/${PACKAGE}/${TASK_NAMESPACE}/repositories/${DISTRIBUTION} \
184+
${BASE_NAME}/package/${PACKAGE}/${TASK_NAMESPACE}/repositories/${DISTRIBUTION} \
185185
./
186186
tar czf ${{ matrix.target }}.tar.gz ${DISTRIBUTION}
187187
- name: Upload artifacts
@@ -200,7 +200,7 @@ jobs:
200200
GH_TOKEN: ${{ github.token }}
201201
- name: Push Docker image
202202
run: |
203-
pushd ${BASE_NAME}/packages/${PACKAGE}
203+
pushd ${BASE_NAME}/package/${PACKAGE}
204204
rake docker:push || :
205205
popd
206206
- name: Test
@@ -210,6 +210,6 @@ jobs:
210210
--rm \
211211
--volume ${PWD}:/host \
212212
${ARCHITECTURE}/${DISTRIBUTION}:${DISTRIBUTION_VERSION} \
213-
/host/packages/${TASK_NAMESPACE}/test.sh \
214-
packages/${PACKAGE}/${TASK_NAMESPACE}/repositories
213+
/host/package/${TASK_NAMESPACE}/test.sh \
214+
package/${PACKAGE}/${TASK_NAMESPACE}/repositories
215215
popd

.gitignore

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
/dev/release/dist
2424
/dev/release/filtered_rat.txt
2525
/dev/release/rat.xml
26-
/packages/*/*.tar.gz
27-
/packages/*/apt/build.sh
28-
/packages/*/apt/env.sh
29-
/packages/*/apt/repositories/
30-
/packages/*/apt/tmp/
26+
/doc/build/
27+
/package/*/*.tar.gz
28+
/package/*/apt/build.sh
29+
/package/*/apt/env.sh
30+
/package/*/apt/repositories/
31+
/package/*/apt/tmp/

Rakefile

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,55 @@ file archive_name do
3232
end
3333
desc "Create #{archive_name}"
3434
task :dist => archive_name
35+
36+
namespace :doc do
37+
desc "Build HTML documentation"
38+
task :html do
39+
sh("sphinx-build",
40+
"-b", "html",
41+
"-j", "auto",
42+
"doc/source",
43+
"doc/build")
44+
end
45+
46+
desc "Publish HTML documentation"
47+
task :publish do
48+
site = ENV["ASF_SITE"] || "site"
49+
asf_yaml = File.expand_path(".asf.yaml")
50+
cleaned_doc = File.expand_path("doc/build.clean")
51+
index_html = File.expand_path("doc/index.html")
52+
53+
rm_rf(cleaned_doc)
54+
cp_r("doc/build", cleaned_doc)
55+
rm_f("#{cleaned_doc}/.buildinfo")
56+
rm_rf("#{cleaned_doc}/.doctrees")
57+
58+
cd("site") do
59+
cp(asf_yaml, ".")
60+
sh("git", "add", "--force", ".asf.yaml")
61+
cp(index_html, ".")
62+
sh("git", "add", "--force", "index.html")
63+
if ENV["GITHUB_REF_TYPE"] == "tag"
64+
new_version = ENV["GITHUB_REF_NAME"].gsub(/-rc\d+\z/, "")
65+
else
66+
new_version = "devel"
67+
end
68+
rm_rf(new_version)
69+
cp_r(cleaned_doc, new_version)
70+
sh("git", "add", "--force", new_version)
71+
unless new_version == "devel"
72+
rm_rf("current")
73+
cp_r(cleaned_doc, "current")
74+
sh("git", "add", "--force", "current")
75+
end
76+
sh("git", "commit", "-m", "Publish", "--allow-empty")
77+
unless ENV["GITHUB_EVENT_NAME"] == "pull_request"
78+
dry_run = []
79+
if ENV["GITHUB_REF_TYPE"] != "tag" and ENV["GITHUB_REF_NAME"] != "main"
80+
dry_run << "--dry-run"
81+
end
82+
sh("git", "push", *dry_run, "origin", "asf-site:asf-site")
83+
end
84+
end
85+
end
86+
end

benchmark/integer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ shared_preload_libraries = 'arrow_flight_sql'
3232
Prepare database:
3333

3434
```bash
35-
psql postgres -c '\i benchmark/integer/prepare1.sql'
35+
psql postgres -c '\i benchmark/integer/prepare-1M.sql'
3636
```
3737

3838
It creates `afs_benchmark` database and `data` table in the database.

dev/prepare-tls.sh

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -30,58 +30,64 @@ server_name=$2
3030
client_name=$3
3131

3232
openssl req \
33+
-addext "subjectAltName = DNS:${root_name}" \
34+
-keyout root.key \
3335
-new \
3436
-nodes \
35-
-text \
3637
-out root.csr \
37-
-keyout root.key \
38-
-subj "/CN=${root_name}"
38+
-subj "/CN=${root_name}" \
39+
-text
3940
chmod go-rwx root.key
4041

4142
openssl x509 \
42-
-req \
43-
-in root.csr \
44-
-text \
43+
-copy_extensions copy \
4544
-days 3650 \
46-
-extfile /etc/ssl/openssl.cnf \
4745
-extensions v3_ca \
46+
-extfile /etc/ssl/openssl.cnf \
47+
-in root.csr \
48+
-out root.crt \
49+
-req \
4850
-signkey root.key \
49-
-out root.crt
51+
-text
5052

5153
openssl req \
54+
-addext "subjectAltName = DNS:${server_name}" \
55+
-keyout server.key \
5256
-new \
5357
-nodes \
54-
-text \
5558
-out server.csr \
56-
-keyout server.key \
57-
-subj "/CN=${server_name}"
59+
-subj "/CN=${server_name}" \
60+
-text
5861
chmod og-rwx server.key
5962

6063
openssl x509 \
61-
-req \
62-
-in server.csr \
63-
-text \
64-
-days 365 \
6564
-CA root.crt \
66-
-CAkey root.key \
6765
-CAcreateserial \
68-
-out server.crt
66+
-CAkey root.key \
67+
-copy_extensions copy \
68+
-days 365 \
69+
-in server.csr \
70+
-out server.crt \
71+
-req \
72+
-text
6973

7074
openssl req \
75+
-addext "subjectAltName = DNS:${client_name}" \
76+
-keyout client.key \
7177
-new \
7278
-nodes \
73-
-text \
7479
-out client.csr \
75-
-keyout client.key \
76-
-subj "/CN=${client_name}"
80+
-subj "/CN=${client_name}" \
81+
-text
7782
chmod og-rwx client.key
7883

7984
openssl x509 \
80-
-req \
81-
-in client.csr \
82-
-text \
83-
-days 365 \
8485
-CA root.crt \
85-
-CAkey root.key \
8686
-CAcreateserial \
87-
-out client.crt
87+
-CAkey root.key \
88+
-copy_extensions copy \
89+
-days 365 \
90+
-in client.csr \
91+
-out client.crt \
92+
-req \
93+
-text

dev/release/rat_exclude_files.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ compile_commands.json
2121
dev/release/apache-rat-*.jar
2222
dev/release/filtered_rat.txt
2323
dev/release/rat.xml
24+
doc/source/_static/switcher.json

doc/index.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!DOCTYPE html>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one
4+
or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership. The ASF licenses this file
7+
to you under the Apache License, Version 2.0 (the
8+
"License"); you may not use this file except in compliance
9+
with the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing,
14+
software distributed under the License is distributed on an
15+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
KIND, either express or implied. See the License for the
17+
specific language governing permissions and limitations
18+
under the License.
19+
-->
20+
<html>
21+
<head>
22+
<meta http-equiv="Refresh" content="0; url=current/">
23+
</head>
24+
<body>
25+
</body>
26+
</html>

doc/requirements.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
myst-parser[linkify]
19+
pydata_sphinx_theme
20+
sphinx_inline_tabs

doc/source/_static/logo-dark.png

21.9 KB
Loading

0 commit comments

Comments
 (0)