You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libshit/tools/ci_conf.libshit.rb

35 lines
1.2 KiB
Ruby

cond = -> { opt.project == 'libshit' }
step :libshit_opts, always_after: :default_values, before: :final_opts,
cond: cond do
opt.libshit_translate_yaml = ![false, "false", "no"].include?(opt.libshit_translate_yaml)
opt.executables = opt.mode == 'rel' ? [] : ['libshit-tests']
opt.test_executable = 'libshit-tests'
opt.yaml_cpp_url = 'https://git.neptards.moe/neptards/yaml-cpp.git'
opt.yaml_cpp_revision = '8f79d2f39d6b8833274d179c460fa86bba7391a8'
end
step :libshit_prepare, always_after: :default_values,
after: [:libshit_opts, :prepare_checkout], before: :final_opts, cond: cond do
# can't be in cond, because it is filled by :libshit_opts
next unless opt.libshit_translate_yaml
dir = File.join opt.tools_dir, '../misc/yaml-cpp'
unless Dir.exist? dir
run File.dirname(dir), 'git', 'clone', opt.yaml_cpp_url, 'yaml-cpp',
'--reference-if-able', '/home/build/git'
end
unless maybe_run dir, 'git', 'checkout', opt.yaml_cpp_revision
run dir, 'git', 'fetch'
run dir, 'git', 'checkout', opt.yaml_cpp_revision
end
unless run_capture(dir, 'git', 'branch', '--show-current').empty?
fail "Specified git revision #{opt.yaml_cpp_revision.inspect} is not a commit/tag"
end
env.LIBSHIT_HAS_YAML_CPP_IN_MISC=1
end