Skip to content
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

Make rerun-py use an embedded rerun-cli executable #5996

Merged
merged 42 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
272d0e8
Switch python_bridge to depend on re_sdk
jleibs Apr 16, 2024
ae991a0
Launch bundled rerun exe
jleibs Apr 16, 2024
297f5ac
Use re_sdk spawn
jleibs Apr 16, 2024
d46a5ec
fail if rerun bin is missing
jleibs Apr 16, 2024
df39e7e
Use the rerun cli from the target folder if we're running a maturin d…
jleibs Apr 16, 2024
ddd43b0
Don't fail if this is a maturin dev build since we're going to inject…
jleibs Apr 16, 2024
c0d09c3
Helper script to fetch an artifact from gcloud
jleibs Apr 17, 2024
2bdb6fd
Build rerun-cli before building the wheel
jleibs Apr 17, 2024
4a3ae48
Add dep
jleibs Apr 17, 2024
b229e39
Disable the check for the rerun bin
jleibs Apr 17, 2024
957adc3
Proper path to script
jleibs Apr 17, 2024
93faa61
Require rerun bin when building for pypi
jleibs Apr 17, 2024
0c7684a
Also include rerun.exe
jleibs Apr 17, 2024
c7f1d12
Fix sha calculation
jleibs Apr 17, 2024
6134571
disable the check for the rerun bin again
jleibs Apr 17, 2024
c853504
Fix multi-line run invocation
jleibs Apr 17, 2024
42d637f
Use a positive feature instead
jleibs Apr 17, 2024
96cb42d
fix accidental edits
jleibs Apr 17, 2024
315b1ce
Use right CLI args
jleibs Apr 17, 2024
8ee84c0
Make the rerun binary executable after downloading
jleibs Apr 17, 2024
a02a757
lints
jleibs Apr 17, 2024
35a7fa9
Add proper deps for main/mightly/release builds
jleibs Apr 17, 2024
004f5ea
spell
jleibs Apr 17, 2024
91d6681
Check for correct path on windows
jleibs Apr 17, 2024
96fa7b2
python lint issues depending on package version
Wumpf Apr 17, 2024
833de0f
Remove incorrect encoding specification
Wumpf Apr 17, 2024
9cd70e7
Add rerun-build command and depend on it from py-build
jleibs Apr 17, 2024
e7211d2
Merge branch 'andreas/more-nightly-fixes' into jleibs/rerun_viewer_py…
jleibs Apr 17, 2024
4f6239d
Use an environment variable set by maturin to gate the bin check
jleibs Apr 17, 2024
f89f245
Use bash when downloading rerun-cli
jleibs Apr 17, 2024
4323286
Merge branch 'main' into jleibs/rerun_viewer_py_split
jleibs Apr 17, 2024
42cf88a
Merge branch 'main' into jleibs/rerun_viewer_py_split
jleibs Apr 17, 2024
c3654b5
Don't duplicate main
jleibs Apr 17, 2024
db218a5
remove outdated comment
emilk Apr 18, 2024
e899678
Speed up spawn by splitting the shim out to rerun_cli
jleibs Apr 18, 2024
07f6fad
simplify env checking
jleibs Apr 18, 2024
a39387f
Improve error message when rerun is missing
jleibs Apr 18, 2024
8106d1c
Remove redundant connection check
jleibs Apr 18, 2024
e454880
Consolidate wait_for_bind logic in re_sdk::spawn
jleibs Apr 18, 2024
01f68f5
Python CallSource is no longer used
jleibs Apr 18, 2024
243bf8d
Update pixi comments
jleibs Apr 18, 2024
4a95061
fetch-artifact docstring
jleibs Apr 18, 2024
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
204 changes: 102 additions & 102 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,108 @@ jobs:
NIGHTLY: true
secrets: inherit

# -----------------------------------------------------------------------------------
# Build rerun_c library binaries:

build-rerun_c-and-upload-linux-arm64:
needs: [checks]
name: "Linux-Arm64: Build & Upload rerun_c"
uses: ./.github/workflows/reusable_build_and_upload_rerun_c.yml
with:
CONCURRENCY: nightly-linux-arm64
PLATFORM: linux-arm64
secrets: inherit

build-rerun_c-and-upload-linux-x64:
needs: [checks]
name: "Linux-x64: Build & Upload rerun_c"
uses: ./.github/workflows/reusable_build_and_upload_rerun_c.yml
with:
CONCURRENCY: nightly-linux-x64
PLATFORM: linux-x64
secrets: inherit

build-rerun_c-and-upload-macos-x64:
needs: [checks]
name: "Mac-Intel: Build & Upload rerun_c"
uses: ./.github/workflows/reusable_build_and_upload_rerun_c.yml
with:
CONCURRENCY: nightly-macos-x64
PLATFORM: macos-x64
secrets: inherit

build-rerun_c-and-upload-macos-arm64:
needs: [checks]
name: "Mac-Arm64: Build & Upload rerun_c"
uses: ./.github/workflows/reusable_build_and_upload_rerun_c.yml
with:
CONCURRENCY: nightly-macos-arm64
PLATFORM: macos-arm64
secrets: inherit

build-rerun_c-and-upload-windows-x64:
needs: [checks]
name: "Windows-x64: Build & Upload rerun_c"
uses: ./.github/workflows/reusable_build_and_upload_rerun_c.yml
with:
CONCURRENCY: nightly-windows-x64
PLATFORM: windows-x64
secrets: inherit

# -----------------------------------------------------------------------------------
# TODO(emilk): build and test one additional platform, picked at random
emilk marked this conversation as resolved.
Show resolved Hide resolved
# Build rerun-cli (rerun binaries):

build-rerun-cli-and-upload-linux-arm64:
needs: [checks]
name: "Linux-arm64: Build & Upload rerun-cli"
uses: ./.github/workflows/reusable_build_and_upload_rerun_cli.yml
with:
CONCURRENCY: nightly-linux-arm64
PLATFORM: linux-arm64
secrets: inherit

build-rerun-cli-and-upload-linux-x64:
needs: [checks]
name: "Linux-x64: Build & Upload rerun-cli"
uses: ./.github/workflows/reusable_build_and_upload_rerun_cli.yml
with:
CONCURRENCY: nightly-linux-x64
PLATFORM: linux-x64
secrets: inherit

build-rerun-cli-and-upload-macos-x64:
needs: [checks]
name: "Mac-x64: Build & Upload rerun-cli"
uses: ./.github/workflows/reusable_build_and_upload_rerun_cli.yml
with:
CONCURRENCY: nightly-macos-x64
PLATFORM: macos-x64
secrets: inherit

build-rerun-cli-and-upload-macos-arm64:
needs: [checks]
name: "Mac-arm64: Build & Upload rerun-cli"
uses: ./.github/workflows/reusable_build_and_upload_rerun_cli.yml
with:
CONCURRENCY: nightly-macos-arm64
PLATFORM: macos-arm64
secrets: inherit

build-rerun-cli-and-upload-windows-x64:
needs: [checks]
name: "Windows-x64: Build & Upload rerun-cli"
uses: ./.github/workflows/reusable_build_and_upload_rerun_cli.yml
with:
CONCURRENCY: nightly-windows-x64
PLATFORM: windows-x64
secrets: inherit

# ---------------------------------------------------------------------------
# Build wheels:

build-wheel-linux-arm64:
needs: [checks]
needs: [checks, build-rerun-cli-and-upload-linux-arm64]
name: "Linux-arm64: Build & Upload Wheels"
uses: ./.github/workflows/reusable_build_and_upload_wheels.yml
with:
Expand All @@ -89,7 +186,7 @@ jobs:
secrets: inherit

build-wheel-linux-x64:
needs: [checks]
needs: [checks, build-rerun-cli-and-upload-linux-x64]
name: "Linux-x64: Build & Upload Wheels"
uses: ./.github/workflows/reusable_build_and_upload_wheels.yml
with:
Expand All @@ -100,7 +197,7 @@ jobs:
secrets: inherit

build-wheel-macos-arm64:
needs: [checks]
needs: [checks, build-rerun-cli-and-upload-macos-arm64]
name: "Macos-arm64: Build & Upload Wheels"
uses: ./.github/workflows/reusable_build_and_upload_wheels.yml
with:
Expand All @@ -111,7 +208,7 @@ jobs:
secrets: inherit

build-wheel-macos-x64:
needs: [checks]
needs: [checks, build-rerun-cli-and-upload-macos-x64]
name: "Macos-x64: Build & Upload Wheels"
uses: ./.github/workflows/reusable_build_and_upload_wheels.yml
with:
Expand All @@ -122,7 +219,7 @@ jobs:
secrets: inherit

build-wheel-windows-x64:
needs: [checks]
needs: [checks, build-rerun-cli-and-upload-windows-x64]
name: "Windows-x64: Build & Upload Wheels"
uses: ./.github/workflows/reusable_build_and_upload_wheels.yml
with:
Expand Down Expand Up @@ -185,103 +282,6 @@ jobs:
WHEEL_ARTIFACT_NAME: windows-x64-wheel
secrets: inherit

# -----------------------------------------------------------------------------------
# Build rerun_c library binaries:

build-rerun_c-and-upload-linux-arm64:
needs: [checks]
name: "Linux-Arm64: Build & Upload rerun_c"
uses: ./.github/workflows/reusable_build_and_upload_rerun_c.yml
with:
CONCURRENCY: nightly-linux-arm64
PLATFORM: linux-arm64
secrets: inherit

build-rerun_c-and-upload-linux-x64:
needs: [checks]
name: "Linux-x64: Build & Upload rerun_c"
uses: ./.github/workflows/reusable_build_and_upload_rerun_c.yml
with:
CONCURRENCY: nightly-linux-x64
PLATFORM: linux-x64
secrets: inherit

build-rerun_c-and-upload-macos-x64:
needs: [checks]
name: "Mac-Intel: Build & Upload rerun_c"
uses: ./.github/workflows/reusable_build_and_upload_rerun_c.yml
with:
CONCURRENCY: nightly-macos-x64
PLATFORM: macos-x64
secrets: inherit

build-rerun_c-and-upload-macos-arm64:
needs: [checks]
name: "Mac-Arm64: Build & Upload rerun_c"
uses: ./.github/workflows/reusable_build_and_upload_rerun_c.yml
with:
CONCURRENCY: nightly-macos-arm64
PLATFORM: macos-arm64
secrets: inherit

build-rerun_c-and-upload-windows-x64:
needs: [checks]
name: "Windows-x64: Build & Upload rerun_c"
uses: ./.github/workflows/reusable_build_and_upload_rerun_c.yml
with:
CONCURRENCY: nightly-windows-x64
PLATFORM: windows-x64
secrets: inherit

# -----------------------------------------------------------------------------------
# TODO(emilk): build and test one additional platorm, picked at random
# Build rerun-cli (rerun binaries):

build-rerun-cli-and-upload-linux-arm64:
needs: [checks]
name: "Linux-arm64: Build & Upload rerun-cli"
uses: ./.github/workflows/reusable_build_and_upload_rerun_cli.yml
with:
CONCURRENCY: nightly-linux-arm64
PLATFORM: linux-arm64
secrets: inherit

build-rerun-cli-and-upload-linux-x64:
needs: [checks]
name: "Linux-x64: Build & Upload rerun-cli"
uses: ./.github/workflows/reusable_build_and_upload_rerun_cli.yml
with:
CONCURRENCY: nightly-linux-x64
PLATFORM: linux-x64
secrets: inherit

build-rerun-cli-and-upload-macos-x64:
needs: [checks]
name: "Mac-x64: Build & Upload rerun-cli"
uses: ./.github/workflows/reusable_build_and_upload_rerun_cli.yml
with:
CONCURRENCY: nightly-macos-x64
PLATFORM: macos-x64
secrets: inherit

build-rerun-cli-and-upload-macos-arm64:
needs: [checks]
name: "Mac-arm64: Build & Upload rerun-cli"
uses: ./.github/workflows/reusable_build_and_upload_rerun_cli.yml
with:
CONCURRENCY: nightly-macos-arm64
PLATFORM: macos-arm64
secrets: inherit

build-rerun-cli-and-upload-windows-x64:
needs: [checks]
name: "Windows-x64: Build & Upload rerun-cli"
uses: ./.github/workflows/reusable_build_and_upload_rerun_cli.yml
with:
CONCURRENCY: nightly-windows-x64
PLATFORM: windows-x64
secrets: inherit

# ---------------------------------------------------------------------------

run-notebook:
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/on_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,19 @@ jobs:
FULL: "true"
secrets: inherit

min-cli-build:
name: "Minimum CLI Build"
uses: ./.github/workflows/reusable_build_and_upload_rerun_cli.yml
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
PLATFORM: linux-x64
secrets: inherit

# Build and test a single wheel to limit CI cost. We use linux-x64 because it's fast. linux-arm64 would also be a good
# choice, but reusable_test_wheels.yml is broken for that target (https://github.com/rerun-io/rerun/issues/5525)
min-wheel-build:
name: "Minimum Wheel Build"
needs: [python-paths-filter, rust-paths-filter]
needs: [min-cli-build, python-paths-filter, rust-paths-filter]
if: github.event.pull_request.head.repo.owner.login == 'rerun-io' && (needs.python-paths-filter.outputs.python_changes == 'true' || needs.rust-paths-filter.outputs.rust_changes == 'true')
uses: ./.github/workflows/reusable_build_and_upload_wheels.yml
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/on_push_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
secrets: inherit

# -----------------------------------------------------------------------------------
# TODO(emilk): build and test one additional platorm, picked at random
# TODO(emilk): build and test one additional platform, picked at random

build-rerun_c-and-upload-linux-x64:
needs: [checks]
Expand All @@ -112,7 +112,7 @@ jobs:
secrets: inherit

# -----------------------------------------------------------------------------------
# TODO(emilk): build and test one additional platorm, picked at random
# TODO(emilk): build and test one additional platform, picked at random

build-rerun-cli-and-upload-linux-x64:
needs: [checks]
Expand All @@ -124,10 +124,10 @@ jobs:
secrets: inherit

# -----------------------------------------------------------------------------------
# TODO(emilk): build and test one additional platorm, picked at random
# TODO(emilk): build and test one additional platform, picked at random

build-wheel-linux-x64:
needs: [checks]
needs: [checks, build-rerun-cli-and-upload-linux-x64]
name: "Linux-x64: Build & Upload Wheels"
uses: ./.github/workflows/reusable_build_and_upload_wheels.yml
with:
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,46 +223,46 @@ jobs:
RELEASE_COMMIT: ${{ needs.version.outputs.release-commit }}
secrets: inherit

publish-wheels:
name: "Build and Publish Wheels"
publish-rerun_c:
name: "Build and Publish rerun_c"
needs: [version]
uses: ./.github/workflows/reusable_publish_wheels.yml
uses: ./.github/workflows/reusable_publish_rerun_c.yml
with:
release-version: ${{ needs.version.outputs.current }}
concurrency: ${{ github.ref_name }}
release-commit: ${{ needs.version.outputs.release-commit }}
concurrency: ${{ github.ref_name }}
secrets: inherit

publish-web:
name: "Build and Publish Web"
needs: [version, publish-wheels]
uses: ./.github/workflows/reusable_publish_web.yml
publish-rerun-cli:
name: "Publish rerun-cli"
needs: [version]
uses: ./.github/workflows/reusable_publish_rerun_cli.yml
with:
release-version: ${{ needs.version.outputs.current }}
release-commit: ${{ needs.version.outputs.release-commit }}
concurrency: ${{ github.ref_name }}
wheel-artifact-name: linux-x64-wheel
update-latest: ${{ inputs.release-type == 'final' }}
secrets: inherit

publish-rerun_c:
name: "Build and Publish rerun_c"
needs: [version]
uses: ./.github/workflows/reusable_publish_rerun_c.yml
publish-wheels:
name: "Build and Publish Wheels"
needs: [version, publish-rerun-cli]
uses: ./.github/workflows/reusable_publish_wheels.yml
with:
release-version: ${{ needs.version.outputs.current }}
release-commit: ${{ needs.version.outputs.release-commit }}
concurrency: ${{ github.ref_name }}
release-commit: ${{ needs.version.outputs.release-commit }}
secrets: inherit

publish-rerun-cli:
name: "Publish rerun-cli"
needs: [version]
uses: ./.github/workflows/reusable_publish_rerun_cli.yml
publish-web:
name: "Build and Publish Web"
needs: [version, publish-wheels]
uses: ./.github/workflows/reusable_publish_web.yml
with:
release-version: ${{ needs.version.outputs.current }}
release-commit: ${{ needs.version.outputs.release-commit }}
concurrency: ${{ github.ref_name }}
wheel-artifact-name: linux-x64-wheel
update-latest: ${{ inputs.release-type == 'final' }}
secrets: inherit

publish-js:
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/reusable_build_and_upload_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,17 @@ jobs:
- name: Get sha
id: get-sha
run: |
full_commit="${{ inputs.RELEASE_COMMIT || ((github.event_name == 'pull_request' && github.event.pull_request.head.ref) || github.sha) }}"
full_commit="${{ inputs.RELEASE_COMMIT || ((github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.sha) }}"
echo "sha=$(echo $full_commit | cut -c1-7)" >> "$GITHUB_OUTPUT"

- name: "Download rerun-cli"
run: |
pixi run fetch-artifact \
--commit-sha ${{ steps.get-sha.outputs.sha }} \
--artifact rerun-cli \
--platform ${{ inputs.PLATFORM }} \
--dest rerun_py/rerun_sdk/bin

- name: Build
run: |
pixi run python scripts/ci/build_and_upload_wheels.py \
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading