-
Notifications
You must be signed in to change notification settings - Fork 373
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
Use pixi over setup scripts on CI + local dev #4302
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
4bbbe7e
ensure toolchain is installed on ci_docker
jprochazk 06f16dc
remove `setup_web.sh` usage from `ci_docker`
jprochazk 0c08660
delete `start_server.sh`
jprochazk b9b7931
add `binaryen` for `wasm-opt`
jprochazk af79d20
add `nox` (without `pipx`)
jprochazk 1708155
remove usage of `pngcrush`
jprochazk bf438fd
add lib deps from `setup_dev.sh` to `troubleshooting.md`
jprochazk 00b8e01
fix lint
jprochazk 54667b6
remove `setup_web.sh` usage from build/upload rerun-cli
jprochazk 8d8bccc
Merge branch 'main' into jan/obliterate-setup-scripts
jprochazk c72ba35
update cspell
jprochazk a61d65a
caching is slow
jprochazk b8f8350
use pixi to build rerun-cli
jprochazk 42daff3
remove unused task
jprochazk f55bb22
fix get-sha jobs to use pr head ref
jprochazk 4df2c73
use pixi to build wheel
jprochazk e303b48
build rerun cli by calling cargo directly via pixi
jprochazk 0b6cc92
don't cache pixi anywhere
jprochazk 2670bc0
i don't know bash
jprochazk 57c9f32
test `pixi run` in `build_web_demo`
jprochazk a24f75a
use pixi in publish web
jprochazk 110a569
reduce the number of dependencies installed in `build-web-demo`
jprochazk 13f888e
remove `source_link_commit_override` in favor of `get-sha` step
jprochazk 29d8ca5
upgrade `timm` to fix python3.11 compatibility
jprochazk 472fd7d
Merge branch 'main' into jan/obliterate-setup-scripts
jprochazk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -287,7 +287,6 @@ jobs: | |
- uses: prefix-dev/[email protected] | ||
with: | ||
pixi-version: v0.6.0 | ||
cache: true | ||
|
||
# TODO(emilk): make this work somehow. Right now this just results in | ||
# > Compiler: GNU 12.3.0 (/__w/rerun/rerun/.pixi/env/bin/x86_64-conda-linux-gnu-c++) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,56 +135,20 @@ jobs: | |
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }} | ||
targets: ${{ needs.set-config.outputs.TARGET }} | ||
|
||
# The pip-cache setup logic doesn't work in the ubuntu docker container | ||
# That's probably fine since we bake these deps into the container already | ||
- name: Setup python | ||
if: ${{ inputs.PLATFORM != 'linux' }} | ||
uses: actions/setup-python@v4 | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
cache: "pip" | ||
cache-dependency-path: "scripts/ci/requirements.txt" | ||
|
||
# These should already be in the docker container, but run for good measure. A no-op install | ||
# should be fast, and this way things don't break if we add new packages without rebuilding | ||
# docker | ||
- run: pip install -r scripts/ci/requirements.txt | ||
|
||
# We have a nice script for that: ./scripts/setup_web.sh | ||
# Unfortunately, we can't run that on Windows, because Windows doesn't come with | ||
# a package manager like grown-up OSes do (at least not the CI version of Windows). | ||
# Also we can't run it on linux because the 20.04 Docker container will install | ||
# an old version of binaryen/wasm-opt that barfs on the `--fast-math` flag | ||
# So we only run the script on macos, and then on Windows we do the parts of the script manually. | ||
# On ubuntu, the correct packages are pre-installed in our docker container. | ||
|
||
- name: Install prerequisites for building the web-viewer Wasm (non-Windows) | ||
if: (inputs.PLATFORM == 'macos-intel') || (inputs.PLATFORM == 'macos-arm') | ||
shell: bash | ||
run: ./scripts/setup_web.sh | ||
pixi-version: v0.6.0 | ||
|
||
# The first steps of setup_web.sh, for Windows: | ||
- name: Install wasm32 cargo target for building the web-viewer Wasm on windows | ||
if: inputs.PLATFORM == 'windows' | ||
- name: Build rerun-cli | ||
shell: bash | ||
run: rustup target add wasm32-unknown-unknown | ||
|
||
# The last step of setup_web.sh, for Windows. | ||
# Since 'winget' is not available within the GitHub runner, we download the package directly: | ||
# See: https://github.com/marketplace/actions/engineerd-configurator | ||
- name: Install binaryen for building the web-viewer Wasm on windows | ||
if: inputs.PLATFORM == 'windows' | ||
uses: engineerd/[email protected] | ||
with: | ||
name: "wasm-opt.exe" | ||
url: "https://github.com/WebAssembly/binaryen/releases/download/version_111/binaryen-version_111-x86_64-windows.tar.gz" | ||
pathInArchive: "binaryen-version_111/bin/wasm-opt.exe" | ||
|
||
- name: Build rerun-cli (release) | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --locked -p rerun-cli --no-default-features --features native_viewer,web_viewer --release --target ${{ needs.set-config.outputs.TARGET }} | ||
run: | | ||
pixi run cargo build \ | ||
--locked \ | ||
-p rerun-cli \ | ||
--no-default-features \ | ||
--features native_viewer,web_viewer \ | ||
--release \ | ||
--target ${{ needs.set-config.outputs.TARGET }} | ||
|
||
- id: "auth" | ||
uses: google-github-actions/auth@v1 | ||
|
@@ -196,7 +160,8 @@ jobs: | |
id: get-sha | ||
shell: bash | ||
run: | | ||
echo "sha=$(echo ${{ inputs.RELEASE_COMMIT || github.sha }} | cut -c1-7)" >> "$GITHUB_OUTPUT" | ||
full_commit="${{ inputs.RELEASE_COMMIT || ((github.event_name == 'pull_request' && github.event.pull_request.head.ref) || github.sha) }}" | ||
echo "sha=$(echo $full_commit | cut -c1-7)" >> "$GITHUB_OUTPUT" | ||
|
||
- name: "Upload rerun-cli (commit)" | ||
uses: google-github-actions/upload-cloud-storage@v1 | ||
|
@@ -212,3 +177,4 @@ jobs: | |
path: "./target/${{ needs.set-config.outputs.TARGET }}/release/${{ needs.set-config.outputs.BIN_NAME }}" | ||
destination: "rerun-builds/adhoc/${{inputs.ADHOC_NAME}}/rerun-cli/${{ inputs.PLATFORM }}" | ||
parent: false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,12 +9,6 @@ on: | |
WHEEL_ARTIFACT_NAME: | ||
required: true | ||
type: string | ||
# Each example in the built app contains a link to its source code. | ||
# This determines the target commit to link to, and by default | ||
# it is the current commit (github.sha) | ||
SOURCE_LINK_COMMIT_OVERRIDE: | ||
required: false | ||
type: string | ||
|
||
concurrency: | ||
group: ${{ inputs.CONCURRENCY }}-build-web-demo | ||
|
@@ -59,39 +53,37 @@ jobs: | |
name: ${{ inputs.WHEEL_ARTIFACT_NAME }} | ||
path: wheel | ||
|
||
- name: Install dependencies for examples/python | ||
run: | | ||
pip install -r scripts/ci/requirements.txt | ||
pip install -r scripts/ci/requirements-web-demo.txt | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
pixi-version: v0.6.0 | ||
|
||
- name: Install built wheel | ||
- name: Install Python dependencies and wheel | ||
shell: bash | ||
run: | | ||
pip uninstall rerun-sdk -y | ||
pip install deprecated numpy>=1.23 pyarrow==10.0.1 pytest==7.1.2 | ||
pip install rerun-sdk --no-index --find-links wheel | ||
pixi run pip install -r scripts/ci/requirements-web-demo.txt | ||
pixi run pip uninstall rerun-sdk -y | ||
pixi run pip install deprecated numpy>=1.23 pyarrow==10.0.1 pytest==7.1.2 | ||
pixi run pip install rerun-sdk --no-index --find-links wheel | ||
|
||
- name: Verify built wheel version | ||
shell: bash | ||
run: | | ||
python3 -m rerun --version | ||
which rerun | ||
rerun --version | ||
pixi run python3 -m rerun --version | ||
pixi run which rerun | ||
pixi run rerun --version | ||
|
||
- name: Resolve source link commit hash | ||
- name: Get sha | ||
id: get-sha | ||
shell: bash | ||
run: | | ||
if [ -z "${{ inputs.SOURCE_LINK_COMMIT_OVERRIDE }}" ]; then | ||
USED_SHA=${{ github.sha }} | ||
else | ||
USED_SHA=${{ inputs.SOURCE_LINK_COMMIT_OVERRIDE }} | ||
fi | ||
echo "SHORT_SHA=$(echo $USED_SHA | cut -c1-7)" >> $GITHUB_ENV | ||
full_commit="${{ (github.event_name == 'pull_request' && github.event.pull_request.head.ref) || github.sha }}" | ||
echo "sha=$(echo $full_commit | cut -c1-7)" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Build web demo | ||
env: | ||
COMMIT_HASH: ${{ env.SHORT_SHA }} | ||
COMMIT_HASH: ${{ steps.get-sha.outputs.sha }} | ||
run: | | ||
python3 scripts/ci/build_demo_app.py --skip-build | ||
pixi run python3 scripts/ci/build_demo_app.py --skip-build | ||
|
||
- name: Upload web demo assets | ||
uses: actions/upload-artifact@v3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,64 +123,20 @@ jobs: | |
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }} | ||
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }} | ||
|
||
# The pip-cache setup logic doesn't work in the ubuntu docker container | ||
# That's probably fine since we bake these deps into the container already | ||
- name: Setup python | ||
if: ${{ inputs.PLATFORM != 'linux' }} | ||
uses: actions/setup-python@v4 | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
cache: "pip" | ||
cache-dependency-path: "scripts/ci/requirements.txt" | ||
|
||
# These should already be in the docker container, but run for good measure. A no-op install | ||
# should be fast, and this way things don't break if we add new packages without rebuilding | ||
# docker | ||
- run: pip install -r scripts/ci/requirements.txt | ||
|
||
# We have a nice script for that: ./scripts/setup_web.sh | ||
# Unfortunately, we can't run that on Windows, because Windows doesn't come with | ||
# a package manager like grown-up OSes do (at least not the CI version of Windows). | ||
# Also we can't run it on linux because the 20.04 Docker container will install | ||
# an old version of binaryen/wasm-opt that barfs on the `--fast-math` flag | ||
# So we only run the script on macos, and then on Windows we do the parts of the script manually. | ||
# On ubuntu, the correct packages are pre-installed in our docker container. | ||
|
||
- name: Install prerequisites for building the web-viewer Wasm (non-Windows) | ||
if: (inputs.PLATFORM == 'macos-intel') || (inputs.PLATFORM == 'macos-arm') | ||
shell: bash | ||
run: ./scripts/setup_web.sh | ||
|
||
# The first steps of setup_web.sh, for Windows: | ||
- name: Install wasm32 cargo target for building the web-viewer Wasm on windows | ||
if: inputs.PLATFORM == 'windows' | ||
shell: bash | ||
run: rustup target add wasm32-unknown-unknown | ||
|
||
# The last step of setup_web.sh, for Windows. | ||
# Since 'winget' is not available within the GitHub runner, we download the package directly: | ||
# See: https://github.com/marketplace/actions/engineerd-configurator | ||
- name: Install binaryen for building the web-viewer Wasm on windows | ||
if: inputs.PLATFORM == 'windows' | ||
uses: engineerd/[email protected] | ||
with: | ||
name: "wasm-opt.exe" | ||
url: "https://github.com/WebAssembly/binaryen/releases/download/version_111/binaryen-version_111-x86_64-windows.tar.gz" | ||
pathInArchive: "binaryen-version_111/bin/wasm-opt.exe" | ||
pixi-version: v0.6.0 | ||
|
||
- name: Build Wheel | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
maturin-version: "0.14.17" | ||
manylinux: manylinux_2_31 | ||
container: off | ||
command: build | ||
args: | | ||
--manifest-path rerun_py/Cargo.toml | ||
--release | ||
--target ${{ needs.set-config.outputs.TARGET }} | ||
run: | | ||
pixi run pip install -r rerun_py/requirements-build.txt | ||
pixi run maturin build \ | ||
--manylinux 2_31 \ | ||
--release \ | ||
--manifest-path rerun_py/Cargo.toml \ | ||
--target ${{ needs.set-config.outputs.TARGET }} \ | ||
--out dist \ | ||
${{ inputs.MATURIN_FEATURE_FLAGS }} | ||
--out dist | ||
|
||
- name: Save wheel artifact | ||
if: ${{ inputs.WHEEL_ARTIFACT_NAME != '' }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,7 +73,6 @@ jobs: | |
- uses: prefix-dev/[email protected] | ||
with: | ||
pixi-version: v0.6.0 | ||
cache: true | ||
|
||
- name: Set up Rust | ||
uses: ./.github/actions/setup-rust | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -191,7 +191,6 @@ jobs: | |
- uses: prefix-dev/[email protected] | ||
with: | ||
pixi-version: v0.6.0 | ||
cache: true | ||
|
||
- name: Doxygen C++ docs | ||
run: pixi run cpp-docs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,8 +74,9 @@ jobs: | |
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }} | ||
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }} | ||
|
||
- name: Install Python CI dependencies | ||
run: pip install -r scripts/ci/requirements.txt | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
pixi-version: v0.6.0 | ||
|
||
# built by `reusable_build_and_publish_wheels` | ||
- name: Download Wheel | ||
|
@@ -90,40 +91,31 @@ jobs: | |
name: ${{ inputs.rrd-artifact-name }} | ||
path: rrd | ||
|
||
- name: Install dependencies for examples/python | ||
run: | | ||
pip install -r scripts/ci/requirements.txt | ||
pip install -r scripts/ci/requirements-web-demo.txt | ||
|
||
- name: Install built wheel | ||
- name: Install Python dependencies and wheel | ||
shell: bash | ||
run: | | ||
pip uninstall rerun-sdk -y | ||
pip install deprecated numpy>=1.23 pyarrow==10.0.1 pytest==7.1.2 | ||
pip install rerun-sdk --no-index --find-links wheel | ||
pixi run pip install -r scripts/ci/requirements.txt | ||
pixi run pip install -r scripts/ci/requirements-web-demo.txt | ||
pixi run pip uninstall rerun-sdk -y | ||
pixi run pip install deprecated numpy>=1.23 pyarrow==10.0.1 pytest==7.1.2 | ||
pixi run pip install rerun-sdk --no-index --find-links wheel | ||
|
||
- name: Installed wheel version | ||
shell: bash | ||
run: | | ||
python3 -m rerun --version | ||
which rerun | ||
rerun --version | ||
|
||
- name: Install Wasm tools | ||
shell: bash | ||
run: ./scripts/setup_web.sh | ||
pixi run python3 -m rerun --version | ||
pixi run which rerun | ||
pixi run rerun --version | ||
|
||
- name: Build app.rerun.io | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: run | ||
args: --locked -p re_build_web_viewer -- --release | ||
run: | | ||
pixi run cargo run --locked -p re_build_web_viewer -- --release | ||
|
||
- name: Build web demo | ||
env: | ||
COMMIT_HASH: ${{ needs.get-commit-sha.outputs.short-sha }} | ||
run: | | ||
python3 scripts/ci/build_demo_app.py --skip-build | ||
pixi run python3 scripts/ci/build_demo_app.py --skip-build | ||
|
||
- name: Upload .rrd for app.rerun.io | ||
uses: google-github-actions/upload-cloud-storage@v1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
what did this do and why don't we want it anymore? :)
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.
It builds a ~600 MB cache that takes 4 minutes to save. I'm not really sure why, but everything is still fast woithout it.