Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Neumann <artur@jankaritech.com>2021-04-12 11:42:00 +0300
committerArtur Neumann <artur@jankaritech.com>2021-05-11 12:03:29 +0300
commite25d4740b8abf40b332a032fe895803e3b77710a (patch)
treeb5346be03edf090ce9d8e45099a8aa49697e6abf /.drone.star
parente7c06959e638f40a3157c33121104b8b9a805572 (diff)
split build_client steps out
Diffstat (limited to '.drone.star')
-rw-r--r--.drone.star64
1 files changed, 36 insertions, 28 deletions
diff --git a/.drone.star b/.drone.star
index 3975f4ec7..98453bfc8 100644
--- a/.drone.star
+++ b/.drone.star
@@ -122,32 +122,10 @@ def build_and_test_client(ctx, c_compiler, cxx_compiler, build_type, generator,
"commands": [
"git submodule update --init --recursive",
],
- },
- {
- "name": "cmake",
- "image": "owncloudci/client",
- "pull": "always",
- "environment": {
- "LC_ALL": "C.UTF-8",
- },
- "commands": [
- 'mkdir -p "' + build_dir + '"',
- 'cd "' + build_dir + '"',
- 'cmake -G"' + generator + '" -DCMAKE_C_COMPILER="' + c_compiler + '" -DCMAKE_CXX_COMPILER="' + cxx_compiler + '" -DCMAKE_BUILD_TYPE="' + build_type + '" -DBUILD_TESTING=1 ..',
- ],
- },
- {
- "name": build_command,
- "image": "owncloudci/client",
- "pull": "always",
- "environment": {
- "LC_ALL": "C.UTF-8",
- },
- "commands": [
- 'cd "' + build_dir + '"',
- build_command + " -j4",
- ],
- },
+ }
+ ] +
+ build_client(ctx, c_compiler, cxx_compiler, build_type, generator, build_command, build_dir)+
+ [
{
"name": "ctest",
"image": "owncloudci/client",
@@ -167,6 +145,36 @@ def build_and_test_client(ctx, c_compiler, cxx_compiler, build_type, generator,
"depends_on": depends_on,
}
+def build_client(ctx, c_compiler, cxx_compiler, build_type, generator, build_command, build_dir):
+ return [
+ {
+ "name": "cmake",
+ "image": "owncloudci/client",
+ "pull": "always",
+ "environment": {
+ "LC_ALL": "C.UTF-8",
+ },
+ "commands": [
+ 'mkdir -p "' + build_dir + '"',
+ 'cd "' + build_dir + '"',
+ 'cmake -G"' + generator + '" -DCMAKE_C_COMPILER="' + c_compiler + '" -DCMAKE_CXX_COMPILER="' + cxx_compiler + '" -DCMAKE_BUILD_TYPE="' + build_type + '" -DBUILD_TESTING=1 ..',
+ ],
+ },
+ {
+ "name": build_command,
+ "image": "owncloudci/client",
+ "pull": "always",
+ "environment": {
+ "LC_ALL": "C.UTF-8",
+ },
+ "commands": [
+ 'cd "' + build_dir + '"',
+ build_command + " -j4",
+ ],
+ }
+ ]
+
+
def build_client_docs(ctx):
return {
"kind": "pipeline",
@@ -283,7 +291,7 @@ def build_client_docs(ctx):
}
def changelog(ctx, trigger = {}, depends_on = []):
- repo_slug = ctx.build.source_repo if ctx.build.source_repo else ctx.repo.slug
+# repo_slug = ctx.build.source_repo if ctx.build.source_repo else ctx.repo.slug
result = {
'kind': 'pipeline',
'type': 'docker',
@@ -300,7 +308,7 @@ def changelog(ctx, trigger = {}, depends_on = []):
'actions': [
'clone',
],
- 'remote': 'https://github.com/%s' % (repo_slug),
+ 'remote': 'https://github.com/%s', # % (repo_slug),
'branch': ctx.build.source if ctx.build.event == 'pull_request' else 'master',
'path': '/drone/src',
'netrc_machine': 'github.com',