66 types : [opened, reopened, review_requested, synchronize]
77
88env :
9- CLASSPATH : " :/usr/lib/opensourcecobol4j/libcobj.jar:/usr/lib/opensourcecobol4j/sqlite.jar "
9+ CLASSPATH : " :/usr/lib/opensourcecobol4j/libcobj.jar"
1010
1111jobs :
12- run-tests :
12+ build :
1313 strategy :
1414 matrix :
1515 os : ["ubuntu:22.04", "almalinux:9"]
@@ -28,70 +28,57 @@ jobs:
2828 if : matrix.os == 'almalinux:9'
2929 run : |
3030 dnf -y update
31- dnf install -y java-17-openjdk-devel gcc gcc-c++ make bison flex automake autoconf diffutils gettext
31+ dnf install -y java-17-openjdk-devel gcc make bison flex automake autoconf diffutils gettext
3232
3333 - name : Checkout opensource COBOL 4J
3434 uses : actions/checkout@v3
3535
3636 - name : Install opensource COBOL 4J
3737 run : |
38- curl -L -k -o libcobj/sqlite-jdbc/sqlite.jar https://github.com/xerial/sqlite-jdbc/releases/download/3.36.0.3/sqlite-jdbc-3.36.0.3.jar
3938 ./configure --prefix=/usr/
4039 make
41- make install
40+ echo ARTIFACT_NAME=${{ matrix.os }} | sed 's/:/-/g' >> $GITHUB_ENV
4241
43- - name : Run tests "command-line-options"
42+ - name : Create an artifact file
4443 run : |
45- cd tests/
46- ./command-line-options
47-
48- - name : Run tests "misc"
49- run : |
50- cd tests/
51- ./misc
52-
53- - name : Run tests "data-rep"
54- run : |
55- cd tests/
56- ./data-rep
57-
58- - name : Run tests "i18n_sjis"
59- run : |
60- cd tests/
61- ./i18n_sjis
62-
63- - name : Run tests "jp-compat"
64- run : |
65- cd tests/
66- ./jp-compat
67-
68- - name : Run tests "run"
69- run : |
70- cd tests/
71- ./run
72-
73- - name : Run tests "syntax"
74- run : |
75- cd tests/
76- ./syntax
77-
78- - name : Run NIST test
79- run : |
80- cd tests/cobol85
81- make test
44+ cd ../
45+ tar zcf opensourcecobol4j.tar.gz opensourcecobol4j
46+ mv opensourcecobol4j.tar.gz opensourcecobol4j
47+
48+ - name : Upload an artifact
49+ uses : actions/upload-artifact@v3
50+ with :
51+ name : opensourcecobol4j-${{ env.ARTIFACT_NAME }}
52+ path : opensourcecobol4j.tar.gz
8253
83- - name : Run Extra NIST test
84- run : |
85- cd tests/cobol85
86- make test-extra
54+ run-test-other :
55+ needs : build
56+ strategy :
57+ matrix :
58+ test_name : ["command-line-options", "data-rep", "i18n_sjis", "jp-compat", "run", "syntax"]
59+ uses : ./.github/workflows/test-other.yml
60+ with :
61+ test-name : ${{ matrix.test_name }}
8762
88- #- name: Run tests "i18n_utf8"
89- # run: |
90- # ./configure --prefix=/usr/ --with-vbisam --enable-utf8
91- # make
92- # make install
93- # ./i18n_utf8 || true
94- # cd ../
63+ run-test-nist :
64+ needs : build
65+ strategy :
66+ matrix :
67+ test_name : ["IC", "IF", "IX", "NC", "OB", "RL", "SG", "SM", "SQ", "ST"]
68+ uses : ./.github/workflows/test-nist.yml
69+ with :
70+ test-name : ${{ matrix.test_name }}
71+ check-result : true
72+
73+ run-test-nist-extra :
74+ needs : build
75+ strategy :
76+ matrix :
77+ test_name : ["CM", "DB", "RW"]
78+ uses : ./.github/workflows/test-nist.yml
79+ with :
80+ test-name : ${{ matrix.test_name }}
81+ check-result : false
9582
9683 static_analysis :
9784 runs-on : ubuntu-latest
@@ -109,33 +96,28 @@ jobs:
10996 run : |
11097 sudo apt-get update -y
11198 sudo apt-get install -y clang-format cppcheck
112- curl -L -o google-java-format.jar https://github.com/google/google-java-format/releases/download/v1.15.0/google-java-format-1.15.0-all-deps.jar
113- curl -L -o pmd-bin-6.52.0.zip https://github.com/pmd/pmd/releases/download/pmd_releases%2F6.52.0/pmd-bin-6.52.0.zip
114- curl -L -o spotbugs-4.7.3.zip https://github.com/spotbugs/spotbugs/releases/download/4.7.3/spotbugs-4.7.3.zip
115- unzip pmd-bin-6.52.0.zip
116- unzip spotbugs-4.7.3.zip
11799
118100 - name : Install opensource COBOL 4J
119101 run : |
120102 sudo apt install -y build-essential bison flex gettext texinfo automake autoconf
121- curl -L -k -o libcobj/sqlite-jdbc/sqlite.jar https://github.com/xerial/sqlite-jdbc/releases/download/3.36.0.3/sqlite-jdbc-3.36.0.3.jar
122103 ./configure --prefix=/usr/
123104 make
124105 sudo make install
125106
126107 - name : Check format with google-java-format and clang-format
127108 run : |
128- export PATH_GOOGLE_JAVA_FORMAT=${PWD}/google-java-format.jar
129109 ./check-format
130110
131- - name : Run SpotBugs
111+ - name : Run SpotBugs (ignore results)
132112 run : |
133- java -jar spotbugs-4.7.3/lib/spotbugs.jar -textui libcobj/output
113+ cd libcobj
114+ ./gradlew spotbugsMain || true
134115
135116 - name : Run PMD
136117 run : |
137- pmd-bin-6.52.0/bin/run.sh pmd -d ${PWD}/libcobj/src -R ${PWD}/.github/ruleset.xml -f text
118+ cd libcobj
119+ ./gradlew pmdMain
138120
139- - name : Run cppcheck
121+ - name : Run cppcheck (ignore results)
140122 run : |
141123 cd cobj && cppcheck cobj.c cobj.h codegen.c config.c error.c field.c pplex.c ppparse.c ppparse.h reserved.c tree.c tree.h typeck.c
0 commit comments