Skip to content

CI: CMake: Separate build and test steps #376

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

Merged
merged 2 commits into from
Mar 23, 2023
Merged

Conversation

anzz1
Copy link
Contributor

@anzz1 anzz1 commented Mar 22, 2023

Otherwise the tests may be ran and pass even if the build has errors and thus the step itself can pass with errors in build

edit: separate build and test steps for all platforms.

@anzz1
Copy link
Contributor Author

anzz1 commented Mar 22, 2023

For future considerations:

In GitHub actions, each row of the run: commands are executed separately, irregardless what the previous input returned. The step determines "success" from the error code returned by the very last run command. As && means "execute if last output equals no error", cmake --build . --config Release && ctest -C Release --output-on-failure makes sure that the tests are only ran if the build succeeds, and that both needs to succeed for the CI step to return "success".

@anzz1 anzz1 added bug Something isn't working build Compilation issues labels Mar 22, 2023
Also standardise step id names
@anzz1 anzz1 changed the title CI fix Windows, make sure build passes before running tests CI: CMake: Separate build and test steps Mar 23, 2023
@anzz1
Copy link
Contributor Author

anzz1 commented Mar 23, 2023

Separated build and test steps as separate tasks as pointed out by @Green-Sky . Obviously should've done that in the first place, idk how I didn't think of that.

Also standardised the step id names between the platforms for 'cleanliness' sake (and possibly future expansion / easier build log scraping / etc).

Copy link
Collaborator

@Green-Sky Green-Sky left a comment

Choose a reason for hiding this comment

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

looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build Compilation issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants