From cd7f132c9cd8b8fe9e71ffadf43cf946744e0ecc Mon Sep 17 00:00:00 2001 From: John Hughes Date: Thu, 9 Feb 2023 14:16:10 +0100 Subject: [PATCH] Fold the RRD creation step into each individual build --- .github/workflows/python.yml | 95 ++++++++++++------------------------ 1 file changed, 30 insertions(+), 65 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index b275e0e3d506..f36b44c6d140 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -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/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 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] @@ -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 @@ -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] @@ -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 @@ -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 @@ -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