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
|
version: 2.1
orbs:
codecov: codecov/codecov@1.1.3
win: circleci/windows@2.2.0
jobs:
build_rock:
description: "Build with luarocks for a specific Lua version"
parameters:
lua:
type: string
docker:
- image: circleci/python
steps:
- checkout
- run:
name: Install debian dependencies
command: |
sudo apt -y update
sudo apt -y install libldap2-dev
- run:
name: Install hererocks
command: |
pip3 install hererocks
hererocks bed --<<parameters.lua>> --no-readline --luarocks latest --verbose
hererocks bed --show
- run:
name: "Build (with install)"
command: |
source bed/bin/activate
luarocks make rockspec/lualdap-dev-2.rockspec
- run:
name: "Smoke"
command: |
source bed/bin/activate
lua -v
lua tests/smoke.lua
test_with_coverage:
description: "Test with coverage for a specific Lua version"
parameters:
lua:
type: string
docker:
- image: circleci/python
- image: docker.io/openshift/openldap-2441-centos7@sha256:b5619d4de8efec7973dbd280eb2cc462ebeb8ae6e457acef4b743b7374dd600d
steps:
- checkout
- run:
name: Install debian dependencies
command: |
sudo apt -y update
sudo apt -y install libldap2-dev
sudo apt -y install ldap-utils netcat
- run:
name: Install hererocks
command: |
pip3 install hererocks
hererocks bed --<<parameters.lua>> --no-readline --luarocks latest --verbose
hererocks bed --show
- run:
name: Install rocks dependencies
command: |
source bed/bin/activate
luarocks install busted
luarocks install cluacov
luarocks install luacheck
luarocks list
- run:
name: "Build (without install)"
command: |
source bed/bin/activate
make LUA_INCDIR=bed/include COVERAGE=1 src/lualdap.so
- run:
name: "Luacheck"
command: |
source bed/bin/activate
make luacheck
- run:
name: "Wait for OpenLDAP to spin up"
command: while ! nc -z localhost 389 ; do sleep 1 ; done
- run:
name: Prime and test LDAP DB
command: |
make setup_slapd
- run:
name: "Test with coverage"
command: |
source bed/bin/activate
make coverage
- codecov/upload:
file: "*.gcov"
flags: default
upload_name: <<parameters.lua>>
- store_test_results:
path: test-reports/
build_deb:
description: "Build Debian packages"
docker:
- image: circleci/python
steps:
- checkout
- run:
name: Install debian dependencies
command: |
sudo apt -y update
sudo apt -y install libldap2-dev
sudo apt -y install fakeroot dh-lua
- run:
name: "Build"
command: |
rm debian/lua5.4.dh-lua.conf
make deb
build_win:
description: "Build rock on Windows"
executor: win/default
steps:
- checkout
- run:
name: Install hererocks
command: |
pip install hererocks
hererocks bed --lua latest --no-readline --luarocks latest --verbose
hererocks bed --show
- run:
name: "Build (with install)"
command: |
bed/bin/activate.ps1
luarocks make rockspec/lualdap-dev-2.rockspec
- run:
name: "Smoke"
command: |
bed/bin/activate.ps1
lua -v
lua tests/smoke.lua
workflows:
version: 2
build_rock:
jobs:
- build_rock:
name: "rock <<matrix.lua>>"
matrix:
parameters:
lua: ["lua 5.1", "lua 5.2", "lua 5.3", "lua 5.4", "luajit 2.0", "luajit 2.1"]
test_with_coverage:
jobs:
- test_with_coverage:
name: "coverage <<matrix.lua>>"
matrix:
parameters:
lua: ["lua 5.1", "lua 5.2", "lua 5.3", "lua 5.4", "luajit 2.0", "luajit 2.1"]
build_deb:
jobs:
- build_deb:
name: "deb"
build_win:
jobs:
- build_win:
name: "windows"
|