Alpine appears to not be ignoring the request to build without fontconfig (#1416)
* Fix the checks for dependencies #1341 * lines * gnArgs wasn't being added to the build * echo * asdfdf * asdf * Try >- * Nope * Test * sadfas * asdf * got it i think
This commit is contained in:
Родитель
1530f48e8f
Коммит
00a535e743
|
@ -17,7 +17,7 @@ var BUILD_ARCH = Argument("arch", Argument("buildarch", EnvironmentVariable("BUI
|
|||
.ToLower().Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
var BUILD_VARIANT = Argument("variant", EnvironmentVariable("BUILD_VARIANT"));
|
||||
var ADDITIONAL_GN_ARGS = Argument("gnArgs", EnvironmentVariable("ADDITIONAL_GN_ARGS"));
|
||||
var ADDITIONAL_GN_ARGS = Argument("gnArgs", Argument("gnargs", EnvironmentVariable("ADDITIONAL_GN_ARGS")));
|
||||
|
||||
DirectoryPath PROFILE_PATH = EnvironmentVariable("USERPROFILE") ?? EnvironmentVariable("HOME");
|
||||
|
||||
|
@ -58,7 +58,8 @@ void RunProcess(FilePath process, string args, out IEnumerable<string> stdout)
|
|||
RedirectStandardOutput = true,
|
||||
Arguments = args,
|
||||
};
|
||||
var result = StartProcess(process, settings, out stdout);
|
||||
var result = StartProcess(process, settings, out var stdoutActual);
|
||||
stdout = stdoutActual.ToArray();
|
||||
if (result != 0) {
|
||||
throw new Exception($"Process '{process}' failed with error: {result}");
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ bool SUPPORT_GPU = SUPPORT_GPU_VAR == "1" || SUPPORT_GPU_VAR == "true";
|
|||
string SUPPORT_VULKAN_VAR = Argument("supportVulkan", EnvironmentVariable("SUPPORT_VULKAN") ?? "true");
|
||||
bool SUPPORT_VULKAN = SUPPORT_VULKAN_VAR == "1" || SUPPORT_VULKAN_VAR.ToLower() == "true";
|
||||
|
||||
var VERIFY_EXCLUDED = Argument("verifyExcluded", "")
|
||||
var VERIFY_EXCLUDED = Argument("verifyExcluded", Argument("verifyexcluded", ""))
|
||||
.ToLower().Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
string CC = Argument("cc", EnvironmentVariable("CC"));
|
||||
|
@ -29,6 +29,26 @@ if (!string.IsNullOrEmpty(CXX))
|
|||
if (!string.IsNullOrEmpty(AR))
|
||||
COMPILERS += $"ar='{AR}' ";
|
||||
|
||||
void CheckDeps(FilePath so)
|
||||
{
|
||||
if (VERIFY_EXCLUDED == null || VERIFY_EXCLUDED.Length == 0)
|
||||
return;
|
||||
|
||||
Information($"Making sure that there are no dependencies on: {string.Join(", ", VERIFY_EXCLUDED)}");
|
||||
|
||||
RunProcess("readelf", $"-d {so}", out var stdout);
|
||||
Information(String.Join(Environment.NewLine + " ", stdout));
|
||||
|
||||
var needed = stdout
|
||||
.Where(l => l.Contains("(NEEDED)"))
|
||||
.ToList();
|
||||
|
||||
foreach (var exclude in VERIFY_EXCLUDED) {
|
||||
if (needed.Any(o => o.Contains(exclude.Trim(), StringComparison.OrdinalIgnoreCase)))
|
||||
throw new Exception($"{so} contained a dependency on {exclude}.");
|
||||
}
|
||||
}
|
||||
|
||||
Task("libSkiaSharp")
|
||||
.IsDependentOn("git-sync-deps")
|
||||
.WithCriteria(IsRunningOnLinux())
|
||||
|
@ -69,12 +89,7 @@ Task("libSkiaSharp")
|
|||
CopyFileToDirectory(so, outDir);
|
||||
CopyFile(so, outDir.CombineWithFilePath("libSkiaSharp.so"));
|
||||
|
||||
foreach (var exclude in VERIFY_EXCLUDED) {
|
||||
RunProcess("readelf", $"-d {so}", out var stdout);
|
||||
|
||||
if (stdout.Any(o => o.Contains($"[{exclude}.")))
|
||||
throw new Exception($"libSkiaSharp.so contained a dependency on {exclude}.");
|
||||
}
|
||||
CheckDeps(so);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -107,12 +122,7 @@ Task("libHarfBuzzSharp")
|
|||
CopyFileToDirectory(so, outDir);
|
||||
CopyFile(so, outDir.CombineWithFilePath("libHarfBuzzSharp.so"));
|
||||
|
||||
foreach (var exclude in VERIFY_EXCLUDED) {
|
||||
RunProcess("readelf", $"-d {so}", out var stdout);
|
||||
|
||||
if (stdout.Any(o => o.Contains($"[{exclude}.")))
|
||||
throw new Exception($"libHarfBuzzSharp.so contained a dependency on {exclude}.");
|
||||
}
|
||||
CheckDeps(so);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -24,4 +24,4 @@ jobs:
|
|||
docker: ${{ item.docker }}
|
||||
dockerArgs: ${{ item.dockerArgs }}
|
||||
target: ${{ coalesce(item.target, 'externals-linux') }}
|
||||
additionalArgs: --buildarch=${{ item.arch }} --variant=${{ coalesce(item.variant, 'linux') }}${{ build.name }} ${{ build.additionalArgs }} ${{ item.additionalArgs }}
|
||||
additionalArgs: --buildarch=${{ item.arch }} --variant=${{ coalesce(item.variant, 'linux') }}${{ build.name }} --gnArgs="\"${{ build.gnArgs }} ${{ item.gnArgs }}\"" ${{ build.additionalArgs }} ${{ item.additionalArgs }}
|
||||
|
|
Загрузка…
Ссылка в новой задаче