diff --git a/.github/workflows/mad_modelDiff.yml b/.github/workflows/mad_modelDiff.yml index 17640da9f2e1..62cb57fd9353 100644 --- a/.github/workflows/mad_modelDiff.yml +++ b/.github/workflows/mad_modelDiff.yml @@ -12,6 +12,7 @@ on: - main paths: - "java/ql/src/utils/modelgenerator/**/*.*" + - "misc/scripts/models-as-data/*.*" - ".github/workflows/mad_modelDiff.yml" permissions: @@ -61,8 +62,9 @@ jobs: DATABASE=$2 cd codeql-$QL_VARIANT SHORTNAME=`basename $DATABASE` - python java/ql/src/utils/modelgenerator/GenerateFlowModel.py --with-summaries --with-sinks $DATABASE ${SHORTNAME}.temp.model.yml - mv java/ql/lib/ext/generated/${SHORTNAME}.temp.model.yml $MODELS/${SHORTNAME}Generated_${QL_VARIANT}.model.yml + python java/ql/src/utils/modelgenerator/GenerateFlowModel.py --with-summaries --with-sinks $DATABASE $SHORTNAME/$QL_VARIANT + mkdir -p $MODELS/$SHORTNAME + mv java/ql/lib/ext/generated/$SHORTNAME/$QL_VARIANT $MODELS/$SHORTNAME cd .. } @@ -85,16 +87,16 @@ jobs: set -x MODELS=`pwd`/tmp-models ls -1 tmp-models/ - for m in $MODELS/*_main.model.yml ; do + for m in $MODELS/*/main/*.model.yml ; do t="${m/main/"pr"}" basename=`basename $m` - name="diff_${basename/_main.model.yml/""}" + name="diff_${basename/.model.yml/""}" (diff -w -u $m $t | diff2html -i stdin -F $MODELS/$name.html) || true done - uses: actions/upload-artifact@v3 with: name: models - path: tmp-models/*.model.yml + path: tmp-models/**/**/*.model.yml retention-days: 20 - uses: actions/upload-artifact@v3 with: