Skip to content

Commit 10be6f7

Browse files
committed
feat: allow threads as input
1 parent 3a055a9 commit 10be6f7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ inputs:
3535
compiled_modules:
3636
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'
3737
default: 'yes'
38+
threads:
39+
description: 'Value passed to the --threads flag. Unless number of threads is specified, `--threads` arg is not passed.'
40+
default: 'default'
41+
required: false
3842

3943
runs:
4044
using: 'composite'
@@ -54,7 +58,8 @@ runs:
5458
if: inputs.annotate == 'true'
5559
- run: |
5660
# The Julia command that will be executed
57-
julia_cmd=( julia --color=yes --depwarn=${{ inputs.depwarn }} --inline=${{ inputs.inline }} --project=${{ inputs.project }} -e 'include(joinpath(ENV["GITHUB_ACTION_PATH"], "test_harness.jl"))' )
61+
threads_arg=$([[ "${{ inputs.threads }}" == "default" ]] && echo "" || echo "--threads=${{ inputs.threads }}" )
62+
julia_cmd=( julia --color=yes --depwarn=${{ inputs.depwarn }} --inline=${{ inputs.inline }} --project=${{ inputs.project }} $threads_arg -e 'include(joinpath(ENV["GITHUB_ACTION_PATH"], "test_harness.jl"))' )
5863
5964
# Add the prefix in front of the command if there is one
6065
prefix=( ${{ inputs.prefix }} )

0 commit comments

Comments
 (0)