This repository has been archived by the owner on Oct 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 95
/
build.cake
executable file
·75 lines (62 loc) · 2.14 KB
/
build.cake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!mono .cake/Cake/Cake.exe
#tool "nuget:?package=NUnit.ConsoleRunner&version=3.6.1"
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");
#load "build/Utils.cake"
#load "build/Android.cake"
#load "build/Tests.cake"
#load "build/Packaging.cake"
Task("Clean")
.Does(() =>
{
CleanDirectory("./build/lib");
CleanDirectory("./build/obj");
CleanDirectories("./tests/common/c");
CleanDirectories("./tests/common/mk");
DeleteDirectories(GetDirectories("./tests/**/obj"), new DeleteDirectorySettings { Recursive = true });
DeleteDirectories(GetDirectories("./tests/**/bin"), new DeleteDirectorySettings { Recursive = true });
CleanDirectories(GetDirectories("./tests/android/**/build"));
});
Task("NuGet-Restore")
.Does(() =>
{
NuGetRestore("./Embeddinator-4000.sln");
});
Task("Build-Binder")
.IsDependentOn("Clean")
.IsDependentOn("Generate-Project-Files")
.IsDependentOn("NuGet-Restore")
.Does(() =>
{
MSBuild("./build/projects/Embeddinator-4000.csproj", MSBuildSettings());
});
Task("Generate-Project-Files")
.Does(() =>
{
var os = IsRunningOnWindows() ? "windows" : IsRunningOnMacOS() ? "macosx" : "linux";
Premake(File("./build/premake5.lua"), $"--outdir=.. --os={os}", "vs2015");
});
Task("Default")
.IsDependentOn("Build-Binder");
Task("Android-Tests")
.IsDependentOn("Generate-Android")
.IsDependentOn("Generate-Android-PCL")
.IsDependentOn("Generate-Android-NetStandard")
.IsDependentOn("Generate-Android-FSharp");
Task("Tests")
.IsDependentOn("Android-Tests")
.IsDependentOn("Build-CSharp-Tests")
.IsDependentOn("Run-C-Tests")
.IsDependentOn("Run-Java-Tests");
Task("Jenkins")
.IsDependentOn("Build-Binder")
.IsDependentOn("Android-Tests")
.IsDependentOn("Build-CSharp-Tests")
.IsDependentOn("Run-C-Tests")
.IsDependentOn("Build-Java-Tests");
Task("Travis")
.IsDependentOn("Build-Binder")
.IsDependentOn("Build-CSharp-Tests")
.IsDependentOn("Run-C-Tests")
.IsDependentOn("Run-Java-Tests");
RunTarget(target);