Skip to content

Commit be023fc

Browse files
authored
fix: Update distribution names for Dafny 4.11 (#31)
Dafny 4.11 started to use newer GitHub Actions runner image names, so the logic to determine the distribution string here needs to be updated. Also updated CI to test with a newer nightly build, since the old one has been deleted. I used the same one as https://github.com/aws/aws-cryptographic-material-providers-library/blob/main/project.properties#L10C18-L10C44 since that's the main one we're aware is still used.
1 parent ca6d80d commit be023fc

3 files changed

Lines changed: 31 additions & 3 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: [macos-latest, ubuntu-latest, windows-latest]
18-
dafny: [3.8.1, 3.13.1, 4.0.0, 4.9.1, nightly-2023-02-28-80a0e49, nightly-latest]
18+
dafny: [3.8.1, 3.13.1, 4.0.0, 4.9.1, 4.11.0, nightly-2025-01-30-7db1e5f, nightly-latest]
1919
include:
2020
# Test building from source from a subset of versions
2121
- dafny: 4.0.0

dist/index.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6851,7 +6851,21 @@ function getDistribution(platform, version) {
68516851
const post312 =
68526852
version.includes("nightly") ||
68536853
versionToNumeric(version) >= versionToNumeric("3.13");
6854-
if (post312) {
6854+
// We still have nightlies from before 4.11 in use though,
6855+
// so we DO have to check against the date when the nightlies switched to use newer names.
6856+
const post410 =
6857+
(version.includes("nightly") && version >= "nightly-2025-08-15") ||
6858+
versionToNumeric(version) >= versionToNumeric("4.11");
6859+
if (post410) {
6860+
switch (platform) {
6861+
case "win32":
6862+
return "windows-2022";
6863+
case "darwin":
6864+
return "macos-13";
6865+
default:
6866+
return "ubuntu-22.04";
6867+
}
6868+
} else if (post312) {
68556869
switch (platform) {
68566870
case "win32":
68576871
return "windows-2019";

index.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,21 @@ function getDistribution(platform, version) {
148148
const post312 =
149149
version.includes("nightly") ||
150150
versionToNumeric(version) >= versionToNumeric("3.13");
151-
if (post312) {
151+
// We still have nightlies from before 4.11 in use though,
152+
// so we DO have to check against the date when the nightlies switched to use newer names.
153+
const post410 =
154+
(version.includes("nightly") && version >= "nightly-2025-08-15") ||
155+
versionToNumeric(version) >= versionToNumeric("4.11");
156+
if (post410) {
157+
switch (platform) {
158+
case "win32":
159+
return "windows-2022";
160+
case "darwin":
161+
return "macos-13";
162+
default:
163+
return "ubuntu-22.04";
164+
}
165+
} else if (post312) {
152166
switch (platform) {
153167
case "win32":
154168
return "windows-2019";

0 commit comments

Comments
 (0)