1
Fork 0

Compare commits

..

3 commits

Author SHA1 Message Date
c8bf8931c8
ci: Build and deploy documentation 2022-08-17 15:13:56 +02:00
45a1c9b711
ci: Only build the library for testing
The docs don't need to be build for that.
2022-08-17 15:07:59 +02:00
7e96f344be
chore: Remove unused Bors config 2022-08-14 17:37:57 +02:00
6 changed files with 56 additions and 16 deletions

22
.ci/deploy-docs.sh Executable file
View file

@ -0,0 +1,22 @@
#!/bin/sh
set -ex
mkdir -p "${BUILD_DIR:-./build}"
CMAKE_ARGS=""
if [ -n "$CI" ]; then
CMAKE_ARGS="-DCI=ON"
fi
sudo enable-lua ${LUA_VERSION:-5.1}
make -j $(nproc) -C ${SOURCE_DIR:-.} BUILD_DIR=${BUILD_DIR:-./build} LUA_VERSION=${LUA_VERSION:-5.1} LUA=lua doc
tar -czf doc.tar.gz -C ${BUILD_DIR:-./build}/doc .
curl -T doc.tar.gz -XPOST --user ${DOCS_CREDENTIALS} https://${DOCS_HOST}/publish/lua-libpulse-glib
sudo disable-lua ${LUA_VERSION:-5.1}

22
.ci/deploy-docs.yml Normal file
View file

@ -0,0 +1,22 @@
---
platform: linux
image_resource:
type: registry-image
source:
repository: registry.local:5000/lua-clib-pulse
tag: latest
inputs:
- name: repo
params:
CI: true
SOURCE_DIR: repo
BUILD_DIR: /tmp/build-output
DOCS_HOST: ((doc-host))
DOCS_CREDENTIALS: "((deploy-user)):((deploy-password))"
run:
path: repo/.ci/deploy-docs.sh

View file

@ -55,3 +55,14 @@ jobs:
file: repo/.ci/rock.yml file: repo/.ci/rock.yml
vars: vars:
lua-version: 5.4 lua-version: 5.4
- name: doc
plan:
- get: repo
trigger: true
- task: deploy-docs
file: repo/.ci/deploy-docs.yml
params:
doc-host: ((doc-host))
deploy-user: ((deploy-user))
deploy-password: ((deploy-password))

View file

@ -15,9 +15,7 @@ eval "$(luarocks --lua-version ${LUA_VERSION:-5.1} path)"
luarocks --lua-version ${LUA_VERSION:-5.1} install busted luarocks --lua-version ${LUA_VERSION:-5.1} install busted
luarocks --lua-version ${LUA_VERSION:-5.1} install lgi luarocks --lua-version ${LUA_VERSION:-5.1} install lgi
luarocks --lua-version ${LUA_VERSION:-5.1} install ldoc
luarocks --lua-version ${LUA_VERSION:-5.1} install lua-discount
make -j $(nproc) -C ${SOURCE_DIR:-.} LUA_VERSION=${LUA_VERSION:-5.1} LUA=lua make -j $(nproc) -C ${SOURCE_DIR:-.} BUILD_DIR=${BUILD_DIR:-./build} LUA_VERSION=${LUA_VERSION:-5.1} LUA=lua build
sudo disable-lua ${LUA_VERSION:-5.1} sudo disable-lua ${LUA_VERSION:-5.1}

View file

@ -82,9 +82,6 @@ doc-styles: $(BUILD_DIR)/doc/ldoc.css
doc-content: $(BUILD_DIR)/doc/index.html doc-content: $(BUILD_DIR)/doc/index.html
doc: doc-styles doc-content doc: doc-styles doc-content
ifdef CI
touch "$(BUILD_DIR)/doc/.nojekyll"
endif
clean: clean:
rm -r out/ rm -r out/

View file

@ -1,10 +0,0 @@
status = [
"check",
"test (5.1)",
"test (5.2)",
"test (5.3)",
"test (luajit)",
"rock (5.1)",
"rock (5.2)",
"rock (5.3)",
]