Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try fetching tags to get correct version in CI #281

Merged
merged 2 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-python@v3
with:
python-version: 3.12
Expand Down Expand Up @@ -45,6 +47,8 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true

- uses: actions/setup-python@v3
with:
Expand All @@ -64,6 +68,8 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3
Expand Down
3 changes: 0 additions & 3 deletions tests/test_binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@ def test_cmake_static_compilation(csetstr: str):
testprog = os.path.join(tmpdir, "test.cc")
# SKBUILD_PROJECT_VERSION only includes major.minor.patch
versionstr = ".".join(correctionlib.__version__.split(".")[:3])
if versionstr.startswith("0.1.dev1+"):
# band-aid for https://github.com/actions/checkout/issues/249 in CI
versionstr = "0.1"
with open(testprog, "w") as f:
f.write(TESTPROG_SRC % (versionstr, csetstr))
flags = (
Expand Down
Loading