Skip to content

Commit

Permalink
don’t get .xz files in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Oct 30, 2022
1 parent 5e4164a commit 6f94c16
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/prefab/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default async function install(pkg: Package, logger?: Logger): Promise<In
const cellar = useCellar()
const { verbosity } = useFlags()
const dstdir = usePrefix()
const compression = host().platform == 'darwin' ? 'xz' : 'gz'
const compression = get_compression()
const stowage = StowageNativeBottle({ pkg: { project, version }, compression })
const url = useOffLicense('s3').url(stowage)
const dst = useCache().path(stowage)
Expand Down Expand Up @@ -102,3 +102,10 @@ async function unquarantine(install: Installation) {

await run({ cmd })
}

function get_compression() {
if (Deno.env.get("CI")) return 'gz' // in CI CPU is more constrained than bandwidth
if (host().platform == 'darwin') return 'xz' // most users are richer in CPU than bandwidth
// TODO determine if `tar` can handle xz
return 'gz'
}

0 comments on commit 6f94c16

Please sign in to comment.