Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 141 additions & 0 deletions .github/workflows/build-viewer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: Build Interactive Viewer

on:
push:
branches: [main, dev]
tags: ['v*']
pull_request:
branches: [main, dev]

jobs:
build-linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.92.0

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libgtk-3-dev \
libxcb-render0-dev \
libxcb-shape0-dev \
libxcb-xfixes0-dev \
libxkbcommon-dev \
libvulkan-dev \
mesa-vulkan-drivers \
xvfb \
libxkbcommon-x11-0

- name: Cache cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Build custom_callback viewer
run: |
cd rerun
cargo build --release -p custom_callback

- name: Run tests
run: |
cd rerun
cargo test -p custom_callback

# Python bridge tests
cd ../engineering/DIM-643/python_bridge
python3 test_bridge_bincode.py

# DimOS integration tests
cd ../dimos_integration
python3 test_rerun_interaction_module.py

- name: Package binary
run: |
cd rerun/target/release
strip custom_callback_viewer
tar -czf dimos-viewer-${{ github.ref_name }}-linux-x64.tar.gz \
custom_callback_viewer

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: dimos-viewer-linux-x64
path: rerun/target/release/dimos-viewer-*.tar.gz

build-macos:
runs-on: macos-14 # arm64
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.92.0

- name: Cache cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Build custom_callback viewer
run: |
cd rerun
cargo build --release -p custom_callback

- name: Run tests
run: |
cd rerun
cargo test -p custom_callback

- name: Package binary
run: |
cd rerun/target/release
strip custom_callback_viewer
tar -czf dimos-viewer-${{ github.ref_name }}-macos-arm64.tar.gz \
custom_callback_viewer

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: dimos-viewer-macos-arm64
path: rerun/target/release/dimos-viewer-*.tar.gz

release:
needs: [build-linux, build-macos]
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
dimos-viewer-linux-x64/dimos-viewer-*.tar.gz
dimos-viewer-macos-arm64/dimos-viewer-*.tar.gz
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading
Loading