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

Unexpected error message in CI build log for MacOS #307

Open
ronald-jaepel opened this issue Oct 25, 2024 · 2 comments
Open

Unexpected error message in CI build log for MacOS #307

ronald-jaepel opened this issue Oct 25, 2024 · 2 comments

Comments

@ronald-jaepel
Copy link
Collaborator

Actual Behavior

Build log on MacOS works but prints this log:

Run cmake -E make_directory "${BUILD_DIR}"
-- Found Git: /opt/homebrew/bin/git (found version "2.47.0")
fatal: No names found, cannot describe anything.
-- Get version from file
-- CADET version: 4.4.0

Steps to Reproduce the Problem

  1. Check any CI log
@sleweke
Copy link
Contributor

sleweke commented Nov 12, 2024

The same message appears in the logs of win and linux builds as well.
It is caused by running the command

git describe --abbrev=0 HEAD

This should return the highest / most recent / latest version tag.

However, the repos are only checked out in shallow mode to save time and space. Hence, no tags are downloaded and this is way the command fails.

As a backup, the version is loaded from file version.txt in this case. This way, we can still have the correct version baked into the binaries (provided that version.txt is correct).

@schmoelder
Copy link
Contributor

We could also checkout tags in the CI (see https://github.com/actions/checkout)

- uses: actions/checkout@v4 
  with
    # Whether to fetch tags, even if fetch-depth > 0.
    # Default: false
    fetch-tags: 'true'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

4 participants