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

CI: Add caching and macOS job #595

Merged
merged 3 commits into from
Apr 14, 2021
Merged

Conversation

EwoutH
Copy link
Contributor

@EwoutH EwoutH commented Apr 14, 2021

This PR updates the CI configuration to implement caching of all external dependencies (currently aom, dav1d, rav1e, libgav1 and libyuv), speeding up the build from 15 to 20 minutes to under 1 minute with a cache hit.

It also adds a macOS build using Xcode with Apple Clang and includes a bit of cleanup. It updates libyuv to resolve an error on macOS.

I have split the PR into 3 commits to separate each feature. You can see a run without caching here and a build with caching here.

EwoutH added 3 commits April 14, 2021 23:19
Also only clone a single-branch for quicker and smaller clone
Adds a build on macOS using Xcode with Apple Clang. 

Also refactors as cleanup and in preparation for cache implementation.
@joedrago
Copy link
Collaborator

I certainly love the idea of this PR, but I am quite ignorant on the magic going on in these changes, and would love to know how to interpret these changes before accepting them. Who is storing this compile cache? Is this just something GitHub securely offers for free? Should I be concerned about depending on seanmiddleditch/gha-setup-ninja@v3? Any additional information would be great here.

@wantehchang
Copy link
Collaborator

Joe: Perhaps we can merge 98fb2a1 first? It is straightforward.

@EwoutH
Copy link
Contributor Author

EwoutH commented Apr 14, 2021

Right, this was a long an very iterative process so let me expand a bit:

  • seanmiddleditch/gha-setup-ninja is used to install Ninja. Using apt-get wasn't ideal since macOS doesn't support it. We can fix this action to a specific commit if prefered.
  • Compile cache is stored on GitHub servers. There is a compile cache for each branch, and all branches have access to the master-branch cache (for PRs etc.). It's indeed offered free of charge, and we don't store any sensitive things in there.

I think that's most of it. The cache will be updated every time a *.cmd file in ext/ is updated. And I reordered some steps to use them in the cache or not.

@joedrago
Copy link
Collaborator

Considering the source (@EwoutH has proven trustworthy over the years), I'm willing to give it a shot. I might have to lean on you a bit if this starts to fail though. 😄

@joedrago joedrago merged commit 86ace0a into AOMediaCodec:master Apr 14, 2021
@EwoutH
Copy link
Contributor Author

EwoutH commented Apr 19, 2021

Happy with the new CI config so far? Any feedback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants