CI: Include submodules in the release source archive

Đang mở
#3,445 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
76/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
git, github-actions, python
Lĩnh vực
build-system, release

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Cython
Star
3.4k
Fork
353
Merge trung bình
2 ngày 3 giờ
Pull request đã merge (30 ngày)
163

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NVIDIA/cuda-python

Tất cả issue của NVIDIA/cuda-python

Issue tương tự

Thêm issue về Build System

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.