Merge branch 'ps/meson-improvements' into next
The build configurations for Meson have been optimized to avoid recompiling HTTP sources multiple times and to utilize precompiled headers for test-helpers and unit tests, reducing clean build times. Additionally, the shell completion tests and GitLab CI MSVC runner jobs have been fixed. * ps/meson-improvements: gitlab-ci: fix hanging MSVC jobs meson: update wrappers meson: fix outdated completion helpers meson: use precompiled headers for unit tests meson: use precompiled headers for our test-helper meson: don't recompile git-remote-http(1) multiple times for tests meson: avoid recompiling HTTP sources several timesnext
commit
2b3488dc63
|
|
@ -63,3 +63,11 @@ Invoke-Installer $gitInstaller @('-y', '-o"C:\Program Files\Git"')
|
|||
$mesonMsi = Get-Installer "meson.msi" `
|
||||
"https://github.com/mesonbuild/meson/releases/download/$MesonVersion/meson-$MesonVersion-64.msi"
|
||||
Invoke-Installer msiexec.exe @('/i', $mesonMsi, 'INSTALLDIR=C:\Meson', '/quiet', '/norestart')
|
||||
|
||||
# Disable Git Credential Manager, which is auto-configured by PortableGit.
|
||||
# GitLab's runner picks up this Git in its cleanup stage and runs `git
|
||||
# credential reject`, which hangs in GCM and makes the job time out.
|
||||
& "C:\Program Files\Git\bin\git.exe" config unset --all --system credential.helper
|
||||
if ($LASTEXITCODE -ne 0 -and $LASTEXITCODE -ne 5) {
|
||||
throw "Failed to unset credential.helper with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,31 +4,23 @@ foreach script : [
|
|||
'git-completion.zsh',
|
||||
'git-prompt.sh'
|
||||
]
|
||||
if meson.version().version_compare('>=1.3.0')
|
||||
test_dependencies += fs.copyfile(script)
|
||||
else
|
||||
configure_file(
|
||||
input: script,
|
||||
output: script,
|
||||
copy: true,
|
||||
)
|
||||
endif
|
||||
# Note that we intentionally don't use `fs.copyfile()` here because we'd have
|
||||
# to add it to our test dependencies in that case, but that creates a
|
||||
# chicken-and-egg situation between including "t/" or "contrib/" first.
|
||||
configure_file(
|
||||
input: script,
|
||||
output: script,
|
||||
copy: true,
|
||||
)
|
||||
endforeach
|
||||
|
||||
# We have to discern between the test dependency and the installed file. Our
|
||||
# tests assume the completion scripts to have the same name as the in-tree
|
||||
# files, but the installed filenames need to match the executable's basename.
|
||||
if meson.version().version_compare('>=1.3.0')
|
||||
fs.copyfile('git-completion.bash', 'git',
|
||||
install: true,
|
||||
install_dir: get_option('datadir') / 'bash-completion/completions',
|
||||
)
|
||||
else
|
||||
configure_file(
|
||||
input: 'git-completion.bash',
|
||||
output: 'git',
|
||||
copy: true,
|
||||
install: true,
|
||||
install_dir: get_option('datadir') / 'bash-completion/completions',
|
||||
)
|
||||
endif
|
||||
configure_file(
|
||||
input: 'git-completion.bash',
|
||||
output: 'git',
|
||||
copy: true,
|
||||
install: true,
|
||||
install_dir: get_option('datadir') / 'bash-completion/completions',
|
||||
)
|
||||
|
|
|
|||
16
meson.build
16
meson.build
|
|
@ -1925,19 +1925,23 @@ bin_wrappers += executable('scalar',
|
|||
|
||||
if curl.found()
|
||||
libgit_curl = declare_dependency(
|
||||
sources: [
|
||||
'http.c',
|
||||
'http-walker.c',
|
||||
],
|
||||
link_with: static_library('git-curl',
|
||||
sources: [
|
||||
'http.c',
|
||||
'http-walker.c',
|
||||
],
|
||||
dependencies: [libgit_commonmain, curl],
|
||||
),
|
||||
dependencies: [libgit_commonmain, curl],
|
||||
)
|
||||
|
||||
test_dependencies += executable('git-remote-http',
|
||||
git_remote_http = executable('git-remote-http',
|
||||
sources: 'remote-curl.c',
|
||||
dependencies: [libgit_curl],
|
||||
install: true,
|
||||
install_dir: git_exec_path,
|
||||
)
|
||||
test_dependencies += git_remote_http
|
||||
|
||||
test_dependencies += executable('git-http-fetch',
|
||||
sources: 'http-fetch.c',
|
||||
|
|
@ -1957,7 +1961,7 @@ if curl.found()
|
|||
|
||||
foreach alias : [ 'git-remote-https', 'git-remote-ftp', 'git-remote-ftps' ]
|
||||
test_dependencies += executable(alias,
|
||||
sources: 'remote-curl.c',
|
||||
objects: git_remote_http.extract_all_objects(recursive: false),
|
||||
dependencies: [libgit_curl],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
[wrap-file]
|
||||
directory = curl-8.10.1
|
||||
source_url = https://github.com/curl/curl/releases/download/curl-8_10_1/curl-8.10.1.tar.xz
|
||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/curl_8.10.1-1/curl-8.10.1.tar.xz
|
||||
source_filename = curl-8.10.1.tar.xz
|
||||
source_hash = 73a4b0e99596a09fa5924a4fb7e4b995a85fda0d18a2c02ab9cf134bebce04ee
|
||||
patch_filename = curl_8.10.1-1_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/curl_8.10.1-1/get_patch
|
||||
patch_hash = 707c28f35fc9b0e8d68c0c2800712007612f922a31da9637ce706a2159f3ddd8
|
||||
wrapdb_version = 8.10.1-1
|
||||
directory = curl-8.12.1
|
||||
source_url = https://github.com/curl/curl/releases/download/curl-8_12_1/curl-8.12.1.tar.xz
|
||||
source_fallback_url = https://wrapdb.mesonbuild.com/v2/curl_8.12.1-2/get_source/curl-8.12.1.tar.xz
|
||||
source_filename = curl-8.12.1.tar.xz
|
||||
source_hash = 0341f1ed97a26c811abaebd37d62b833956792b7607ea3f15d001613c76de202
|
||||
patch_filename = curl_8.12.1-2_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/curl_8.12.1-2/get_patch
|
||||
patch_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/curl_8.12.1-2/curl_8.12.1-2_patch.zip
|
||||
patch_hash = bfd8886cc76ccfab52b1b0472e6c682cdf5374a4c30be2427326f2f495de4eba
|
||||
wrapdb_version = 8.12.1-2
|
||||
|
||||
[provide]
|
||||
dependency_names = libcurl
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
[wrap-file]
|
||||
directory = expat-2.7.1
|
||||
source_url = https://github.com/libexpat/libexpat/releases/download/R_2_7_1/expat-2.7.1.tar.xz
|
||||
source_filename = expat-2.7.1.tar.bz2
|
||||
source_hash = 354552544b8f99012e5062f7d570ec77f14b412a3ff5c7d8d0dae62c0d217c30
|
||||
patch_filename = expat_2.7.1-1_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.7.1-1/get_patch
|
||||
patch_hash = fe28cbbc427a7c9787d08b969ad54d19f59d8dd18294b4a18651cecfc789d4ef
|
||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.7.1-1/expat-2.7.1.tar.bz2
|
||||
wrapdb_version = 2.7.1-1
|
||||
directory = expat-2.8.4
|
||||
source_url = https://github.com/libexpat/libexpat/releases/download/R_2_8_4/expat-2.8.4.tar.xz
|
||||
source_filename = expat-2.8.4.tar.xz
|
||||
source_hash = 656ae1cc8da3b4ea513bb4e254f33e6243938084c0ec6239da873376b09985a7
|
||||
source_fallback_url = https://wrapdb.mesonbuild.com/v2/expat_2.8.4-1/get_source/expat-2.8.4.tar.xz
|
||||
patch_filename = expat_2.8.4-1_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.8.4-1/get_patch
|
||||
patch_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.8.4-1/expat_2.8.4-1_patch.zip
|
||||
patch_hash = 221c537a6cfd8d55ea2d41600ee7f32d8c0659cf6e41511e9e7a2f294b21cb92
|
||||
wrapdb_version = 2.8.4-1
|
||||
|
||||
[provide]
|
||||
expat = expat_dep
|
||||
dependency_names = expat
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
[wrap-file]
|
||||
directory = openssl-3.0.8
|
||||
source_url = https://www.openssl.org/source/openssl-3.0.8.tar.gz
|
||||
source_filename = openssl-3.0.8.tar.gz
|
||||
source_hash = 6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e
|
||||
patch_filename = openssl_3.0.8-3_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/openssl_3.0.8-3/get_patch
|
||||
patch_hash = 300da189e106942347d61a4a4295aa2edbcf06184f8d13b4cee0bed9fb936963
|
||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/openssl_3.0.8-3/openssl-3.0.8.tar.gz
|
||||
wrapdb_version = 3.0.8-3
|
||||
directory = openssl-3.0.10
|
||||
source_url = https://www.openssl.org/source/openssl-3.0.10.tar.gz
|
||||
source_filename = openssl-3.0.10.tar.gz
|
||||
source_hash = 1761d4f5b13a1028b9b6f3d4b8e17feb0cedc9370f6afe61d7193d2cdce83323
|
||||
source_fallback_url = https://wrapdb.mesonbuild.com/v2/openssl_3.0.10-1/get_source/openssl-3.0.10.tar.gz
|
||||
patch_filename = openssl_3.0.10-1_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/openssl_3.0.10-1/get_patch
|
||||
patch_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/openssl_3.0.10-1/openssl_3.0.10-1_patch.zip
|
||||
patch_hash = 2d142b7e3b1ac092cf67cb4891594c4a2d044aa92624c617a8dcbfe4f056d907
|
||||
wrapdb_version = 3.0.10-1
|
||||
|
||||
[provide]
|
||||
libcrypto = libcrypto_dep
|
||||
libssl = libssl_dep
|
||||
openssl = openssl_dep
|
||||
dependency_names = libcrypto, libssl, openssl
|
||||
|
|
|
|||
|
|
@ -1,16 +1,14 @@
|
|||
[wrap-file]
|
||||
directory = pcre2-10.45
|
||||
source_url = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.45/pcre2-10.45.tar.bz2
|
||||
source_filename = pcre2-10.45.tar.bz2
|
||||
source_hash = 21547f3516120c75597e5b30a992e27a592a31950b5140e7b8bfde3f192033c4
|
||||
patch_filename = pcre2_10.45-2_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.45-2/get_patch
|
||||
patch_hash = 7c6f34b703708652a404f9dc2769c67658c437b6043573295fa3428a9b7a6807
|
||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pcre2_10.45-2/pcre2-10.45.tar.bz2
|
||||
wrapdb_version = 10.45-2
|
||||
directory = pcre2-10.48
|
||||
source_url = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.48/pcre2-10.48.tar.bz2
|
||||
source_filename = pcre2-10.48.tar.bz2
|
||||
source_hash = b6c68fdf6f3ac31388b50aa89ff0fc49c00c987c16e7b5146491d12003f2c8ed
|
||||
source_fallback_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.48-1/get_source/pcre2-10.48.tar.bz2
|
||||
patch_filename = pcre2_10.48-1_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.48-1/get_patch
|
||||
patch_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pcre2_10.48-1/pcre2_10.48-1_patch.zip
|
||||
patch_hash = fbcc964804a921b02ea78fc0ff1558d5999b224db8361087828e30012023525c
|
||||
wrapdb_version = 10.48-1
|
||||
|
||||
[provide]
|
||||
libpcre2-8 = libpcre2_8
|
||||
libpcre2-16 = libpcre2_16
|
||||
libpcre2-32 = libpcre2_32
|
||||
libpcre2-posix = libpcre2_posix
|
||||
dependency_names = libpcre2-8, libpcre2-16, libpcre2-32, libpcre2-posix
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
[wrap-file]
|
||||
directory = zlib-1.3.1
|
||||
source_url = http://zlib.net/fossils/zlib-1.3.1.tar.gz
|
||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/zlib_1.3.1-1/zlib-1.3.1.tar.gz
|
||||
source_filename = zlib-1.3.1.tar.gz
|
||||
source_hash = 9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23
|
||||
patch_filename = zlib_1.3.1-1_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.3.1-1/get_patch
|
||||
patch_hash = e79b98eb24a75392009cec6f99ca5cdca9881ff20bfa174e8b8926d5c7a47095
|
||||
wrapdb_version = 1.3.1-1
|
||||
directory = zlib-1.3.2
|
||||
source_url = https://zlib.net/zlib-1.3.2.tar.xz
|
||||
source_fallback_url = https://wrapdb.mesonbuild.com/v2/zlib_1.3.2-1/get_source/zlib-1.3.2.tar.xz
|
||||
source_filename = zlib-1.3.2.tar.xz
|
||||
source_hash = d7a0654783a4da529d1bb793b7ad9c3318020af77667bcae35f95d0e42a792f3
|
||||
patch_filename = zlib_1.3.2-1_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.3.2-1/get_patch
|
||||
patch_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/zlib_1.3.2-1/zlib_1.3.2-1_patch.zip
|
||||
patch_hash = 5ae7a2e92f823df118cfb8c1b23d94e3117864392b3446581d669049b2fba6dd
|
||||
wrapdb_version = 1.3.2-1
|
||||
|
||||
[provide]
|
||||
zlib = zlib_dep
|
||||
dependency_names = zlib
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ test_tool_sources = [
|
|||
|
||||
test_tool = executable('test-tool',
|
||||
sources: test_tool_sources,
|
||||
c_pch: '../../tools/precompiled.h',
|
||||
dependencies: [libgit_commonmain],
|
||||
)
|
||||
bin_wrappers += test_tool
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ clar_test_suites = [
|
|||
]
|
||||
|
||||
clar_sources = [
|
||||
'unit-tests/clar/clar.c',
|
||||
'unit-tests/unit-test.c',
|
||||
'unit-tests/lib-oid.c',
|
||||
'unit-tests/lib-reftable.c'
|
||||
|
|
@ -49,7 +48,7 @@ clar_decls_h = custom_target(
|
|||
)
|
||||
clar_sources += clar_decls_h
|
||||
|
||||
clar_sources += custom_target(
|
||||
clar_suite_h = custom_target(
|
||||
input: clar_decls_h,
|
||||
output: 'clar.suite',
|
||||
command : [
|
||||
|
|
@ -66,6 +65,13 @@ clar_unit_tests = executable('unit-tests',
|
|||
c_args: [
|
||||
'-DGIT_CLAR_DECLS_H="' + clar_decls_h.full_path() + '"',
|
||||
],
|
||||
c_pch: '../tools/precompiled.h',
|
||||
link_with: static_library('clar',
|
||||
sources: [
|
||||
'unit-tests/clar/clar.c',
|
||||
clar_suite_h,
|
||||
],
|
||||
),
|
||||
dependencies: [libgit_commonmain],
|
||||
)
|
||||
test('unit-tests', clar_unit_tests, kwargs: test_kwargs)
|
||||
|
|
|
|||
Loading…
Reference in New Issue