Skip to content

Commit b7315f9

Browse files
authored
Use almalinux:8 instead of centos:7 docker image for release builds (#108)
* Update the binary-compatible-builds action from Wasmtime * Use `almalinux:8` as base image for x86_64-linux CI docker image The `centos:7` image hit end of life, so we need something new. Similar to bytecodealliance/wasmtime#8892 in Wasmtime. * Allos `cfg(fuzzing)` * Remove dead code ever since module-linking support was removed * set global npm config with sudo in ci
1 parent 8901fa1 commit b7315f9

File tree

6 files changed

+15
-27
lines changed

6 files changed

+15
-27
lines changed

.github/actions/binary-compatible-builds/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: 'Set up a CentOS 6 container to build releases in'
22
description: 'Set up a CentOS 6 container to build releases in'
33

44
runs:
5-
using: node12
5+
using: node20
66
main: 'main.js'
77
inputs:
88
name:

.github/actions/binary-compatible-builds/main.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ if (process.platform == 'win32') {
2121
return;
2222
}
2323

24+
// Android doesn't use a container as it's controlled by the installation of the
25+
// SDK/NDK.
26+
if (process.env.INPUT_NAME && process.env.INPUT_NAME.indexOf("android") >= 0) {
27+
return;
28+
}
29+
2430
// ... and on Linux we do fancy things with containers. We'll spawn an old
2531
// CentOS container in the background with a super old glibc, and then we'll run
2632
// commands in there with the `$CENTOS` env var.
@@ -34,7 +40,7 @@ if (process.env.CENTOS !== undefined) {
3440
return;
3541
}
3642

37-
const name = process.env.INPUT_NAME;
43+
const name = process.env.INPUT_NAME.replace(/-min$/, '');
3844

3945
child_process.execFileSync('docker', [
4046
'build',

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
working-directory: ./npm/wizer
127127
run: npm install && npm version "${{ steps.tagname.outputs.val }}" --allow-same-version
128128
- name: Setup npm auth
129-
run: npm config --global set '//registry.npmjs.org/:_authToken'='$NODE_AUTH_TOKEN'
129+
run: sudo npm config --global set '//registry.npmjs.org/:_authToken'='$NODE_AUTH_TOKEN'
130130
- name: Publish npm packages
131131
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
132132
working-directory: ./npm

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,6 @@ members = [
6666

6767
[profile.bench]
6868
debug = true
69+
70+
[lints.rust]
71+
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(fuzzing)'] }

ci/docker/x86_64-linux/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
FROM centos:7
1+
FROM almalinux:8
22

3-
RUN yum install -y git gcc
3+
RUN dnf install -y git gcc make
44

5-
ENV PATH=$PATH:/rust/bin
5+
ENV PATH=$PATH:/rust/bin

src/snapshot.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ pub struct Snapshot {
1919

2020
/// Segments of non-zero memory.
2121
pub data_segments: Vec<DataSegment>,
22-
23-
/// Snapshots for each nested instantiation.
24-
pub instantiations: Vec<Snapshot>,
2522
}
2623

2724
/// A data segment initializer for a memory.
@@ -83,13 +80,11 @@ pub fn snapshot(ctx: &mut impl AsContextMut, instance: &wasmtime::Instance) -> S
8380

8481
let globals = snapshot_globals(&mut *ctx, instance);
8582
let (memory_mins, data_segments) = snapshot_memories(&mut *ctx, instance);
86-
let instantiations = snapshot_instantiations(&mut *ctx, instance);
8783

8884
Snapshot {
8985
globals,
9086
memory_mins,
9187
data_segments,
92-
instantiations,
9388
}
9489
}
9590

@@ -273,19 +268,3 @@ fn remove_excess_segments(merged_data_segments: &mut Vec<DataSegment>) {
273268
// deterministic.
274269
merged_data_segments.sort_by_key(|s| (s.memory_index, s.offset));
275270
}
276-
277-
fn snapshot_instantiations(
278-
ctx: &mut impl AsContextMut,
279-
instance: &wasmtime::Instance,
280-
) -> Vec<Snapshot> {
281-
log::debug!("Snapshotting nested instantiations");
282-
let instantiations = vec![];
283-
loop {
284-
let name = format!("__wizer_instance_{}", instantiations.len());
285-
match instance.get_export(&mut *ctx, &name) {
286-
None => break,
287-
Some(_) => unreachable!(),
288-
}
289-
}
290-
instantiations
291-
}

0 commit comments

Comments
 (0)