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

Fix pixified builds #4319

Merged
merged 2 commits into from
Nov 23, 2023
Merged
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
2 changes: 2 additions & 0 deletions .github/workflows/auto_approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ jobs:
python3 -m pip install "PyGithub==1.59.0" "requests>=2.31,<3"

- name: Wait a few seconds
shell: bash
run: |
# Give GitHub a bit of time to synchronize everything
sleep 5s

- name: Approve workflow runs
shell: bash
run: |
python3 scripts/ci/approve_workflow_runs.py \
--github-token "${{ secrets.GITHUB_TOKEN }}" \
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/auto_release_crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@ jobs:
uses: actions/checkout@v4

- name: Install dependencies
shell: bash
run: |
python3 -m pip install -r scripts/ci/requirements.txt

- name: Update crate versions
shell: bash
run: |
python3 scripts/ci/crates.py version --bump prerelease

- name: Get bumped version
id: versioning
shell: bash
run: |
crate_version=$(python3 scripts/ci/crates.py get-version)
echo "crate_version=$crate_version" >> "$GITHUB_OUTPUT"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/checkboxes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ jobs:
python-version: 3.11

- name: Install deps
shell: bash
run: |
python3 -m pip install -r ./scripts/ci/requirements.txt

- name: Check PR checkboxes
shell: bash
run: |
./scripts/ci/check_pr_checkboxes.py \
--github-token ${{ secrets.GITHUB_TOKEN }} \
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/contrib_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,18 @@ jobs:
python-version: "3.11"

- name: Install Python dependencies
shell: bash
run: |
pip install --upgrade pip
pip install -r rerun_py/requirements-lint.txt

- name: Lint Python
shell: bash
run: |
just py-lint

- name: Check requirements
shell: bash
run: |
just py-requirements

Expand All @@ -69,11 +72,13 @@ jobs:
python-version: "3.8"

- name: Install Python dependencies
shell: bash
run: |
pip install --upgrade pip
pip install -r rerun_py/requirements-doc.txt

- name: Build via mkdocs
shell: bash
run: |
mkdocs build --strict -f rerun_py/mkdocs.yml

Expand All @@ -90,6 +95,7 @@ jobs:

# So we can format the Python code
- name: Set up Python
shell: bash
run: |
pip install -r rerun_py/requirements-lint.txt

Expand Down Expand Up @@ -179,6 +185,7 @@ jobs:
- uses: actions/checkout@v4

- name: clippy check re_viewer wasm32
shell: bash
run: ./scripts/clippy_wasm.sh

- name: Check re_renderer examples wasm32
Expand All @@ -205,6 +212,7 @@ jobs:
tool: taplo-cli

- name: Taplo check
shell: bash
run: |
taplo fmt --check --diff

Expand All @@ -220,23 +228,28 @@ jobs:
python-version: "3.8"

- name: Install dependencies
shell: bash
run: |
pip install gitignore_parser python-frontmatter
pip install -r ./scripts/ci/requirements.txt

- name: Rerun lints
shell: bash
run: |
./scripts/lint.py

- name: Check for too large files
shell: bash
run: |
./scripts/ci/check_large_files.sh

- name: Check Python example requirements
shell: bash
run: |
./scripts/ci/check_requirements.py

- name: Check Python example thumbnails
shell: bash
run: |
./scripts/ci/thumbnails.py check

Expand Down Expand Up @@ -304,3 +317,4 @@ jobs:
pixi run cpp-clean
RERUN_WERROR=ON RERUN_USE_ASAN=ON CXX=g++ pixi run cpp-build-all
RERUN_WERROR=ON RERUN_USE_ASAN=ON CXX=g++ pixi run cpp-test

1 change: 1 addition & 0 deletions .github/workflows/contrib_rerun_py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
# 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
shell: bash

- name: Build Wheel
uses: PyO3/maturin-action@v1
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/on_pull_request_target_contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ jobs:
python-version: 3.11

- name: Install deps
shell: bash
run: |
python3 -m pip install -r ./scripts/ci/requirements.txt

- name: Update PR description
shell: bash
run: |
./scripts/ci/update_pr_body.py \
--github-token '${{ secrets.GITHUB_TOKEN }}' \
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/on_push_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2

- name: cargo build -p rerun
run: cargo build -p rerun
- run: cargo build -p rerun
shell: bash

benches:
name: Benchmarks
Expand Down Expand Up @@ -326,6 +326,7 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: Add SHORT_SHA env property with commit short sha
shell: bash
run: echo "SHORT_SHA=`echo ${{github.sha}} | cut -c1-7`" >> $GITHUB_ENV

# First delete the old prerelease. If we don't do this, we don't get things like
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ jobs:
python-version: 3.11

- name: Install deps
shell: bash
run: |
python3 -m pip install -r ./scripts/ci/requirements-crates.txt

Expand All @@ -94,6 +95,7 @@ jobs:

- name: Update crate versions
id: versioning
shell: bash
run: |

echo "release_version: $release_version"
Expand Down Expand Up @@ -135,15 +137,17 @@ jobs:
echo "final=$final" >> "$GITHUB_OUTPUT"

- name: Update NPM versions
shell: bash
run: |
node rerun_js/web-viewer/scripts/version.mjs ${{ steps.versioning.outputs.current }}

- name: "Taplo fmt"
run: taplo fmt
- run: taplo fmt
shell: bash

- name: Commit new version
id: commit
if: steps.versioning.outputs.previous != steps.versioning.outputs.current
shell: bash
run: |
git pull
git config --global user.name "rerun-bot"
Expand All @@ -155,6 +159,7 @@ jobs:
- name: Create pull request
env:
GH_TOKEN: ${{ secrets.RERUN_BOT_TOKEN }}
shell: bash
run: |
set +e
pr=$(gh pr view --json headRefName 2>/dev/null || echo "{}")
Expand Down Expand Up @@ -287,6 +292,7 @@ jobs:
ref: ${{ needs.version.outputs.release-commit }}

- name: Update latest branch
shell: bash
run: |
git fetch
git checkout ${{ github.ref_name }}
Expand Down Expand Up @@ -323,6 +329,7 @@ jobs:
python-version: 3.11

- name: Install dependencies
shell: bash
run: |
python3 -m pip install -r scripts/ci/requirements-crates.txt

Expand All @@ -333,18 +340,21 @@ jobs:

- name: Update version
id: update-version
shell: bash
run: |
python3 scripts/ci/crates.py version --bump auto
echo "version=$(python3 scripts/ci/crates.py get-version)" >> "$GITHUB_OUTPUT"

- name: Update NPM versions
shell: bash
run: |
node rerun_js/web-viewer/scripts/version.mjs ${{ steps.update-version.outputs.version }}

- name: "Taplo fmt"
run: taplo fmt
- run: taplo fmt
shell: bash

- name: Commit new version
shell: bash
run: |
git config --global user.name "rerun-bot"
git config --global user.email "[email protected]"
Expand Down Expand Up @@ -375,6 +385,7 @@ jobs:
- name: Create comment
env:
GH_TOKEN: ${{ secrets.RERUN_BOT_TOKEN }}
shell: bash
run: |
pr_number=$(gh pr view --json number | jq '.number')
echo "pr_number: $pr_number"
Expand Down Expand Up @@ -415,3 +426,4 @@ jobs:
EOF

gh pr comment $pr_number --body-file comment-body.txt

5 changes: 5 additions & 0 deletions .github/workflows/reusable_bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}

- name: Add SHORT_SHA env property with commit short sha
shell: bash
run: echo "SHORT_SHA=`echo ${{github.sha}} | cut -c1-7`" >> $GITHUB_ENV

- name: Run benchmark
Expand Down Expand Up @@ -99,12 +100,14 @@ jobs:

- name: Download comparison bench from GCS
if: ${{ inputs.COMPARE_TO != '' }}
shell: bash
run: |
mkdir /tmp/compare/
gsutil cp gs://rerun-builds/benches/${{inputs.COMPARE_TO}} /tmp/compare/${{ inputs.COMPARE_TO }}

- name: Compare results with benchcmp
if: ${{ inputs.COMPARE_TO != '' }}
shell: bash
run: cargo benchcmp /tmp/compare/${{ inputs.COMPARE_TO }} /tmp/${{ env.SHORT_SHA }} > /tmp/bench_results.txt

- name: "Upload bench-results to GCS"
Expand All @@ -116,6 +119,7 @@ jobs:

- name: "Copy bench to named file"
if: ${{ inputs.BENCH_NAME != '' }}
shell: bash
run: cp /tmp/${{ env.SHORT_SHA }} /tmp/${{ inputs.BENCH_NAME }}

# Don't upload the new named bench until the end in case the names are the same
Expand Down Expand Up @@ -147,6 +151,7 @@ jobs:

- name: Render benchmark result
if: github.ref == 'refs/heads/main'
shell: bash
run: |
python3 -m pip install google-cloud-storage==2.9.0
scripts/ci/render_bench.py crates \
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/reusable_build_and_upload_rerun_c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
steps:
- name: Set runner and target based on platform
id: set-config
shell: bash
run: |
case "${{ inputs.PLATFORM }}" in
linux)
Expand Down Expand Up @@ -107,6 +108,7 @@ jobs:
container: ${{ fromJson(needs.set-config.outputs.CONTAINER) }}
steps:
- name: Show context
shell: bash
run: |
echo "GITHUB_CONTEXT": $GITHUB_CONTEXT
echo "JOB_CONTEXT": $JOB_CONTEXT
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/reusable_build_and_upload_rerun_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
steps:
- name: Set runner and target based on platform
id: set-config
shell: bash
run: |
case "${{ inputs.PLATFORM }}" in
linux)
Expand Down Expand Up @@ -111,6 +112,7 @@ jobs:

steps:
- name: Show context
shell: bash
run: |
echo "GITHUB_CONTEXT": $GITHUB_CONTEXT
echo "JOB_CONTEXT": $JOB_CONTEXT
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/reusable_build_npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: "20.x"

- name: Set up Rust
uses: ./.github/actions/setup-rust
Expand All @@ -51,10 +51,10 @@ jobs:
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}

- name: Install dependencies
run: |
node rerun_js/web-viewer/scripts/install.mjs
shell: bash
run: node rerun_js/web-viewer/scripts/install.mjs

- name: Build package
run: |
node rerun_js/web-viewer/scripts/build.mjs
shell: bash
run: node rerun_js/web-viewer/scripts/build.mjs

1 change: 1 addition & 0 deletions .github/workflows/reusable_build_web_demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
- name: Build web demo
env:
COMMIT_HASH: ${{ steps.get-sha.outputs.sha }}
shell: bash
run: |
pixi run python3 scripts/ci/build_demo_app.py --skip-build

Expand Down
Loading
Loading