Debug #71
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CWL Avro Testing | |
on: [push] | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
architecture: 'x64' | |
# upgrade pip? | |
- run: sudo pip install --upgrade pip | |
# install a specific version of the cwl dependencies to test with | |
- run: pip3.10 install --user setuptools==69.0.2 | |
- run: pip3.10 install --user cwl-runner cwltool==3.1.20230201224320 schema-salad==8.4.20230201194352 avro==1.11.3 | |
- run: git clone https://github.com/common-workflow-language/common-workflow-language | |
# convert CWL schema salad CWL to standard Avro json | |
- run: schema-salad-tool --print-avro common-workflow-language/v1.0/CommonWorkflowLanguage.yml > cwl.avsc | |
# get rid of invalid avro symbols | |
- run: sed '/draft-3/d' cwl.avsc > cwl.edited.avsc | |
- run: sed -i '/draft-2/d' cwl.edited.avsc | |
- run: sed -i '/draft-4/d' cwl.edited.avsc | |
- run: sed -i '/dev4/d' cwl.edited.avsc | |
- run: sed -i '/v1.0/d' cwl.edited.avsc | |
# get rid of symbols that screw up javadoc (not sure if invalid avro schema) | |
- run: sed -i 's/<A>/A/g' cwl.edited.avsc | |
- run: sed -i 's/<B>/B/g' cwl.edited.avsc | |
- run: sed -i 's/<C>/C/g' cwl.edited.avsc | |
- run: wget https://repo1.maven.org/maven2/org/apache/avro/avro-tools/1.11.3/avro-tools-1.11.3.jar | |
# generate Java model classes | |
- run: java -jar avro-tools-1.11.3.jar compile schema cwl.edited.avsc cwl-temp | |
- run: ls cwl-temp # TODO: remove this | |
# create packages for the classes | |
- run: sed -i '1i package io.cwl.avro;' cwl-temp/* | |
- run: sed -i 's/Any/Object/g' cwl-temp/* | |
- run: rm cwl-temp/Any.java | |
- run: rm -Rf cwlavro-generated/src/main/java/io/cwl/avro | |
- run: cp -R cwl-temp cwlavro-generated/src/main/java/io/cwl/avro | |
- run: echo "the output below should show that the generated API more-or-less matches the checked-in API for convenience" | |
- run: git diff | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17.0.4+8' | |
distribution: 'adopt' | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: java | |
- run: mvn -B clean install | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 |