Skip to content

Commit

Permalink
Fold the RRD creation step into each individual build
Browse files Browse the repository at this point in the history
  • Loading branch information
John Hughes committed Feb 9, 2023
1 parent d6c63a0 commit cd7f132
Showing 1 changed file with 30 additions and 65 deletions.
95 changes: 30 additions & 65 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,59 +55,12 @@ jobs:
# ---------------------------------------------------------------------------

create_rrd:
name: Create example RRD files
runs-on: ubuntu-latest-16-cores
needs: [lint]
steps:
- uses: actions/checkout@v3

- name: Cache APT Packages
#uses: awalsh128/[email protected]
#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 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/
- name: Run Car example
run: |
mkdir rrd
pip install -r examples/car/requirements.txt
./examples/car/main.py --headless --save rrd/car.rrd
- name: Upload RRD
uses: actions/upload-artifact@v3
with:
name: rrd
path: rrd

macos:
name: Build Python Wheels for MacOS
runs-on: macos-latest
# This build is really slow (>30 mins); uses up a lot of CI minutes
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main'
needs: [lint, create_rrd]
needs: [lint]
strategy:
matrix:
target: [x64, universal2]
Expand All @@ -133,11 +86,15 @@ jobs:
if: github.ref == 'refs/heads/main'
run: python scripts/patch_prerelease_version.py

- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: rrd
path: rrd
- name: Build and install rerun
run: |
pip install rerun_py/
- name: Generate shipping RRD file
run: |
mkdir rrd
pip install -r examples/car/requirements.txt
./examples/car/main.py --headless --save rrd/car.rrd
- name: Inject RRD file
run: cp rrd/car.rrd rerun_py/rerun_sdk/rerun_demo/demo.rrd
Expand Down Expand Up @@ -188,7 +145,7 @@ jobs:
windows:
name: Build Python Wheels for Windows
runs-on: windows-latest-8-cores
needs: [lint, create_rrd]
needs: [lint]
strategy:
matrix:
target: [x64]
Expand All @@ -213,11 +170,15 @@ jobs:
if: github.ref == 'refs/heads/main'
run: python scripts/patch_prerelease_version.py

- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: rrd
path: rrd
- name: Build and install rerun
run: |
pip install rerun_py/
- name: Generate shipping RRD file
run: |
mkdir rrd
pip install -r examples/car/requirements.txt
./examples/car/main.py --headless --save rrd/car.rrd
- name: Inject RRD file
run: cp rrd/car.rrd rerun_py/rerun_sdk/rerun_demo/demo.rrd
Expand Down Expand Up @@ -253,7 +214,7 @@ jobs:
linux:
name: Build Python Wheels for Linux
runs-on: ubuntu-latest-16-cores
needs: [lint, create_rrd]
needs: [lint]
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -288,11 +249,15 @@ jobs:
if: github.ref == 'refs/heads/main'
run: python scripts/patch_prerelease_version.py

- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: rrd
path: rrd
- name: Build and install rerun
run: |
pip install rerun_py/
- name: Generate shipping RRD file
run: |
mkdir rrd
pip install -r examples/car/requirements.txt
./examples/car/main.py --headless --save rrd/car.rrd
- name: Inject RRD file
run: cp rrd/car.rrd rerun_py/rerun_sdk/rerun_demo/demo.rrd
Expand Down

0 comments on commit cd7f132

Please sign in to comment.