Skip to content

Commit

Permalink
ci: detect package build environment
Browse files Browse the repository at this point in the history
  • Loading branch information
striezel committed Aug 19, 2022
1 parent b39f5c8 commit a73d940
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/webp-viewer-tests/detect_ci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@ bool isGithubActions()
return hasEnvVar("GITHUB_ACTIONS");
}

bool isPackageBuilder()
{
// debuild / dpkg-buildpackage usually sets this variable.
return hasEnvVar("SOURCE_DATE_EPOCH");
}

bool runsInCi()
{
return isGitlabCi() || isGithubActions();
return isGitlabCi() || isGithubActions() || isPackageBuilder();
}

0 comments on commit a73d940

Please sign in to comment.