name: Reusable Build and Test Wheels (contrib) on: workflow_call: inputs: CONCURRENCY: required: true type: string MATURIN_FEATURE_FLAGS: required: false type: string default: "--no-default-features --features pypi" concurrency: group: ${{ inputs.CONCURRENCY }}-build-wheels cancel-in-progress: true env: PYTHON_VERSION: "3.10" RUSTFLAGS: --deny warnings RUSTDOCFLAGS: --deny warnings # Do *not* use sscache since on contributor ci we don't have access to the gcloud stored cache. #RUSTC_WRAPPER: "sccache" # Not only `sccache` cannot cache incremental builds, it's counter-productive to generate all # these incremental artifacts when running on CI. CARGO_INCREMENTAL: "0" defaults: run: shell: bash --noprofile --norc -euo pipefail {0} permissions: contents: "read" packages: "read" jobs: build-wheels: name: Build Wheels runs-on: ubuntu-latest-16-cores timeout-minutes: 60 container: image: ghcr.io/rerun-io/ci_docker:0.18.0 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v4 with: lfs: true - uses: prefix-dev/setup-pixi@v0.10.0 with: pixi-version: v0.71.3 - name: Build rerun-cli run: | pixi run rerun-build-native-and-web-release - name: Copy rerun-cli to wheel folder run: | cp target/release/rerun rerun_py/rerun_sdk/rerun_cli - name: Build the wheel run: | pixi run uvpy scripts/ci/build_and_upload_wheels.py \ --mode pr \ --target x86_64-unknown-linux-gnu \ --dir unused \ --compat manylinux_2_28 - name: Install built wheel run: | pixi run python scripts/ci/uv_install_wheel.py --package rerun-sdk --dir dist/x86_64-unknown-linux-gnu - name: Run e2e test run: RUST_LOG=debug pixi run uvpy scripts/run_python_e2e_test.py --no-build # rerun-sdk is already built and installed - name: Run docs/snippets/compare_snippet_output.py # --release so we can inherit from some of the artifacts that maturin has just built before # --target x86_64-unknown-linux-gnu because otherwise cargo loses the target cache… even though this is the target anyhow… # --no-py-build because rerun-sdk is already built and installed run: | RUST_LOG=debug pixi run uvpy docs/snippets/compare_snippet_output.py --release --target x86_64-unknown-linux-gnu --no-py-build