1
Fork 0

Compare commits

..

2 commits

Author SHA1 Message Date
b9cda2deba
feat(ci): Allow CI to fail for 5.4
LGI doesn't have a rock compatible with 5.4, yet.
2022-08-14 17:19:29 +02:00
7ea226fa51
feat: Implement Concourse CI pipeline 2022-08-14 16:58:00 +02:00
9 changed files with 142 additions and 7 deletions

View file

@ -1,7 +1,6 @@
return { return {
default = { default = {
verbose = true, verbose = true,
helper = "./spec/_helper.lua",
lpath = "./src/?.lua;./src/?/init.lua;./src/?/?.lua;./tests/?.lua", lpath = "./src/?.lua;./src/?/init.lua;./src/?/?.lua;./tests/?.lua",
}, },
} }

57
.ci/pipeline.yml Normal file
View file

@ -0,0 +1,57 @@
---
resources:
- name: repo
type: git
icon: github
source:
uri: https://git.sclu1034.dev/lucas/lua-libpulse-glib
branch: ci
jobs:
- name: test
plan:
- get: repo
trigger: true
- in_parallel:
- task: run-test-5.1
file: repo/.ci/test.yml
vars:
lua-version: 5.1
- task: run-test-5.2
file: repo/.ci/test.yml
vars:
lua-version: 5.2
- task: run-test-5.3
file: repo/.ci/test.yml
vars:
lua-version: 5.3
# There is no rock for 5.4 LGI, yet. And I don't want to build that from source.
- try:
task: run-test-5.4
file: repo/.ci/test.yml
vars:
lua-version: 5.4
- name: rock
plan:
- get: repo
trigger: true
- in_parallel:
- task: run-rock-5.1
file: repo/.ci/rock.yml
vars:
lua-version: 5.1
- task: run-rock-5.2
file: repo/.ci/rock.yml
vars:
lua-version: 5.2
- task: run-rock-5.3
file: repo/.ci/rock.yml
vars:
lua-version: 5.3
# There is no rock for 5.4 LGI, yet. And I don't want to build that from source.
- try:
task: run-rock-5.4
file: repo/.ci/rock.yml
vars:
lua-version: 5.4

14
.ci/rock.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/sh
set -ex
sudo enable-lua ${LUA_VERSION:-5.1}
eval "$(luarocks --lua-version ${LUA_VERSION:-5.1} path)"
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
luarocks --lua-version ${LUA_VERSION:-5.1} make rocks/lua-libpulse-glib-scm-1.rockspec
sudo disable-lua ${LUA_VERSION:-5.1}

20
.ci/rock.yml Normal file
View file

@ -0,0 +1,20 @@
---
platform: linux
image_resource:
type: registry-image
source:
repository: registry.local:5000/lua-clib-pulse
tag: latest
inputs:
- name: repo
params:
CI: true
LUA_VERSION: ((lua-version))
run:
path: .ci/rock.sh
dir: repo

23
.ci/test.sh Executable file
View file

@ -0,0 +1,23 @@
#!/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}
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 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
sudo disable-lua ${LUA_VERSION:-5.1}

20
.ci/test.yml Normal file
View file

@ -0,0 +1,20 @@
---
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
LUA_VERSION: ((lua-version))
run:
path: repo/.ci/test.sh

View file

@ -50,7 +50,9 @@ TEST_ARGS ?= --output=TAP
CCFLAGS += -Werror CCFLAGS += -Werror
endif endif
.PHONY: clean doc doc-content doc-styles install uninstall test check rock .PHONY: all clean doc doc-content doc-styles install uninstall test check rock
all: build doc
build: $(TARGET) build: $(TARGET)

View file

@ -5,7 +5,6 @@ ifdef::env-github,env-browser[]
:toc: macro :toc: macro
:toclevels: 1 :toclevels: 1
endif::[] endif::[]
ifdef::env-github[]
:branch: master :branch: master
:status: :status:
:outfilesuffix: .adoc :outfilesuffix: .adoc
@ -15,16 +14,15 @@ ifdef::env-github[]
:note-caption: :paperclip: :note-caption: :paperclip:
:tip-caption: :bulb: :tip-caption: :bulb:
:warning-caption: :warning: :warning-caption: :warning:
endif::[] :url-ci: https://ci.sclu1034.dev/teams/main/pipelines/lgi-libpulse-glib
:url-ci-github: https://github.com/sclu1034/lua-libpulse-glib/actions :url-ci-badge: https://ci.sclu1034.dev/api/v1/teams/main/pipelines/lgi-libpulse-glib/badge
:url-ci-badge-github: https://img.shields.io/github/workflow/status/sclu1034/lua-libpulse-glib/Lint%20&%20Test?style=flat-square
:url-license-badge: https://img.shields.io/badge/license-GPLv3-brightgreen?style=flat-square :url-license-badge: https://img.shields.io/badge/license-GPLv3-brightgreen?style=flat-square
:url-luarocks-badge: https://img.shields.io/luarocks/v/sclu1034/lua-libpulse-glib?style=flat-square :url-luarocks-badge: https://img.shields.io/luarocks/v/sclu1034/lua-libpulse-glib?style=flat-square
:url-luarocks-link: https://luarocks.org/modules/sclu1034/lua-libpulse-glib :url-luarocks-link: https://luarocks.org/modules/sclu1034/lua-libpulse-glib
image:{url-license-badge}[License] image:{url-license-badge}[License]
ifdef::status[] ifdef::status[]
image:{url-ci-badge-github}[Build Status (GitHub Actions), link={url-ci-github}] image:{url-ci-badge}[Build Status (Concourse CI), link={url-ci}]
endif::[] endif::[]
image:{url-luarocks-badge}[LuaRocks Package, link={url-luarocks-link}] image:{url-luarocks-badge}[LuaRocks Package, link={url-luarocks-link}]

View file

@ -310,7 +310,9 @@ static const struct luaU_enumfield proplist_enum[] = {
{ "FORMAT_RATE", PA_PROP_FORMAT_RATE }, { "FORMAT_RATE", PA_PROP_FORMAT_RATE },
{ "FORMAT_CHANNELS", PA_PROP_FORMAT_CHANNELS }, { "FORMAT_CHANNELS", PA_PROP_FORMAT_CHANNELS },
{ "FORMAT_CHANNEL_MAP", PA_PROP_FORMAT_CHANNEL_MAP }, { "FORMAT_CHANNEL_MAP", PA_PROP_FORMAT_CHANNEL_MAP },
#if PA_CHECK_VERSION(15, 0, 0)
{ "CONTEXT_FORCE_DISABLE_SHM", PA_PROP_CONTEXT_FORCE_DISABLE_SHM }, { "CONTEXT_FORCE_DISABLE_SHM", PA_PROP_CONTEXT_FORCE_DISABLE_SHM },
{ "BLUETOOTH_CODEC", PA_PROP_BLUETOOTH_CODEC }, { "BLUETOOTH_CODEC", PA_PROP_BLUETOOTH_CODEC },
#endif
{ NULL, NULL } { NULL, NULL }
}; };