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

Travis cache #781

Merged
merged 4 commits into from Jul 4, 2018
Merged

Travis cache #781

merged 4 commits into from Jul 4, 2018

Conversation

expobrain
Copy link
Contributor

Added cache for Travis and Swift assets

Copy link
Member

@asottile asottile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh man I was hoping there was a way to speed this up.

if this works you're a genius thank you so much 🙏

@asottile
Copy link
Member

asottile commented Jul 4, 2018

🤔

WARNING: timestamping does nothing in combination with -O. See the manual
for details.

@expobrain
Copy link
Contributor Author

Argh, missed that! Let me check for alternatives

fi

pushd "$HOME"/.swift
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised (?) that this directory doesn't need to be created first? should there be a mkdir -p "$HOME/.swift" above this? (note that I also use this script to test locally :D)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another idea if wget doesn't pan out (though it seems from travis-ci that this works!) would be to checksum test the file and retrieve if incorrect (missing)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pushd:

now that you mention that I'm surprise as well. My untested theory is that Travis creates the directory in cache->directories ahead of time so pushd is not failing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wget:

you mean storing the hardcoded checksum for the Swift tarballs in the script and check them at runtime? Can do it, probably a little paranoid-ish but still a good point

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant more if we couldn't find a solution that worked with wget :)

let's add the mkdir -p so I can keep using this script locally and then I'll merge this!

@asottile asottile merged commit 50fe51f into pre-commit:master Jul 4, 2018
@asottile
Copy link
Member

asottile commented Jul 4, 2018

Thanks again!

@expobrain expobrain deleted the rust_cache branch July 5, 2018 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants