Skip to content

Commit 734422f

Browse files
author
Benjamin Muskalla
committed
Generate the models for each variant
1 parent 9672128 commit 734422f

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/java-model-diff.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,27 @@ jobs:
5050
unzip -q -d $SHORTNAME-db $SHORTNAME.zip
5151
mkdir lib-dbs/$SHORTNAME/
5252
mv $SHORTNAME-db/`ls -1 $SHORTNAME-db`/* lib-dbs/$SHORTNAME/
53+
- name: Generate Models (Baseline and HEAD)
54+
run: |
55+
set -x
56+
mkdir tmp-models
57+
MODELS=`pwd`/tmp-models
58+
MODE="baseline"
59+
DATABASES=`pwd`/lib-dbs
60+
61+
analyzeDatabaseWithCheckout() {
62+
QL_VARIANT=$1
63+
DATABASE=$2
64+
cd codeql-$QL_VARIANT
65+
SHORTNAME=`basename $DATABASE`
66+
python java/ql/src/utils/model-generator/GenerateFlowModel.py $DATABASE $MODELS/${SHORTNAME}.qll
67+
mv $MODELS/${SHORTNAME}.qll $MODELS/${SHORTNAME}_${QL_VARIANT}.qll
68+
cd ..
69+
}
70+
71+
for d in $DATABASES/*/ ; do
72+
ls -1 "$d"
73+
74+
analyzeDatabaseWithCheckout "baseline" $d
75+
analyzeDatabaseWithCheckout "head" $d
76+
done

0 commit comments

Comments
 (0)