2021-09-16 16:41:47 +08:00
|
|
|
import { setupAptPack } from "../utils/setup/setupAptPack"
|
|
|
|
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
|
|
|
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
|
|
|
|
2021-09-16 19:57:37 +08:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
2021-11-22 02:46:34 +08:00
|
|
|
export function setupCcache(version: string, _setupDir: string, _arch: string) {
|
2021-09-16 16:41:47 +08:00
|
|
|
switch (process.platform) {
|
|
|
|
case "win32": {
|
|
|
|
return setupChocoPack("ccache", version)
|
|
|
|
}
|
|
|
|
case "darwin": {
|
|
|
|
return setupBrewPack("ccache", version)
|
|
|
|
}
|
|
|
|
case "linux": {
|
|
|
|
return setupAptPack("ccache", version)
|
|
|
|
}
|
|
|
|
default: {
|
|
|
|
throw new Error(`Unsupported platform`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|