Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve build caching on CI #1902

Merged
merged 4 commits into from
Nov 21, 2019
Merged

Commits on Nov 17, 2019

  1. Disable incremental compilation on CI

    For some reason, incremental files are changing on CI even when no code
    changes.  Turning off incremental compilation should help avoid
    uploading a new cache with every single build.
    
    This commit also removes `target/.rustc_info.json` from the CI cache
    jtgeibel committed Nov 17, 2019
    Configuration menu
    Copy the full SHA
    3e852e2 View commit details
    Browse the repository at this point in the history
  2. Only install diesel on CI if the binary isn't cached

    The CI build cache is currently updated with every build, even if there
    are no changes.  This is because running `cargo install` will update
    the index causing some files under `$HOME/.cargo` to be updated,
    invalidating the cache.
    
    The drawback is that if we bump the diesel version, then the CLI will
    not be automatically updated.  However, even an old version of the CLI
    application is expected to be able to run our migrations on CI and the
    cache can always be cleared if a new version is needed.
    jtgeibel committed Nov 17, 2019
    Configuration menu
    Copy the full SHA
    f1afb8f View commit details
    Browse the repository at this point in the history
  3. Disable debug info on CI

    This is an attempt to further decrease the cache size on CI.
    jtgeibel committed Nov 17, 2019
    Configuration menu
    Copy the full SHA
    5e86f7b View commit details
    Browse the repository at this point in the history
  4. Run cargo clean on CI

    The change to `RUSTFLAGS` changes build hashes, so wiping the target
    directory and doing a full rebuild.
    jtgeibel committed Nov 17, 2019
    Configuration menu
    Copy the full SHA
    45675ec View commit details
    Browse the repository at this point in the history