Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
Get rid of sccache
Browse files Browse the repository at this point in the history
  • Loading branch information
Porges committed Jun 19, 2023
1 parent a0ce0ff commit 424d34b
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 51 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ concurrency:

env:
CARGO_TERM_COLOR: always
SCCACHE_DIR: ${{github.workspace}}/sccache/
SCCACHE_CACHE_SIZE: 1G
ACTIONS_CACHE_KEY_DATE: 2023-06-19
CI: true

Expand Down Expand Up @@ -89,13 +87,6 @@ jobs:
if: steps.rust-build-cache.outputs.cache-hit != 'true' && steps.cache-agent-artifacts.outputs.cache-hit != 'true'
shell: bash
run: src/ci/rust-prereqs.sh
- name: Rust Sccache
if: steps.cache-agent-artifacts.outputs.cache-hit != 'true'
uses: actions/cache@v3
with:
path: sccache
key: agent-sccache|${{ join(matrix.os, ':') }}|${{steps.rust-version.outputs.RUST_VERSION}}|${{ env.ACTIONS_CACHE_KEY_DATE }}|${{ hashFiles('src/agent/Cargo.lock') }}
restore-keys: agent-sccache|${{ join(matrix.os, ':') }}|${{steps.rust-version.outputs.RUST_VERSION}}|${{ env.ACTIONS_CACHE_KEY_DATE }}|
- run: src/ci/agent.sh
if: steps.cache-agent-artifacts.outputs.cache-hit != 'true'
shell: bash
Expand Down Expand Up @@ -243,14 +234,6 @@ jobs:
if: steps.rust-build-cache.outputs.cache-hit != 'true'
shell: bash
run: src/ci/rust-prereqs.sh
- name: Rust Compile Cache
uses: actions/cache@v3
with:
path: sccache
key: proxy-sccache|${{ runner.os }}-${{ hashFiles('src/proxy-manager/Cargo.lock') }}-${{ env.ACTIONS_CACHE_KEY_DATE }}
restore-keys: |
proxy-sccache|${{ runner.os }}-${{ hashFiles('src/proxy-manager/Cargo.lock') }}-
proxy-sccache|${{ runner.os }}-
- run: src/ci/proxy.sh
- uses: actions/upload-artifact@v3
with:
Expand Down
28 changes: 0 additions & 28 deletions src/ci/agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,6 @@ exists() {
[ -e "$1" ]
}

SCCACHE=$(which sccache || echo '')
if [ -n "$SCCACHE" ]; then
# only set RUSTC_WRAPPER if sccache exists
export RUSTC_WRAPPER=$SCCACHE
# incremental interferes with (disables) sccache
export CARGO_INCREMENTAL=0
else
# only set CARGO_INCREMENTAL on non-release builds
#
# This speeds up build time, but makes the resulting binaries slightly slower.
# https://doc.rust-lang.org/cargo/reference/profiles.html?highlight=incremental#incremental
if [ "${GITHUB_REF}" != "" ]; then
TAG_VERSION=${GITHUB_REF#refs/tags/}
if [ ${TAG_VERSION} == ${GITHUB_REF} ]; then
export CARGO_INCREMENTAL=1
fi
fi
fi

platform=$(uname --kernel-name --machine)
platform=${platform// /-} # replace spaces with dashes
rel_output_dir="artifacts/agent-$platform"
Expand All @@ -45,11 +26,6 @@ cargo clippy --version
cargo fmt --version
cargo license --version

# unless we're doing incremental builds, start clean during CI
if [ X${CARGO_INCREMENTAL} == X ]; then
cargo clean
fi

cargo fmt -- --check

cargo deny -L error check
Expand All @@ -69,10 +45,6 @@ cargo llvm-cov nextest --all-targets --locked --workspace --lcov --output-path "
# TODO: once Salvo is integrated, this can get deleted
cargo build --release --locked --manifest-path ./onefuzz-telemetry/Cargo.toml --all-features

if [ -n "$SCCACHE" ]; then
sccache --show-stats
fi

echo "Checking dependencies of binaries"

"$script_dir/check-dependencies.sh"
Expand Down
2 changes: 0 additions & 2 deletions src/ci/proxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

set -ex

#export RUSTC_WRAPPER=$(which sccache)

mkdir -p artifacts/proxy

cd src/proxy-manager
Expand Down
5 changes: 1 addition & 4 deletions src/ci/rust-prereqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@

set -ex

cargo install --locked sccache cargo-license@0.4.2 cargo-llvm-cov cargo-deny cargo-insta cargo-nextest

# sccache --start-server
# export RUSTC_WRAPPER=$(which sccache)
cargo install --locked cargo-license@0.4.2 cargo-llvm-cov cargo-deny cargo-insta cargo-nextest

0 comments on commit 424d34b

Please sign in to comment.