Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: default to LLVM 16 on Windows and Linux #191

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/actions/setup-cpp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/actions/setup-cpp.js.map

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions dist/legacy/setup-cpp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/legacy/setup-cpp.js.map

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions dist/modern/setup-cpp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/modern/setup-cpp.js.map

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions src/__tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { parseArgs } from "../cli-options"
import { getCompilerInfo } from "../compilers"
import { Inputs } from "../tool"
import { DefaultLinuxVersion } from "../versions/default_versions"

jest.setTimeout(300000)
describe("getCompilerInfo", () => {
Expand Down Expand Up @@ -63,9 +64,9 @@
it("llvm", () => {
expect(getVersion("llvm", "13.0.0")).toBe("13.0.0")
if (process.platform === "linux") {
expect(getVersion("llvm", "true", [20, 4])).toBe("15.0.6-ubuntu-18.04")
expect(getVersion("llvm", "true", [18, 4])).toBe("15.0.6-ubuntu-18.04")
expect(getVersion("llvm", "true", [16, 4])).toBe("15.0.6-ubuntu-18.04")
expect(getVersion("llvm", "true", [20, 4])).toBe(DefaultLinuxVersion["llvm"]![20])

Check warning on line 67 in src/__tests__/main.test.ts

View workflow job for this annotation

GitHub Actions / Build (ubuntu-22.04, 20, 8)

["llvm"] is better written in dot notation
expect(getVersion("llvm", "true", [18, 4])).toBe(DefaultLinuxVersion["llvm"]![18])

Check warning on line 68 in src/__tests__/main.test.ts

View workflow job for this annotation

GitHub Actions / Build (ubuntu-22.04, 20, 8)

["llvm"] is better written in dot notation
expect(getVersion("llvm", "true", [16, 4])).toBe(DefaultLinuxVersion["llvm"]![16])

Check warning on line 69 in src/__tests__/main.test.ts

View workflow job for this annotation

GitHub Actions / Build (ubuntu-22.04, 20, 8)

["llvm"] is better written in dot notation
}
})
})
18 changes: 10 additions & 8 deletions src/versions/default_versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ import { isArch } from "../utils/env/isArch"

function getLLVMDefault() {
switch (process.platform) {
case "win32":
return "16.0.6"
case "linux":
// used for non-ubuntu (Fedora, Arch)
return "15.0.6-ubuntu-18.04"
return "16.0.4-ubuntu-22.04"
case "darwin":
return "15.0.3"
default:
return "15.0.4"
return "16.0.6"
}
}

Expand Down Expand Up @@ -52,22 +54,22 @@ export const DefaultLinuxVersion: Record<string, Record<number, string> | undefi
20: "7.0.0-2",
},
llvm: {
22: "15.0.6-ubuntu-18.04",
20: "15.0.6-ubuntu-18.04",
22: "16.0.4-ubuntu-22.04",
20: "16.0.4-ubuntu-22.04",
18: "15.0.6-ubuntu-18.04",
16: "15.0.6-ubuntu-18.04",
14: "13.0.0-ubuntu-16.04",
},
clangtidy: {
22: "15.0.6-ubuntu-18.04",
20: "15.0.6-ubuntu-18.04",
22: "16.0.4-ubuntu-22.04",
20: "16.0.4-ubuntu-22.04",
18: "15.0.6-ubuntu-18.04",
16: "15.0.6-ubuntu-18.04",
14: "13.0.0-ubuntu-16.04",
},
clangformat: {
22: "15.0.6-ubuntu-18.04",
20: "15.0.6-ubuntu-18.04",
22: "16.0.4-ubuntu-22.04",
20: "16.0.4-ubuntu-22.04",
18: "15.0.6-ubuntu-18.04",
16: "15.0.6-ubuntu-18.04",
14: "13.0.0-ubuntu-16.04",
Expand Down
Loading