From 2e0ac1e0c4343f60d8dd9df51e8b432235d2c5f7 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 17 Jun 2020 17:39:17 +0200 Subject: [PATCH] Buildbot: Cleanup, remove unused script and change naming Follow upstream convention. --- build_files/buildbot/README.md | 2 +- build_files/buildbot/slave_rsync.py | 37 ------------------- ...ave_bundle_dmg.py => worker_bundle_dmg.py} | 2 +- ...e_codesign.cmake => worker_codesign.cmake} | 2 +- .../{slave_codesign.py => worker_codesign.py} | 0 .../{slave_compile.py => worker_compile.py} | 2 +- .../{slave_pack.py => worker_pack.py} | 4 +- .../{slave_test.py => worker_test.py} | 0 .../{slave_update.py => worker_update.py} | 0 9 files changed, 6 insertions(+), 43 deletions(-) delete mode 100644 build_files/buildbot/slave_rsync.py rename build_files/buildbot/{slave_bundle_dmg.py => worker_bundle_dmg.py} (99%) rename build_files/buildbot/{slave_codesign.cmake => worker_codesign.cmake} (95%) rename build_files/buildbot/{slave_codesign.py => worker_codesign.py} (100%) rename build_files/buildbot/{slave_compile.py => worker_compile.py} (98%) rename build_files/buildbot/{slave_pack.py => worker_pack.py} (98%) rename build_files/buildbot/{slave_test.py => worker_test.py} (100%) rename build_files/buildbot/{slave_update.py => worker_update.py} (100%) diff --git a/build_files/buildbot/README.md b/build_files/buildbot/README.md index cf129f83b39..06733c9a42d 100644 --- a/build_files/buildbot/README.md +++ b/build_files/buildbot/README.md @@ -8,7 +8,7 @@ Code signing is done as part of INSTALL target, which makes it possible to sign files which are aimed into a bundle and coming from a non-signed source (such as libraries SVN). -This is achieved by specifying `slave_codesign.cmake` as a post-install script +This is achieved by specifying `worker_codesign.cmake` as a post-install script run by CMake. This CMake script simply involves an utility script written in Python which takes care of an actual signing. diff --git a/build_files/buildbot/slave_rsync.py b/build_files/buildbot/slave_rsync.py deleted file mode 100644 index 19f1e67408d..00000000000 --- a/build_files/buildbot/slave_rsync.py +++ /dev/null @@ -1,37 +0,0 @@ -# ##### BEGIN GPL LICENSE BLOCK ##### -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# ##### END GPL LICENSE BLOCK ##### - -# - -# Runs on buildbot slave, rsync zip directly to buildbot server rather -# than using upload which is much slower - -import buildbot_utils -import os -import sys - -if __name__ == "__main__": - builder = buildbot_utils.create_builder_from_arguments() - - # rsync, this assumes ssh keys are setup so no password is needed - local_zip = "buildbot_upload.zip" - remote_folder = "builder.blender.org:/data/buildbot-master/uploaded/" - remote_zip = remote_folder + "buildbot_upload_" + builder.name + ".zip" - - command = ["rsync", "-avz", local_zip, remote_zip] - buildbot_utils.call(command) diff --git a/build_files/buildbot/slave_bundle_dmg.py b/build_files/buildbot/worker_bundle_dmg.py similarity index 99% rename from build_files/buildbot/slave_bundle_dmg.py rename to build_files/buildbot/worker_bundle_dmg.py index 11d2c3cb602..cd3da85e12a 100755 --- a/build_files/buildbot/slave_bundle_dmg.py +++ b/build_files/buildbot/worker_bundle_dmg.py @@ -30,7 +30,7 @@ from tempfile import TemporaryDirectory, NamedTemporaryFile from typing import List BUILDBOT_DIRECTORY = Path(__file__).absolute().parent -CODESIGN_SCRIPT = BUILDBOT_DIRECTORY / 'slave_codesign.py' +CODESIGN_SCRIPT = BUILDBOT_DIRECTORY / 'worker_codesign.py' BLENDER_GIT_ROOT_DIRECTORY = BUILDBOT_DIRECTORY.parent.parent DARWIN_DIRECTORY = BLENDER_GIT_ROOT_DIRECTORY / 'release' / 'darwin' diff --git a/build_files/buildbot/slave_codesign.cmake b/build_files/buildbot/worker_codesign.cmake similarity index 95% rename from build_files/buildbot/slave_codesign.cmake rename to build_files/buildbot/worker_codesign.cmake index fd2beae11a0..f37feaef407 100644 --- a/build_files/buildbot/slave_codesign.cmake +++ b/build_files/buildbot/worker_codesign.cmake @@ -33,7 +33,7 @@ else() endif() execute_process( - COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_LIST_DIR}/slave_codesign.py" + COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_LIST_DIR}/worker_codesign.py" "${CMAKE_INSTALL_PREFIX}" WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} RESULT_VARIABLE exit_code diff --git a/build_files/buildbot/slave_codesign.py b/build_files/buildbot/worker_codesign.py similarity index 100% rename from build_files/buildbot/slave_codesign.py rename to build_files/buildbot/worker_codesign.py diff --git a/build_files/buildbot/slave_compile.py b/build_files/buildbot/worker_compile.py similarity index 98% rename from build_files/buildbot/slave_compile.py rename to build_files/buildbot/worker_compile.py index 1bb72501648..f1357e1864f 100644 --- a/build_files/buildbot/slave_compile.py +++ b/build_files/buildbot/worker_compile.py @@ -25,7 +25,7 @@ import buildbot_utils def get_cmake_options(builder): post_install_script = os.path.join( - builder.blender_dir, 'build_files', 'buildbot', 'slave_codesign.cmake') + builder.blender_dir, 'build_files', 'buildbot', 'worker_codesign.cmake') config_file = "build_files/cmake/config/blender_release.cmake" options = ['-DCMAKE_BUILD_TYPE:STRING=Release', diff --git a/build_files/buildbot/slave_pack.py b/build_files/buildbot/worker_pack.py similarity index 98% rename from build_files/buildbot/slave_pack.py rename to build_files/buildbot/worker_pack.py index 8549a7881e6..87ee49c87d8 100644 --- a/build_files/buildbot/slave_pack.py +++ b/build_files/buildbot/worker_pack.py @@ -18,7 +18,7 @@ # -# Runs on buildbot slave, creating a release package using the build +# Runs on buildbot worker, creating a release package using the build # system and zipping it into buildbot_upload.zip. This is then uploaded # to the master in the next buildbot step. @@ -110,7 +110,7 @@ def pack_mac(builder): release_dir = os.path.join(builder.blender_dir, 'release', 'darwin') buildbot_dir = os.path.join(builder.blender_dir, 'build_files', 'buildbot') - bundle_script = os.path.join(buildbot_dir, 'slave_bundle_dmg.py') + bundle_script = os.path.join(buildbot_dir, 'worker_bundle_dmg.py') command = [bundle_script] command += ['--dmg', package_filepath] diff --git a/build_files/buildbot/slave_test.py b/build_files/buildbot/worker_test.py similarity index 100% rename from build_files/buildbot/slave_test.py rename to build_files/buildbot/worker_test.py diff --git a/build_files/buildbot/slave_update.py b/build_files/buildbot/worker_update.py similarity index 100% rename from build_files/buildbot/slave_update.py rename to build_files/buildbot/worker_update.py