-
Notifications
You must be signed in to change notification settings - Fork 547
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7aa0b9
commit f0a36de
Showing
3 changed files
with
22 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,31 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
ARCH="$1" | ||
ARCH_AND_OS="$1" | ||
|
||
echo "PATH=/usr/local/libexec/sccache:/usr/local/bin:$PATH" >> "$GITHUB_ENV" | ||
echo "SCCACHE_ERROR_LOG=$(tty)" >> "$GITHUB_ENV" | ||
|
||
echo "SCCACHE_ERROR_LOG=$(pwd)/sccache.log" >> "$GITHUB_ENV" | ||
echo "SCCACHE_LOG=sccache=trace" >> "$GITHUB_ENV" | ||
set -x | ||
|
||
wget --output-document sccache.tar.gz "https://github.com/mozilla/sccache/releases/download/v0.8.1/sccache-v0.8.1-$ARCH.tar.gz" | ||
wget --output-document sccache.tar.gz "https://github.com/mozilla/sccache/releases/download/v0.8.1/sccache-v0.8.1-$ARCH_AND_OS.tar.gz" | ||
tar xzf sccache.tar.gz | ||
rm sccache.tar.gz | ||
sudo mv sccache*/sccache /usr/local/bin/sccache | ||
rm -rf sccache* | ||
|
||
sudo mkdir -p /usr/local/libexec/sccache | ||
sudo ln -s /usr/local/bin/sccache /usr/local/libexec/sccache/cc | ||
sudo ln -s /usr/local/bin/sccache /usr/local/libexec/sccache/c++ | ||
for PROG in cc c++; do | ||
FULLPATH=$(command -v "$PROG") | ||
echo '#!/bin/sh' > "$PROG" | ||
echo "exec /usr/local/bin/sccache $FULLPATH \"\$@\"" >> "$PROG" | ||
cat "$PROG" | ||
chmod +x "$PROG" | ||
sudo mv "$PROG" /usr/local/libexec/sccache/ | ||
done | ||
|
||
SCCACHE_START_SERVER=1 sccache | ||
touch sccache.log | ||
export SCCACHE_START_SERVER=1 | ||
# Uncomment this to have the sccache server write debug logs to sccache.log | ||
# export SCCACHE_LOG=debug | ||
sccache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
set -ex | ||
|
||
sccache --stop-server | ||
cat sccache.log |