-
Notifications
You must be signed in to change notification settings - Fork 294
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
Generate an RRD file during the build which we inject into the wheel #1087
Conversation
bdff221
to
1540ba0
Compare
- name: Cache APT Packages | ||
#uses: awalsh128/cache-apt-pkgs-action@v1.2.2 | ||
#TODO(john) merge upstream | ||
uses: rerun-io/cache-apt-pkgs-action@59534850182063abf1b2c11bb3686722a12a8397 | ||
with: | ||
packages: libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev libfontconfig1-dev libatk-bridge2.0 libfreetype6-dev libglib2.0-dev | ||
version: 1.0 | ||
execute_install_scripts: true | ||
|
||
- name: Set up cargo cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
env-vars: CARGO CC CFLAGS CXX CMAKE RUST CACHE_KEY | ||
# See: https://github.com/rerun-io/rerun/pull/497 | ||
save-if: ${{ github.event_name == 'push'}} | ||
|
||
- name: Setup python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
architecture: x64 | ||
cache: "pip" | ||
cache-dependency-path: "rerun_py/requirements-build.txt" | ||
|
||
- name: Build and install rerun | ||
run: | | ||
pip install rerun_py/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would swap this with a download of the previously-built wheel to avoid re-installing and re-building everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a chicken-and-egg problem here -- there is't a previously built wheel. The wheels need to be built after this because we want to be able to use this artifact to inject into the wheel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah of course.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need this yet, but an improvement (reduction in duplicate CI effort) will be to reduce the "generate .rrd" to entirely Rust so we can cut all the Python out of this job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea.
cab4cfc
to
441e1b5
Compare
Builds on top of: #1085 which will need to be landed first
We want it to be easy to spawn a rerun instance with some rich data with no other dependency on checking out the examples repo, etc.
The rrd file is a reasonable and portable mechanism of packing this data. Given that RRD files change over time, we don't want to check it into the repo, but instead generate it and inject it into the package at build time.
This PR also adds a new package
rerun_demo
, similar to the rerun/main.py which instead spawns the viewer with the path to the rrd file.After pip installing the rerun package you can run the demo with:
As long as the package was built with the injected rrd file it will spawn the viewer. Otherwise you'll get an error
Checklist
CHANGELOG.md
(if this is a big enough change to warrant it)