2020-07-29 11:45:51 +02:00
|
|
|
#!/usr/bin/env pwsh
|
|
|
|
$os=$args[0]
|
|
|
|
$version="0.2.12"
|
|
|
|
echo "Current OS:" $os
|
|
|
|
switch ($os){
|
|
|
|
"macOS" {$platform = "x86_64-apple-darwin"}
|
|
|
|
"Linux" {$platform = "x86_64-unknown-linux-musl"}
|
|
|
|
"Windows" {$platform ="x86_64-pc-windows-msvc"}
|
|
|
|
}
|
|
|
|
echo "Target arch: " $platform
|
|
|
|
$basename = "sccache-$version-$platform"
|
|
|
|
$url = "https://github.com/mozilla/sccache/releases/download/"+"$version/$basename.tar.gz"
|
|
|
|
echo "Download sccache from "+$url
|
|
|
|
curl -LO $url
|
|
|
|
tar -xzvf "$basename.tar.gz"
|
|
|
|
ls $basename/
|
|
|
|
. $basename/sccache --start-server
|
2020-11-17 11:16:24 +01:00
|
|
|
echo "$(pwd)/$basename" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
|
|
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
|