Skip to content

Commit bd36909

Browse files
committed
fix: fix llvm 15 on ubuntu - add logging for extraction
1 parent 0e9ce85 commit bd36909

File tree

6 files changed

+38
-37
lines changed

6 files changed

+38
-37
lines changed

dist/node12/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node12/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node16/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node16/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/setup/setupBin.ts

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { find, downloadTool, cacheDir } from "@actions/tool-cache"
2-
import { info } from "@actions/core"
32
import { addPath } from "../env/addEnv"
43
import { join } from "patha"
4+
import { info } from "ci-log"
55

66
import { tmpdir } from "os"
77
import ciDetect from "@npmcli/ci-detect"
@@ -89,29 +89,30 @@ export async function setupBin(
8989

9090
// download ane extract the package into the installation directory.
9191
if ((await Promise.all([pathExists(binDir), pathExists(binFile)])).includes(false)) {
92-
info(`Download and extract ${name} ${version}`)
93-
94-
if (!didInit) {
95-
if (process.platform === "linux") {
96-
// extraction dependencies
97-
if (isArch()) {
98-
setupPacmanPack("unzip")
99-
setupPacmanPack("tar")
100-
setupPacmanPack("xz")
101-
} else if (hasDnf()) {
102-
setupDnfPack("unzip")
103-
setupDnfPack("tar")
104-
setupDnfPack("xz")
105-
} else if (isUbuntu()) {
106-
await setupAptPack([{ name: "unzip" }, { name: "tar" }, { name: "xz-utils" }])
92+
try {
93+
info(`Download ${name} ${version}`)
94+
const downloaded = await downloadTool(url)
95+
96+
if (!didInit) {
97+
info(`Installing extraction dependencies`)
98+
if (process.platform === "linux") {
99+
if (isArch()) {
100+
setupPacmanPack("unzip")
101+
setupPacmanPack("tar")
102+
setupPacmanPack("xz")
103+
} else if (hasDnf()) {
104+
setupDnfPack("unzip")
105+
setupDnfPack("tar")
106+
setupDnfPack("xz")
107+
} else if (isUbuntu()) {
108+
await setupAptPack([{ name: "unzip" }, { name: "tar" }, { name: "xz-utils" }])
109+
}
107110
}
111+
// eslint-disable-next-line require-atomic-updates
112+
didInit = true
108113
}
109-
// eslint-disable-next-line require-atomic-updates
110-
didInit = true
111-
}
112114

113-
try {
114-
const downloaded = await downloadTool(url)
115+
info(`Extracting ${downloaded} to ${setupDir}`)
115116
await extractFunction?.(downloaded, setupDir)
116117
// if (typeof extractedBinDir === "string") {
117118
// binDir = extractedBinDir

src/versions/default_versions.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,24 @@ export const DefaultLinuxVersion: Record<string, Record<number, string>> = {
3030
14: "11",
3131
},
3232
llvm: {
33-
22: "15.0.6-ubuntu-18.0.4",
34-
20: "15.0.6-ubuntu-18.0.4",
35-
18: "15.0.6-ubuntu-18.0.4",
36-
16: "15.0.6-ubuntu-18.0.4",
33+
22: "15.0.6-ubuntu-18.04",
34+
20: "15.0.6-ubuntu-18.04",
35+
18: "15.0.6-ubuntu-18.04",
36+
16: "15.0.6-ubuntu-18.04",
3737
14: "13.0.0-ubuntu-16.04",
3838
},
3939
clangtidy: {
40-
22: "15.0.6-ubuntu-18.0.4",
41-
20: "15.0.6-ubuntu-18.0.4",
42-
18: "15.0.6-ubuntu-18.0.4",
43-
16: "15.0.6-ubuntu-18.0.4",
40+
22: "15.0.6-ubuntu-18.04",
41+
20: "15.0.6-ubuntu-18.04",
42+
18: "15.0.6-ubuntu-18.04",
43+
16: "15.0.6-ubuntu-18.04",
4444
14: "13.0.0-ubuntu-16.04",
4545
},
4646
clangformat: {
47-
22: "15.0.6-ubuntu-18.0.4",
48-
20: "15.0.6-ubuntu-18.0.4",
49-
18: "15.0.6-ubuntu-18.0.4",
50-
16: "15.0.6-ubuntu-18.0.4",
47+
22: "15.0.6-ubuntu-18.04",
48+
20: "15.0.6-ubuntu-18.04",
49+
18: "15.0.6-ubuntu-18.04",
50+
16: "15.0.6-ubuntu-18.04",
5151
14: "13.0.0-ubuntu-16.04",
5252
},
5353
gcovr: {

0 commit comments

Comments
 (0)