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

Replace recent-cmake action variable with oldest-cmake #2413

Merged
merged 2 commits into from
Aug 28, 2024

Conversation

vrabaud
Copy link
Collaborator

@vrabaud vrabaud commented Aug 27, 2024

All tests actually use a recent CMake.
A new test in ci-unix-shared-installed.yml is added to test for the oldest supported CMake (3.13).
This fixes #2363

All tests actually use a recent CMake.
A new test in ci-unix-shared-installed.yml is added to test for the
oldest supported CMake (3.13).
This fixes AOMediaCodec#2363
Copy link
Collaborator

@wantehchang wantehchang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

.github/actions/setup-common/action.yml Show resolved Hide resolved
@@ -84,6 +87,8 @@ jobs:

cmake . -DCMAKE_PREFIX_PATH=../install
- name: Prepare libavif with [[nodiscard]] (cmake)
# CMake 3.21 is needed to force C23 for [[nodiscard]].
if: runner.oldest-cmake == 'false'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This is a comment, not a request for change.

Here is an example where a cmake-version option would be better. We may be able to check if cmake-version is >= 3.21. The current check of runner.oldest-cmake == 'false' will become incorrect if our minimum required version is bumped to 3.21.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I just removed one CMake version in .github/actions/setup-common/action.yml. Imposing a version in the condition means we need to install two CMake for the same job and dynamically choose one or the other. Or we split the job. I believe I chose the least confusing solution that is easy for future maintenance: when we bump the minimum CMake version, we might delete oldest-cmake altogether (but as you mention, we will indeed to check all usages of oldest-cmake in the scripts).

@vrabaud vrabaud merged commit 9c81aa6 into AOMediaCodec:main Aug 28, 2024
32 checks passed
@vrabaud vrabaud deleted the recent_cmake branch August 28, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix the limitation of recent-cmake in the setup-common GitHub action
2 participants