forked from krkrz/krkrz
-
-
Notifications
You must be signed in to change notification settings - Fork 2
142 lines (142 loc) · 3.9 KB
/
ci.yml
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
{
"name" : "Continuous Integration",
"on" : {
"push" : {
"paths" : [
"**.c",
"**.h",
"**.cpp",
"**.hpp",
"**.build",
"**.in",
"**.yml",
"Makefile"
]
},
"pull_request" : {
"paths" : [
"**.c",
"**.h",
"**.cpp",
"**.hpp",
"**.build",
"**.in",
"**.yml",
"Makefile"
]
}
},
"jobs" : {
"build-win32" : {
"runs-on" : "ubuntu-latest",
"container" : {
"image" : "ghcr.io/uyjulian/tvp_win32_build_container:latest",
"options" : "--user 1001:123"
},
"defaults" : {
"run" : {
"shell" : "bash"
}
},
"strategy" : {
"matrix" : {
"platform" : [
{
"triplet" : "i686-w64-mingw32",
"cmake-system-compiler" : "i686",
"target-arch" : "intel32",
"compiler" : "gcc"
},
{
"triplet" : "x86_64-w64-mingw32",
"cmake-system-compiler" : "amd64",
"target-arch" : "intel64",
"compiler" : "gcc"
},
{
"triplet" : "i686-w64-mingw32",
"cmake-system-compiler" : "i686",
"target-arch" : "intel32",
"compiler" : "clang"
},
{
"triplet" : "x86_64-w64-mingw32",
"cmake-system-compiler" : "amd64",
"target-arch" : "intel64",
"compiler" : "clang"
},
{
"triplet" : "armv7-w64-mingw32",
"cmake-system-compiler" : "arm",
"target-arch" : "arm32",
"compiler" : "clang"
},
{
"triplet" : "aarch64-w64-mingw32",
"cmake-system-compiler" : "arm64",
"target-arch" : "arm64",
"compiler" : "clang"
}
]
}
},
"timeout-minutes" : 30,
"env" : {
"HOMEBREW_NO_ANALYTICS" : "1",
"HOMEBREW_NO_AUTO_UPDATE" : "1",
"HOMEBREW_NO_INSTALL_UPGRADE" : "1",
"HOMEBREW_NO_INSTALL_CLEANUP" : "1"
},
"steps" : [
{
"name" : "Checkout repository",
"uses" : "actions/checkout@v2",
"with" : {
"submodules" : "recursive"
}
},
{
"name" : "Set up mingw-w64 for Clang",
"if" : "matrix.platform.compiler == 'clang'",
"run" : "echo \"/opt/llvm-mingw/bin\" >> $GITHUB_PATH"
},
{
"name" : "Compile project",
"run" : "make TARGET_ARCH=${{ matrix.platform.target-arch }} ARCHIVE=\\$\\(PROJECT_BASENAME\\).${{ matrix.platform.target-arch }}.${{ matrix.platform.compiler }}.7z archive -j$(getconf _NPROCESSORS_ONLN)"
},
{
"name" : "Upload artifact",
"uses" : "actions/upload-artifact@master",
"with" : {
"name" : "binary-win32-${{ matrix.platform.target-arch }}-${{ matrix.platform.compiler }}",
"path" : "**/**.${{ matrix.platform.target-arch }}.${{ matrix.platform.compiler }}.7z"
}
}
]
},
"create-release" : {
"needs" : [
"build-win32"
],
"runs-on" : "ubuntu-latest",
"timeout-minutes" : 5,
"if" : "startsWith(github.ref, 'refs/tags/v')",
"steps" : [
{
"name" : "Download all artifacts",
"uses" : "actions/download-artifact@v3"
},
{
"name" : "Create release",
"if" : "startsWith(github.ref, 'refs/tags/v')",
"uses" : "marvinpinto/action-automatic-releases@latest",
"with" : {
"repo_token" : "${{ secrets.GITHUB_TOKEN }}",
"prerelease" : "${{ contains(github.ref, '-rc') }}",
"files" : "**/**.7z"
}
}
]
}
}
}