Optimizing MSYS2 CI (#1435)

* feat(ci): install dependencies on setup
* fix(ci): don't update msys2 when setup
* fix(ci): download subprojects before patching
* doc(ci): document why meson subprojects download is called
This commit is contained in:
Takase
2023-08-19 12:41:56 +08:00
committed by takase1121
parent a0c8f01312
commit 84aeea61c2
2 changed files with 24 additions and 9 deletions
+10 -5
View File
@@ -124,6 +124,16 @@ main() {
rm -rf "${build_dir}"
if [[ $patch_lua == "true" ]] && [[ ! -z $force_fallback ]]; then
# download the subprojects so we can start patching before configure.
# this will prevent reconfiguring the project.
meson subprojects download
lua_subproject_path=$(echo subprojects/lua-*/)
if [[ -d $lua_subproject_path ]]; then
patch -d $lua_subproject_path -p1 --forward < resources/windows/001-lua-unicode.diff
fi
fi
CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS meson setup \
--buildtype=$build_type \
--prefix "$prefix" \
@@ -134,11 +144,6 @@ main() {
$pgo \
"${build_dir}"
lua_subproject_path=$(echo subprojects/lua-*/)
if [[ $patch_lua == "true" ]] && [[ ! -z $force_fallback ]] && [[ -d $lua_subproject_path ]]; then
patch -d $lua_subproject_path -p1 --forward < resources/windows/001-lua-unicode.diff
fi
meson compile -C "${build_dir}"
if [[ $pgo != "" ]]; then