Skip to content

Commit

Permalink
sccache sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Oct 8, 2024
1 parent 15dcca6 commit 1b6a74e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ jobs:

- name: Setup sccache as root
run: ./dev/ci/setup-sccache
timeout-minutes: 1
env:
SUDO: true
SCCACHE_LOG: trace
Expand Down
11 changes: 6 additions & 5 deletions dev/ci/setup-sccache
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ if [[ -z "$SCCACHE_AZURE_CONNECTION_STRING" ]]; then
exit 1
fi

SCCACHE_LOG=${SCCACHE_LOG:-info} # set to 'debug' or 'trace' for more verbose logging
SUDO=${SUDO:-false}


Expand Down Expand Up @@ -63,10 +64,8 @@ fi

## Start sccache server.

## Uncomment this to have the sccache server write debug logs to sccache.log.
# export SCCACHE_LOG=debug

echo -n > sccache.log
rm -f sccache.log
export SCCACHE_LOG
export SCCACHE_ERROR_LOG="$(pwd)/sccache.log"
echo "SCCACHE_ERROR_LOG=$SCCACHE_ERROR_LOG" >> "$GITHUB_ENV"

Expand All @@ -76,8 +75,10 @@ else
env SCCACHE_START_SERVER=1 sccache
fi

set +x
echo "Waiting until sccache server is started..."
while [[ -z "$(cat sccache.log)" ]]; do
while [[ ! -e sccache.log ]]; do
sleep 0.1
done
sleep 0.5
echo "sccache server is started."

0 comments on commit 1b6a74e

Please sign in to comment.