-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: allow threads
as input
#103
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #103 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 2 2
=========================================
Hits 2 2 ☔ View full report in Codecov by Sentry. |
action.yml
Outdated
@@ -35,6 +35,10 @@ inputs: | |||
compiled_modules: | |||
description: 'Whether to run tests with `compiled-modules`. For possible values, refer to https://docs.julialang.org/en/v1/manual/command-line-interface/#command-line-interface' | |||
default: 'yes' | |||
threads: | |||
description: 'Value passed to the --threads flag. Default value: auto.' | |||
default: 'auto' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto
isn't the julia default unfortunately, so this will need to be a bit cleverer. Basically not set the arg by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yeah.
This might suffice:
default: "${JULIA_NUM_THREADS:=1}"
Or I can do a
if [[ -n ${{ input.threads }} ]]; then
julia ... --threads ${{ input.threads }} -e ...
else
julia ...
fi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to populate a var for the threads arg and interpolate it in, as if any other args need the same behavior different if paths for the top level cmd would make for a mess of if statements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I meant a different approach like threads_arg = inputs.threads == "default" ? "" : "--threads=${{ inputs.threads}}
Then interpolate threads_arg
into the cmd, making use of it being empty to avoid setting the arg
Looks like
|
90693c8
to
6d8e68b
Compare
No description provided.