Skip to content

ci: gate PRs on Actions and bridge to Blossom #2

ci: gate PRs on Actions and bridge to Blossom

ci: gate PRs on Actions and bridge to Blossom #2

Workflow file for this run

# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# The part of the suite that needs no GPU, no CUDA driver and no built
# extension: the public build contract and the CUBIN materializer. Everything
# heavier runs on internal hardware through Blossom, which a maintainer has to
# ask for by comment — this is the signal a contributor gets without waiting.
name: Contract
on:
pull_request:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Same reasoning as the style gate: a superseded push to a branch is wasted
# work, but cancelling on main would leave that commit with no result.
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
contract:
name: contract
runs-on: ubuntu-latest
steps:
# The LFS content is load-bearing, but only a slice of it.
# test_committed_corpus_materializes materializes the real committed CUBIN
# packs and says why: "An LFS pointer or a corrupt pack fails here, not at
# pip install time." Verified by rewriting the packs as pointers — the
# test fails with "is a Git LFS pointer", which is it doing its job.
#
# `lfs: true` would fetch every object in the repo, measured at 88.2 MB
# against the 2.5 MB of packs these suites read; the rest is sample MSAs
# and structures nothing here opens. So fetch the packs by pattern.
#
# No submodules: neither suite imports bionemo_ir or reads 3rdparty/.
- uses: actions/checkout@v7
with:
lfs: false
- name: Fetch the CUBIN packs
run: git lfs pull --include="cpp/kernels/cutedsl_*/cubins/packs/*.tar.xz"
- uses: actions/setup-python@v7
with:
python-version: '3.12'
# requirements-dev.txt owns the floor, the same way the prek action reads
# its pin, so a bump there moves CI with it. Anchored on a version
# operator so the pytest-cov and pytest-xdist lines cannot match.
- name: Install the declared pytest
shell: bash
run: |
spec=$(sed -n 's/^\(pytest[<>=!~][^ #]*\).*/\1/p' requirements-dev.txt)
if [[ -z "${spec}" ]]; then
echo "::error file=requirements-dev.txt::no 'pytest<op><version>' requirement found"
exit 1
fi
echo "installing ${spec}"
pip install "${spec}"
# Nothing here imports torch or the package itself, so there is no install
# step and no build. tests/pytest.ini supplies the options.
- run: pytest tests/contract tests/cubin