Skip to content

Commit

Permalink
ci: raptor build: extract the CWL description and run it
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Apr 28, 2023
1 parent dbec1e3 commit f464e0f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,16 @@ jobs:
cd build
ctest . -j2 --output-on-failure
- name: Install pipx & cwltool
run: |
sudo apt-get install --yes pipx
pipx install cwltool
- name: extract CWL descriptions
run: |
build/bin/raptor build --export-help cwl > raptor/raptor.cwl
cd raptor
export PATH=$PATH:$PWD/../build/bin
cwltool --validate raptor.cwl
cwltool raptor.cwl workflow/cwl/tests/raptor-build-0_bins_window_19.yml | tee | grep 2880b1ab21aa50f45ed896cfd470559717094f15
cwltool raptor.cwl workflow/cwl/tests/raptor-build-16_bins_window_19.yml | tee | grep 3b802449bf5c611c2f68a8ed86ee3d62e4638af9
23 changes: 22 additions & 1 deletion src/argument_parsing/build_parsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,34 @@ void init_build_parser(sharg::parser & parser, build_arguments & arguments)
return bins;
}
)-");
auto inputs = node["inputs"];
for (std::size_t i = 0; i < inputs.size(); i++)
{
if (inputs[i]["id"].as<std::string>() == "input")
{
inputs.remove(i);
}
if (inputs[i]["id"].as<std::string>() == "output")
{
inputs[i]["id"] = "output_name";
}
}
node["inputs"].push_back(YAML::Load(R"-(
id: sequences
type:
type: array
items:
type: array
items: File
)-"));
node["outputs"] = YAML::Load(R"-(
index:
type: File
outputBinding:
glob: $(inputs.output)
glob: $(inputs.output_name)
)-");
node["arguments"] = YAML::Load(R"-(
- --input
- input_bins_filepaths.txt
)-");
};
Expand Down
1 change: 1 addition & 0 deletions workflow/cwl/raptor-build.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ requirements:
arguments:
- prefix: --threads
valueFrom: $(runtime.cores)
- --input
- input_bins_filepaths.txt

outputs:
Expand Down

0 comments on commit f464e0f

Please sign in to comment.