Skip to content

Commit 1599194

Browse files
authored
Prepare a Wasmtime 1.0.2 release (#5246)
* Merge pull request from GHSA-wh6w-3828-g9qf This is a minimal fix for the release branch to fix the issue of having a memory slot get reused between a module with an image and one without. * Merge pull request from GHSA-44mr-8vmm-wjhg This ensures that memories, even with zero contents, still have the necessary virtual mappings as required by the code generator to report out-of-bounds reads/writes. * Merge pull request from GHSA-h84q-m8rr-3v9q The Rust definition was previously performing a 4-byte write when the C API was declared as taking an 1-byte buffer. * CI fixes from CVE patches * Bump to 1.0.2 * Cherry-pick github actions fixes for 1.0.2 release Culmination of patches already landed in `main` and `release-2.0.0` * Release Wasmtime 1.0.2 [automatically-tag-and-release-this-commit] * Fix inst size test for Rust 1.65.0 * Use an alternate doxygen download link (#5150) * Use an alternate doxygen download link Looks like doxygen.nl is down otherwise. * Update link
1 parent c63087f commit 1599194

File tree

62 files changed

+969
-266
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+969
-266
lines changed

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

+1-1
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: node16
66
main: 'main.js'
77
inputs:
88
name:

.github/actions/github-release/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ inputs:
88
description: ''
99
required: true
1010
runs:
11-
using: 'node12'
11+
using: 'node16'
1212
main: 'main.js'

.github/actions/github-release/main.js

+25-17
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async function runOnce() {
2525
core.info(`name: ${name}`);
2626
core.info(`token: ${token}`);
2727

28-
const octokit = new github.GitHub(token);
28+
const octokit = github.getOctokit(token);
2929

3030
// For the `dev` release we may need to update the tag to point to the new
3131
// commit on this branch. All other names should already have tags associated
@@ -43,20 +43,10 @@ async function runOnce() {
4343

4444
if (tag === null || tag.data.object.sha !== sha) {
4545
core.info(`updating existing tag or creating new one`);
46-
// Delete the previous release for this tag, if any
47-
try {
48-
core.info(`fetching release for ${name}`);
49-
const release = await octokit.repos.getReleaseByTag({ owner, repo, tag: name });
50-
core.info(`deleting release ${release.data.id}`);
51-
await octokit.repos.deleteRelease({ owner, repo, release_id: release.data.id });
52-
} catch (e) {
53-
// ignore, there may not have been a release
54-
console.log("ERROR: ", JSON.stringify(e, null, 2));
55-
}
5646

5747
try {
5848
core.info(`updating dev tag`);
59-
await octokit.git.updateRef({
49+
await octokit.rest.git.updateRef({
6050
owner,
6151
repo,
6252
ref: 'tags/dev',
@@ -80,6 +70,13 @@ async function runOnce() {
8070
// tag by this point.
8171
}
8272
}
73+
74+
console.log("double-checking tag is correct");
75+
tag = await octokit.request("GET /repos/:owner/:repo/git/refs/tags/:name", { owner, repo, name });
76+
if (tag.data.object.sha !== sha) {
77+
console.log("tag: ", JSON.stringify(tag.data, null, 2));
78+
throw new Error("tag didn't work");
79+
}
8380
} else {
8481
core.info(`existing tag works`);
8582
}
@@ -91,12 +88,12 @@ async function runOnce() {
9188
let release = null;
9289
try {
9390
core.info(`fetching release`);
94-
release = await octokit.repos.getReleaseByTag({ owner, repo, tag: name });
91+
release = await octokit.rest.repos.getReleaseByTag({ owner, repo, tag: name });
9592
} catch (e) {
9693
console.log("ERROR: ", JSON.stringify(e, null, 2));
9794
core.info(`creating a release`);
9895
try {
99-
release = await octokit.repos.createRelease({
96+
release = await octokit.rest.repos.createRelease({
10097
owner,
10198
repo,
10299
tag_name: name,
@@ -105,19 +102,30 @@ async function runOnce() {
105102
} catch(e) {
106103
console.log("ERROR: ", JSON.stringify(e, null, 2));
107104
core.info(`fetching one more time`);
108-
release = await octokit.repos.getReleaseByTag({ owner, repo, tag: name });
105+
release = await octokit.rest.repos.getReleaseByTag({ owner, repo, tag: name });
109106
}
110107
}
111108
console.log("found release: ", JSON.stringify(release.data, null, 2));
112109

113110
// Upload all the relevant assets for this release as just general blobs.
114111
for (const file of glob.sync(files)) {
115112
const size = fs.statSync(file).size;
113+
const name = path.basename(file);
114+
for (const asset of release.data.assets) {
115+
if (asset.name !== name)
116+
continue;
117+
console.log(`deleting prior asset ${asset.id}`);
118+
await octokit.rest.repos.deleteReleaseAsset({
119+
owner,
120+
repo,
121+
asset_id: asset.id,
122+
});
123+
}
116124
core.info(`upload ${file}`);
117-
await octokit.repos.uploadReleaseAsset({
125+
await octokit.rest.repos.uploadReleaseAsset({
118126
data: fs.createReadStream(file),
119127
headers: { 'content-length': size, 'content-type': 'application/octet-stream' },
120-
name: path.basename(file),
128+
name,
121129
url: release.data.upload_url,
122130
});
123131
}

0 commit comments

Comments
 (0)