Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/ci/build-build-matrix.js
3059 views
1
// Small script used to calculate the matrix of builds that are going to be
2
// done if CI decides to do a release build.
3
//
4
// This is a separate script primarily to write out all the release
5
// targets/platforms once and then duplicate them all with a "min" build.
6
7
const ubuntu = 'ubuntu-24.04';
8
const windows = 'windows-2025';
9
const macos = 'macos-15';
10
11
const array = [
12
{
13
// The name of the build which shows up in the name of the artifact for
14
// Wasmtime's github releases.
15
"build": "x86_64-linux",
16
// The GitHub Actions platform that this build runs on
17
"os": ubuntu,
18
// The Rust target that will be used for the build.
19
"target": "x86_64-unknown-linux-gnu",
20
"env": { "DOCKER_IMAGE": "./ci/docker/x86_64-linux/Dockerfile" },
21
},
22
{
23
"build": "aarch64-linux",
24
"os": ubuntu,
25
"target": "aarch64-unknown-linux-gnu",
26
"env": { "DOCKER_IMAGE": "./ci/docker/aarch64-linux/Dockerfile" },
27
},
28
{
29
"build": "s390x-linux",
30
"os": ubuntu,
31
"target": "s390x-unknown-linux-gnu",
32
"env": { "DOCKER_IMAGE": "./ci/docker/s390x-linux/Dockerfile" },
33
},
34
{
35
"build": "riscv64gc-linux",
36
"os": ubuntu,
37
"target": "riscv64gc-unknown-linux-gnu",
38
"env": { "DOCKER_IMAGE": "./ci/docker/riscv64gc-linux/Dockerfile" },
39
},
40
{
41
"build": "x86_64-macos",
42
"os": macos,
43
"target": "x86_64-apple-darwin",
44
// On OSX all we need to do is configure our deployment target as old as
45
// possible. For now 10.12 is the limit.
46
"env": { "MACOSX_DEPLOYMENT_TARGET": "10.12" },
47
// Similar to https://github.com/bytecodealliance/wasmtime/pull/12245, we
48
// need to avoid a rustc bug that results in linker errors depending on the
49
// order and division of code into CGUs. This is fixed on beta but not
50
// stable yet. Once Rust 1.94 is released this configuration option can be
51
// deleted to use stable by default.
52
"rust": "beta-2026-01-20",
53
},
54
{
55
"build": "aarch64-macos",
56
"os": macos,
57
"target": "aarch64-apple-darwin",
58
"env": { "MACOSX_DEPLOYMENT_TARGET": "10.12" },
59
},
60
{
61
"build": "x86_64-windows",
62
"os": windows,
63
"target": "x86_64-pc-windows-msvc",
64
// On Windows we build against the static CRT to reduce dll dependencies
65
"env": { "RUSTFLAGS": "-Ctarget-feature=+crt-static" },
66
},
67
{
68
"build": "x86_64-mingw",
69
"os": windows,
70
"target": "x86_64-pc-windows-gnu",
71
"env": { "RUSTFLAGS": "-Ctarget-feature=+crt-static" },
72
},
73
{
74
"build": "aarch64-android",
75
"os": ubuntu,
76
"target": "aarch64-linux-android",
77
// See https://developer.android.com/guide/practices/page-sizes
78
// for some more commentary, but apparently Google recommends passing this
79
// linker flag.
80
"env": { "RUSTFLAGS": "-Clink-arg=-z -Clink-arg=max-page-size=16384" },
81
},
82
{
83
"build": "x86_64-android",
84
"os": ubuntu,
85
"target": "x86_64-linux-android",
86
},
87
{
88
"build": "x86_64-musl",
89
"os": ubuntu,
90
"target": "x86_64-unknown-linux-musl",
91
"env": { "DOCKER_IMAGE": "./ci/docker/x86_64-musl/Dockerfile" },
92
},
93
{
94
"build": "aarch64-musl",
95
"os": ubuntu,
96
"target": "aarch64-unknown-linux-musl",
97
"env": { "DOCKER_IMAGE": "./ci/docker/aarch64-musl/Dockerfile" },
98
},
99
{
100
"build": "aarch64-windows",
101
"os": windows,
102
"target": "aarch64-pc-windows-msvc",
103
"env": { "RUSTFLAGS": "-Ctarget-feature=+crt-static" },
104
},
105
{
106
"build": "i686-linux",
107
"os": ubuntu,
108
"target": "i686-unknown-linux-gnu",
109
"env": { "DOCKER_IMAGE": "./ci/docker/i686-linux/Dockerfile" },
110
},
111
{
112
"build": "armv7-linux",
113
"os": ubuntu,
114
"target": "armv7-unknown-linux-gnueabihf",
115
"env": { "DOCKER_IMAGE": "./ci/docker/armv7-linux/Dockerfile" },
116
},
117
{
118
"build": "i686-windows",
119
"os": windows,
120
"target": "i686-pc-windows-msvc",
121
"env": { "RUSTFLAGS": "-Ctarget-feature=+crt-static" },
122
},
123
];
124
125
const builds = [];
126
for (let build of array) {
127
// Perform a "deep clone" roundtripping through JSON for a copy of the build
128
// that's normal
129
if (!build.rust)
130
build.rust = 'default';
131
builds.push(JSON.parse(JSON.stringify(build)));
132
133
// Next generate a "min" build and add it to the builds list. Min builds
134
// require Nightly rust due to some nightly build options that are configured.
135
build.build += '-min';
136
build.rust = 'wasmtime-ci-pinned-nightly';
137
builds.push(build);
138
}
139
140
console.log(JSON.stringify(builds));
141
142