ci: move BSD jobs from sourcehut to Cirrus CI #19616

dispatch.sr.ht is being deprecated, meaning that using sourcehut CI
won't be possible (see https://github.com/neovim/neovim/issues/19609).
Since Github Actions doesn't provide any BSD runners an external service
is required and Cirrus CI seems like a good replacement for sourcehut.

Initially experimented with using FreeBSD and OpenBSD virtual machines
in GitHub Actions, but Cirrus has been a much better fit with better
performance, logs and overall experience.

Failing tests are automatically skipped on FreeBSD regardless if it's on
CI or not. Ideally these tests should only be skipped in CI with the
help of `isCI` helper function. Unfortunately, the tests don't recognize
the environment variable CIRRUS_CI even if it's set manually. This
workaround is good enough for the time being, but we might want to only
skip tests when using the CI (or even better, fix the failing tests).

Closes: https://github.com/neovim/neovim/issues/19609
This commit is contained in:
dundargoc
2022-09-09 00:12:42 +02:00
committed by GitHub
parent d6233cbcdc
commit 2d6735d8ce
9 changed files with 56 additions and 113 deletions

View File

@@ -790,10 +790,9 @@ end
function module.isCI(name)
local any = (name == nil)
assert(any or name == 'sourcehut' or name == 'github')
local sh = ((any or name == 'sourcehut') and nil ~= os.getenv('SOURCEHUT'))
assert(any or name == 'github')
local gh = ((any or name == 'github') and nil ~= os.getenv('GITHUB_ACTIONS'))
return sh or gh
return gh
end