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

Parallelize CI by splitting Unit Tests and Integration Tests on different Github actions #288

Merged
merged 13 commits into from
Jan 15, 2025

Conversation

jofrevalles
Copy link
Member

This PR resolves #273 by modifying runtests.jl and CI.yml so the unit tests and integration tests run on different Github Actions.

@jofrevalles jofrevalles requested a review from mofeing January 14, 2025 08:49
Copy link
Member

@mofeing mofeing left a comment

Choose a reason for hiding this comment

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

this is awesome! thanks!

i suspect that precompiled packages are not getting correctly cached because every CI run is precompiling all test dependencies and takes around 5-7min. it might be a good moment to fix this.

test/runtests.jl Outdated Show resolved Hide resolved
@jofrevalles
Copy link
Member Author

i suspect that precompiled packages are not getting correctly cached because every CI run is precompiling all test dependencies and takes around 5-7min. it might be a good moment to fix this.

I guess we can cache for each Julia version, right? I suppose this is not possible for different Julia versions. But how can this be done, in a sequential way? Since right now all the Actions are deployed at the same time.

@jofrevalles jofrevalles requested a review from mofeing January 14, 2025 09:29
test/runtests.jl Outdated
using Adapt

include("Utils.jl")

const TENET_TEST_GROUP = lowercase(get(ENV, "TENET_TEST_GROUP", "all"))

println("Running tests for group: $TENET_TEST_GROUP")
Copy link
Member

Choose a reason for hiding this comment

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

if you use @info we can get nice colors in the logs

Suggested change
println("Running tests for group: $TENET_TEST_GROUP")
@info "Running tests for group: $TENET_TEST_GROUP"

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure! I think I will remove that, I am putting this now since I think this ENV is not properly set by CI.yml.

@mofeing
Copy link
Member

mofeing commented Jan 14, 2025

I guess we can cache for each Julia version, right? I suppose this is not possible for different Julia versions. But how can this be done, in a sequential way? Since right now all the Actions are deployed at the same time.

so the cache works and should be caching for each CI job type (e.g. one cache for "unit tests" - "ubuntu" - x86_64 - Julia 1.11).

but i still don't why it takes so much time to precompile for testing.

@mofeing
Copy link
Member

mofeing commented Jan 14, 2025

@jofrevalles
Copy link
Member Author

also, you may want to use the matrix instead of writing different jobs:

https://github.com/EnzymeAD/Reactant.jl/blob/c664414990141ab04455c49a793a3b9144f2182b/.github/workflows/CI.yml#L30-L33

and then you pass the env var like this:

https://github.com/EnzymeAD/Reactant.jl/blob/c664414990141ab04455c49a793a3b9144f2182b/.github/workflows/CI.yml#L130

Yes, I changed that. I am already doing this.

.github/workflows/CI.yml Outdated Show resolved Hide resolved
jofrevalles and others added 3 commits January 14, 2025 10:59
Co-authored-by: Sergio Sánchez Ramírez <15837247+mofeing@users.noreply.github.com>
@jofrevalles jofrevalles requested a review from mofeing January 15, 2025 13:46
@jofrevalles jofrevalles merged commit dda11af into master Jan 15, 2025
5 of 7 checks passed
@jofrevalles jofrevalles deleted the fix/parallelize-CI branch January 15, 2025 14:18
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.

Parallelize unit and integration tests
2 participants