forked from bytecodealliance/wasmtime
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-build-matrix.js
88 lines (84 loc) · 2.25 KB
/
build-build-matrix.js
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
// Small script used to calculate the matrix of builds that are going to be
// done if CI decides to do a release build.
//
// This is a separate script primarily to write out all the release
// targets/platforms once and then duplicate them all with a "min" build.
const array = [
{
// The name of the build which shows up in the name of the artifact for
// Wasmtime's github releases.
"build": "x86_64-linux",
// The GitHub Actions platform that this build runs on
"os": "ubuntu-latest",
// The Rust target that will be used for the build.
"target": "x86_64-unknown-linux-gnu",
},
{
"build": "aarch64-linux",
"os": "ubuntu-latest",
"target": "aarch64-unknown-linux-gnu",
},
{
"build": "s390x-linux",
"os": "ubuntu-latest",
"target": "s390x-unknown-linux-gnu",
},
{
"build": "riscv64gc-linux",
"os": "ubuntu-latest",
"target": "riscv64gc-unknown-linux-gnu",
},
{
"build": "x86_64-macos",
"os": "macos-latest",
"target": "x86_64-apple-darwin",
},
{
"build": "aarch64-macos",
"os": "macos-latest",
"target": "aarch64-apple-darwin",
},
{
"build": "x86_64-windows",
"os": "windows-latest",
"target": "x86_64-pc-windows-msvc",
},
{
"build": "x86_64-mingw",
"os": "windows-latest",
"target": "x86_64-pc-windows-gnu",
},
{
"build": "aarch64-android",
"os": "ubuntu-latest",
"target": "aarch64-linux-android",
},
{
"build": "x86_64-android",
"os": "ubuntu-latest",
"target": "x86_64-linux-android",
},
{
"build": "x86_64-musl",
"os": "ubuntu-latest",
"target": "x86_64-unknown-linux-musl",
},
{
"build": "aarch64-windows",
"os": "windows-latest",
"target": "aarch64-pc-windows-msvc",
},
];
const builds = [];
for (let build of array) {
// Perform a "deep clone" roundtripping through JSON for a copy of the build
// that's normal
build.rust = 'default';
builds.push(JSON.parse(JSON.stringify(build)));
// Next generate a "min" build and add it to the builds list. Min builds
// require Nightly rust due to some nightly build options that are configured.
build.build += '-min';
build.rust = 'wasmtime-ci-pinned-nightly';
builds.push(build);
}
console.log(JSON.stringify(builds));