CI: Include submodules in the release source archive

Ouverte
#3,445 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
76/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
git, github-actions, python

Piste de recherche

Read .github/workflows/release-upload.yml and the linked conda-forge/cuda-core-feedstock#34 pull request to understand how release archives are built and consumed. Reproduce the archive step with submodules checked out, then verify the archive includes the CCCL files at cuda_core/third_party/cccl and remains byte-for-byte reproducible. Done when the release source archive builds cuda-core without a separately pinned CCCL download.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

CI/CD cuda.core P2 packaging

Since cuda-core 1.3.0, building cuda_core from source requires the CCCL submodule at cuda_core/third_party/cccl: _get_cccl_include_dirs() treats a missing submodule as a build error, by design. The source archive attached to each release is a plain git archive (release-upload.yml), which leaves submodules empty, so that archive alone can no longer build cuda-core.

Downstream packagers now have to fetch CCCL separately and hard-code the submodule commit, as the conda-forge recipe does in conda-forge/cuda-core-feedstock#34. That pin has to be kept in sync by hand: the conda-forge bot bumps the version and re-hashes the sources, but the CCCL URL doesn't depend on the version, so its version-bump PRs would keep building against the old CCCL commit.

Proposal: check out with submodules: true and append each submodule to the tarball, e.g.:

export OUT="${PWD}/release"
git archive --format=tar --prefix="${ARCHIVE_NAME}/" -o "${OUT}/${ARCHIVE_NAME}.tar" "${GIT_TAG}"
git submodule foreach --quiet --recursive '
  git archive --format=tar --prefix="${ARCHIVE_NAME}/${displaypath}/" -o "${OUT}/sub.tar" HEAD
  tar -Af "${OUT}/${ARCHIVE_NAME}.tar" "${OUT}/sub.tar" && rm "${OUT}/sub.tar"'
gzip -n "${OUT}/${ARCHIVE_NAME}.tar"

The result is byte-for-byte reproducible. At cuda-core-v1.3.0, the archive grows from 6.0 MB to 19.0 MB, or to 7.4 MB if only libcudacxx/include and the licenses are included. The 1.3.0 asset stays as is; once a release ships the submodule, the feedstock can go back to a single source.

Related: #2715

-- Leo's bot

Langage dominant
Cython
Étoiles
3.4k
Forks
353
Merge moyen
2 j 3 h
PR mergées (30 j)
163

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de NVIDIA/cuda-python

Toutes les issues de NVIDIA/cuda-python

Issues similaires

Plus d'issues Build System

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.