Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zbeekman/brew-gha-profiling
Get detailed homebrew config and profile installations on GH Actions
https://github.com/zbeekman/brew-gha-profiling
actions brew github-actions homebrew profiling
Last synced: 3 days ago
JSON representation
Get detailed homebrew config and profile installations on GH Actions
- Host: GitHub
- URL: https://github.com/zbeekman/brew-gha-profiling
- Owner: zbeekman
- License: mit
- Created: 2020-02-03T14:22:05.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-03T21:00:32.000Z (5 months ago)
- Last Synced: 2024-11-19T20:50:59.708Z (2 months ago)
- Topics: actions, brew, github-actions, homebrew, profiling
- Language: Shell
- Homepage: http://izaakbeekman.com/brew-GHA-profiling
- Size: 752 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Profiling and Getting Detailed Homebrew-on-Github-Actions Setup Information
| Push build | ![Build (push)](https://github.com/zbeekman/brew-GHA-profiling/workflows/Brew%20Info/badge.svg?event=push) |
| ---: | --- |
| __Cron deploy__ | ![Cron Deploy](https://github.com/zbeekman/brew-GHA-profiling/workflows/Brew%20Info/badge.svg?event=schedule) |## About
This repository generates timing and configuration data for the default [Homebrew] installation on GitHub Actions `macos-latest` runner.
To browse a very thorough dump of the default [Homebrew] configuration and default packages visit the [`gh-pages` branch],
or the [rendered website]. (http://izaakbeekman.com/brew-GHA-profiling)[Homebrew]: https://brew.sh
[`gh-pages` branch]: https://github.com/zbeekman/brew-GHA-profiling/tree/gh-pages
[rendered website]: https://izaakbeekman.com/brew-GHA-profiling## Status
Currently, I'm collecting samples of baseline timing data so I can try to see if any of my hand tuning optimizations make any difference.
You can browse the CSV files on the [`gh-pages` branch] or by following the links on the [rendered website].
I set the workflow to run, in theory, every hour, so if all goes to plan there will be about 24 baseline cases soon.
Then I will move on to some optimization experiments.## Planned optimization experiments
### Tweaking environment variables
By default, it looks like GitHub is turning off automatic update checking with `HOMEBREW_NO_AUTO_UPDATE`, which is a good start.
I'm going to test (in batch) the following additional variables that may (or may not) improve install times:- `HOMEBREW_NO_ANALYTICS`
- `HOMEBREW_NO_GITHUB_API`
- `HOMEBREW_NO_INSTALL_CLEANUP`
- `HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK`The last option won't make a difference most of the time,
but it will cause you job to fail rather than attempt to build tooling from source when there is a binary package available yet.
This is only relavent when there is a network hiccup or some other similar exception and homebrew cannot fetch a bottle for a package.
But this will save GitHub some compute time and make it so that your CI jobs fail rapidly rather than compile a whole bunch of tooling from source.### Caching
The next optimization attempt will be to cache and restore the `$(brew --cache)` directory.
Initial experiments suggest that GitHub actions are not proxying downloads, but this may be incorrect.
If we can do this ourselves, we should see a bit of a speedup.
It would be nice to cache more homebrew state, including the entire dependency tree of the requested packages in the Cellar,
but, these files may be to large and there's no good/easy way that I know of to extract and cache just the requested packages (and their dependencies).[workflows]: ./.github/workflows