The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

scripts: Add more copybara workflows

+127 -1
+127 -1
scripts/copy.bara.sky
··· 4 4 """Configuration for "copybara" <https://github.com/google/copybara> to update vendored source""" 5 5 6 6 gitlab_url = "git@gitlab.freedesktop.org:ryan.pavlik/monado.git" 7 + author = "Ryan Pavlik <ryan.pavlik@collabora.com>" 7 8 8 9 # update-stb: Update STB libraries 9 10 core.workflow( ··· 19 20 ), 20 21 destination_files = glob(["src/external/stb/*.h"]), 21 22 origin_files = glob(["stb_image_write.h"]), 22 - authoring = authoring.pass_thru("Ryan Pavlik <ryan.pavlik@collabora.com>"), 23 + authoring = authoring.pass_thru(author), 23 24 transformations = [ 24 25 metadata.replace_message("external/stb: Update stb libraries from upstream"), 25 26 core.move("", "src/external/stb/"), 26 27 ], 27 28 ) 29 + 30 + # Custom transformation that writes the COMMIT file in the nanopb directory 31 + def write_nanopb_commit(ctx): 32 + return ctx.write_path( 33 + ctx.new_path("src/external/nanopb/COMMIT.txt"), 34 + core.format("%s\n", [ctx.find_label("GIT_DESCRIBE_CHANGE_VERSION")]), 35 + ) 36 + 37 + # update-nanopb: Update NanoPB library 38 + # WARNING: Also requires update of the generated .pb.h and .pb.c files, 39 + # not currently done by this code! 40 + core.workflow( 41 + name = "update-nanopb", 42 + origin = git.github_origin( 43 + url = "https://github.com/nanopb/nanopb.git", 44 + # ref = "master", 45 + describe_version = True, 46 + version_selector = core.latest_version( 47 + format = "refs/tags/nanopb-${n0}.${n1}.${n2}", 48 + regex_groups = { 49 + "n0": "[0-9]+", 50 + "n1": "[0-9]+", 51 + "n2": "[0-9]+", 52 + }, 53 + ), 54 + ), 55 + destination = git.destination( 56 + url = gitlab_url, 57 + fetch = "main", 58 + push = "update-nanopb", 59 + ), 60 + destination_files = glob(["src/external/nanopb/*.{h,c,txt}"], exclude = ["src/external/nanopb/monado_metrics.pb.{c,h}"]), 61 + origin_files = glob(["*.{h,c,txt}"], exclude = ["CMakeLists.txt", "CHANGELOG.txt"]), 62 + authoring = authoring.pass_thru(author), 63 + transformations = [ 64 + metadata.expose_label("GIT_DESCRIBE_CHANGE_VERSION"), 65 + metadata.replace_message("external/nanopb: Update nanopb from upstream ${GIT_DESCRIBE_CHANGE_VERSION}"), 66 + core.move("", "src/external/nanopb/"), 67 + # core.format() 68 + write_nanopb_commit, 69 + ], 70 + ) 71 + 72 + # update-cjson: Update cJSON library 73 + core.workflow( 74 + name = "update-cjson", 75 + origin = git.github_origin( 76 + url = "https://github.com/DaveGamble/cJSON.git", 77 + # ref = "master", 78 + describe_version = True, 79 + version_selector = core.latest_version( 80 + format = "refs/tags/v${n0}.${n1}.${n2}", 81 + regex_groups = { 82 + "n0": "[0-9]+", 83 + "n1": "[0-9]+", 84 + "n2": "[0-9]+", 85 + }, 86 + ), 87 + ), 88 + destination = git.destination( 89 + url = gitlab_url, 90 + fetch = "main", 91 + push = "update-cjson", 92 + ), 93 + destination_files = glob(["src/external/cjson/cjson/*"]), 94 + origin_files = glob(["cJSON.{h,c}", "{CHANGELOG,CONTRIBUTORS}.md", "LICENSE"]), 95 + authoring = authoring.pass_thru(author), 96 + transformations = [ 97 + metadata.expose_label("GIT_DESCRIBE_CHANGE_VERSION"), 98 + metadata.replace_message("external/cjson: Update cJSON from upstream ${GIT_DESCRIBE_CHANGE_VERSION}"), 99 + core.move("", "src/external/cjson/cjson/"), 100 + ], 101 + ) 102 + 103 + # update-catch2: Update Catch2 library, in case there's another 2.x release 104 + core.workflow( 105 + name = "update-catch2", 106 + origin = git.github_origin( 107 + url = "https://github.com/catchorg/Catch2.git", 108 + # ref = "master", 109 + describe_version = True, 110 + version_selector = core.latest_version( 111 + format = "refs/tags/v${n0}.${n1}.${n2}", 112 + regex_groups = { 113 + "n0": "2", 114 + "n1": "[0-9]+", 115 + "n2": "[0-9]+", 116 + }, 117 + ), 118 + ), 119 + destination = git.destination( 120 + url = gitlab_url, 121 + fetch = "main", 122 + push = "update-catch2", 123 + ), 124 + destination_files = glob(["src/external/Catch2/*"]), 125 + origin_files = glob(["single_include/catch2/catch.hpp"]), 126 + authoring = authoring.pass_thru(author), 127 + transformations = [ 128 + metadata.expose_label("GIT_DESCRIBE_CHANGE_VERSION"), 129 + metadata.replace_message("external/Catch2: Update Catch2 from upstream ${GIT_DESCRIBE_CHANGE_VERSION}"), 130 + core.move("single_include/catch2/catch.hpp", "src/external/Catch2/catch/"), 131 + ], 132 + ) 133 + 134 + # update-renderdoc: Update RenderDoc API 135 + core.workflow( 136 + name = "update-renderdoc", 137 + origin = git.github_origin( 138 + url = "https://github.com/baldurk/renderdoc.git", 139 + ref = "v1.x", 140 + ), 141 + destination = git.destination( 142 + url = gitlab_url, 143 + fetch = "main", 144 + push = "update-renderdoc", 145 + ), 146 + destination_files = glob(["src/external/renderdoc_api/*.h"]), 147 + origin_files = glob(["renderdoc/api/app/*.h"]), 148 + authoring = authoring.pass_thru(author), 149 + transformations = [ 150 + metadata.replace_message("external/renderdoc_api: Update RenderDoc API from upstream"), 151 + core.move("renderdoc/api/app/", "src/external/renderdoc_api/"), 152 + ], 153 + )