-
-
Notifications
You must be signed in to change notification settings - Fork 3
147 lines (147 loc) · 4.49 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
143
144
145
146
147
{
"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-20.04",
"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",
"CMAKE_GENERATOR" : "Ninja"
},
"steps" : [
{
"name" : "Checkout repository",
"uses" : "actions/checkout@v3",
"with" : {
"submodules" : "recursive"
}
},
{
"name" : "Set up Homebrew environment for Github Actions",
"run" : "echo \"/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin\" >> $GITHUB_PATH"
},
{
"name" : "Set up default build tools",
"run" : "brew install make nasm cmake meson ninja"
},
{
"name" : "Set up mingw-w64 for GCC",
"if" : "matrix.platform.compiler == 'gcc'",
"run" : "brew install mingw-w64"
},
{
"name" : "Set up mingw-w64 for Clang",
"if" : "matrix.platform.compiler == 'clang'",
"run" : "curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20220323/llvm-mingw-20220323-msvcrt-ubuntu-18.04-x86_64.tar.xz\ntar xvf llvm-mingw-20220323-msvcrt-ubuntu-18.04-x86_64.tar.xz\nmv llvm-mingw-20220323-msvcrt-ubuntu-18.04-x86_64 /opt/llvm-mingw\nexport PATH=\"/opt/llvm-mingw/bin:$PATH\"\necho \"/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@v4",
"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-20.04",
"timeout-minutes" : 5,
"if" : "startsWith(github.ref, 'refs/tags/v')",
"steps" : [
{
"name" : "Download all artifacts",
"uses" : "actions/download-artifact@v4"
},
{
"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"
}
}
]
}
}
}