CI: Include submodules in the release source archive

Aberta
#3,445 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
76/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
git, github-actions, python
Domínio
build-system, release

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
Cython
Estrelas
3.4k
Forks
353
Merge médio
2d 3h
PRs com merge (30d)
163

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de NVIDIA/cuda-python

Todas as issues de NVIDIA/cuda-python

Issues semelhantes

Mais issues de Build System

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.