ci: add cirrus to isCI function to skip tests (#20526)

The environment variable CIRRUS_CI is manually passed to RunTests.cmake
as it doesn't get passed when using cmake script mode.
This commit is contained in:
dundargoc
2022-10-17 17:16:31 +02:00
committed by GitHub
parent b9632e58e3
commit 5046b4b4ad
8 changed files with 32 additions and 22 deletions

View File

@@ -790,10 +790,10 @@ end
function module.isCI(name)
local any = (name == nil)
assert(any or name == 'github')
assert(any or name == 'github' or name == 'cirrus')
local gh = ((any or name == 'github') and nil ~= os.getenv('GITHUB_ACTIONS'))
return gh
local cirrus = ((any or name == 'cirrus') and nil ~= os.getenv('CIRRUS_CI'))
return gh or cirrus
end
-- Gets the (tail) contents of `logfile`.