Skip to content

Commit

Permalink
Removed sccache.
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeepd-nv committed Aug 8, 2024
1 parent 4614302 commit f7ce771
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 196 deletions.
8 changes: 0 additions & 8 deletions .github/actions/build/action.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,6 @@ runs:
ls -lahR ${{ env.ARTIFACTS_DIR }}
<% endif %>

- if: github.repository_owner == 'nvidia'
name: Get AWS credentials for sccache bucket
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-2
role-duration-seconds: 28800 # 8 hours
role-to-assume: arn:aws:iam::279114543810:role/gha-oidc-nv-legate

- if: ${{ inputs.use-container }}
name: Build (in container)
shell: bash --noprofile --norc -xeuo pipefail {0}
Expand Down
79 changes: 2 additions & 77 deletions continuous_integration/scripts/setup-utils
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ install_darwin_tools() {
export READLINK=greadlink

brew update
brew install cmake coreutils git gnu-getopt gnu-sed jq ninja wget sccache
brew install cmake coreutils git gnu-getopt gnu-sed jq ninja wget
install_darwin_mamba;
}

Expand Down Expand Up @@ -79,47 +79,6 @@ install_from_apt() {
apt-get -q install -y wget curl jq sudo ninja-build vim numactl rsync
}

install_sccache_linux() {
set -xeuo pipefail

ARCH=$(uname -m)

if [ "$ARCH" == "x86_64" ]; then
SCCACHE_ARCH="x86_64-unknown-linux-musl"
elif [ "$ARCH" == "aarch64" ]; then
SCCACHE_ARCH="aarch64-unknown-linux-musl"
else
echo "Unsupported architecture: $ARCH"
exit 1
fi

SCCACHE_VERSION="v0.8.1"
SCCACHE_URL="https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/sccache-${SCCACHE_VERSION}-${SCCACHE_ARCH}.tar.gz"

wget -q "$SCCACHE_URL"
tar -xf "sccache-${SCCACHE_VERSION}-${SCCACHE_ARCH}.tar.gz"
sudo mv "sccache-${SCCACHE_VERSION}-${SCCACHE_ARCH}/sccache" /usr/bin/sccache
}


maybe_install_sccache_linux() {
set -xeuo pipefail

if ! command -v sccache &> /dev/null; then
echo "sccache not found, proceeding with installation."
install_sccache_linux
else
sccache_version=$(sccache --version 2>&1 | awk '/sccache/ {print $2}')
if [[ -z "$sccache_version" ]] || ! version_greater_equal "$sccache_version" "0.5.4"; then
echo "sccache version less than 0.5.4, proceeding with installation."
install_sccache_linux
else
echo "sccache version is 0.5.4 or greater, no need to install."
fi
fi
}


install_cmake() {
set -xeuo pipefail

Expand All @@ -143,7 +102,6 @@ install_linux_tools() {
export READLINK=readlink

install_from_apt;
maybe_install_sccache_linux;
install_cmake;

mkdir -p /tmp/out /tmp/env_yaml
Expand Down Expand Up @@ -272,39 +230,6 @@ setup_build_env() {
prep_git;
}

sccache_stop_server_and_show_stats() {
set -xeuo pipefail
sccache --stop-server || true && sccache --show-stats;
}

init_sccache() {
set -xeuo pipefail

export SCCACHE_REGION="us-east-2"
export SCCACHE_BUCKET="rapids-sccache-east"
export SCCACHE_S3_KEY_PREFIX=legate-cunumeric-dev
export VAULT_HOST=https://vault.ops.k8s.rapids.ai
CMAKE_C_COMPILER_LAUNCHER=$(which sccache)
export CMAKE_C_COMPILER_LAUNCHER
export CMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}
export CMAKE_CUDA_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}

echo AWS_REGION="${AWS_REGION:-}"
echo AWS_SESSION_TOKEN="${AWS_SESSION_TOKEN:-}"
echo AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID:-}"
echo AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY:-}"

mkdir -p ~/.cache;

local secrets_dir="$REPO_DIR/.creds"

if [ -d "$secrets_dir" ] && [ "$(ls -A "$secrets_dir")" ]; then
vault-s3-init;
else
sccache_stop_server_and_show_stats
fi
}

init_build_env() {
set -x;

Expand All @@ -319,7 +244,7 @@ init_build_env() {
cd "$PREBUILD_DIR"

setup_build_env;
init_sccache;

cd "$REPO_DIR";

if [[ -d "${BUILD_DIR}" ]]; then
Expand Down
111 changes: 0 additions & 111 deletions continuous_integration/scripts/vault-s3-init

This file was deleted.

0 comments on commit f7ce771

Please sign in to comment.