Enable CI

This commit is contained in:
Daniel Poelzleithner 2021-12-09 13:50:41 +01:00
parent 5212fd4794
commit 92af746a73
3 changed files with 27 additions and 4 deletions

17
.github/workflows/build.yaml vendored Normal file
View File

@ -0,0 +1,17 @@
name: "Build"
on:
pull_request:
push:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- lsyncd_lua5_3
steps:
- uses: actions/checkout@v2.4.0
- uses: cachix/install-nix-action@v15
- run: |
chmod og-rw ~
nix develop .#${{ matrix.version }} --command ./tests/ci-run.sh

View File

@ -27,6 +27,10 @@ sync {
ssh = {
port= 2468,
identityFile = "]] .. script_path() .. [[/ssh/id_rsa",
options = {
StrictHostKeyChecking="no",
UserKnownHostsFile="/dev/null",
},
},
source = ']]..srcdir..[[',
targetdir = ']]..trgdir..[[',

View File

@ -137,7 +137,7 @@ function startSshd()
end
local f = io.open( sshdPath .. "sshd_config", 'w')
f:write([[
local cfg = [[
Port 2468
HostKey ]] .. sshdPath .. [[ssh_host_rsa_key
AuthorizedKeysFile ]] .. sshdPath .. [[authorized_keys
@ -145,13 +145,15 @@ function startSshd()
UsePAM no
#Subsystem sftp /usr/lib/ssh/sftp-server
PidFile ]] .. sshdPath .. [[sshd.pid
]])
f:close( )
]]
cwriteln("Use ssh config: "..cfg)
f:write(cfg)
f:close()
--local which = io.popen("which sshd")
exePath = which('sshd')
cwriteln("Using sshd: "..exePath)
local pid = spawn(exePath, "-f", sshdPath .. "sshd_config")
local pid = spawn(exePath, "-D", "-e", "-f", sshdPath .. "sshd_config")
cwriteln( 'spawned sshd server: ' .. pid)
return true