-
Notifications
You must be signed in to change notification settings - Fork 6
173 lines (154 loc) · 6.66 KB
/
ant.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# This workflow will build a Java project with Ant
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-ant
name: Java CI with Ant
on:
push:
branches: [ "master", "main" ]
pull_request:
branches: [ "master", "main" ]
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
permissions:
id-token: write
contents: read
checks: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout sigmanlp
uses: actions/checkout@v4
with:
path: sigmanlp
- name: checkout sigmakee
uses: actions/checkout@v4
with:
repository: 'ontologyportal/sigmakee'
path: sigmakee
- name: checkout TPTP-ANTLR
uses: actions/checkout@v4
with:
repository: 'ontologyportal/TPTP-ANTLR'
path: TPTP-ANTLR
- name: checkout SigmaUtils
uses: actions/checkout@v4
with:
repository: 'ontologyportal/SigmaUtils'
path: SigmaUtils
- name: checkout sumo
uses: actions/checkout@v4
with:
repository: 'ontologyportal/sumo'
path: sumo
# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Setup tmate session
# if: failure() && github.event_name == 'workflow_dispatch'
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
uses: mxschmitt/action-tmate@v3
- name: Setup SigmaNLP
env:
ONTOLOGYPORTAL_GIT: ${{ github.workspace }}
SIGMA_HOME: ${{ github.workspace }}/sigmakee-runtime
SIGMA_SRC: ${{ github.workspace }}/sigmakee
CORPORA: ${{ github.workspace }}/sigmanlp/corpora
working-directory: ${{ github.workspace }}
run: |
echo "SIGMA_HOME: $SIGMA_HOME"
echo "SIGMA_SRC: $SIGMA_SRC"
echo "ONTOLOGYPORTAL_GIT: $ONTOLOGYPORTAL_GIT"
echo "CORPORA: $CORPORA"
mkdir -p $SIGMA_HOME/KBs/WordNetMappings
cp $SIGMA_SRC/config.xml $SIGMA_HOME/KBs
cp -R $ONTOLOGYPORTAL_GIT/sumo/* $SIGMA_HOME/KBs
wget 'https://wordnetcode.princeton.edu/3.0/WordNet-3.0.tar.gz'
tar -xvzf WordNet-3.0.tar.gz
cp WordNet-3.0/dict/* $SIGMA_HOME/KBs/WordNetMappings/
wget 'https://nlp.stanford.edu/software/stanford-corenlp-4.5.7.zip'
unzip stanford-corenlp-4.5.7.zip
cp stanford-corenlp-4.5.7/stanford-corenlp-4.5.7.jar sigmanlp/lib
cp stanford-corenlp-4.5.7/stanford-corenlp-4.5.7-models.jar sigmanlp/lib
- name: Set up JDK 21 for x64
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Build with Ant
env:
ONTOLOGYPORTAL_GIT: ${{ github.workspace }}
SIGMA_HOME: ${{ github.workspace }}/sigmakee-runtime
SIGMA_SRC: ${{ github.workspace }}/sigmakee
CORPORA: ${{ github.workspace }}/sigmanlp/corpora
run: ant
working-directory: ./sigmanlp
- name: Prepare test env
env:
ONTOLOGYPORTAL_GIT: ${{ github.workspace }}
SIGMA_HOME: ${{ github.workspace }}/sigmakee-runtime
SIGMA_SRC: ${{ github.workspace }}/sigmakee
CORPORA: ${{ github.workspace }}/sigmanlp/corpora
working-directory: ./sigmanlp
run: |
sed -i "s|/home/apease/.sigmakee|$SIGMA_HOME|g" $SIGMA_SRC/test/unit/java/resources/config_topOnly.xml
sed -i "s|/home/apease/workspace/sumo|$ONTOLOGYPORTAL_GIT/sumo|g" $SIGMA_SRC/test/unit/java/resources/config_topOnly.xml
sed -i "s|/home/apease/E/bin/e_ltb_runner|/usr/local/bin/e_ltb_runner|g" $SIGMA_SRC/test/unit/java/resources/config_topOnly.xml
sed -i "s|/home/apease/workspace/vampire/vampire|/usr/local/bin/vampire|g" $SIGMA_SRC/test/unit/java/resources/config_topOnly.xml
- name: Run unit tests
env:
ONTOLOGYPORTAL_GIT: ${{ github.workspace }}
SIGMA_HOME: ${{ github.workspace }}/sigmakee-runtime
SIGMA_SRC: ${{ github.workspace }}/sigmakee
CORPORA: ${{ github.workspace }}/sigmanlp/corpora
working-directory: ./sigmanlp
run: |
ant test.unit
- name: Setup SIGMA_HOME for integration tests
env:
ONTOLOGYPORTAL_GIT: ${{ github.workspace }}
SIGMA_HOME: ${{ github.workspace }}/sigmakee-runtime
SIGMA_SRC: ${{ github.workspace }}/sigmakee
CORPORA: ${{ github.workspace }}/sigmanlp/corpora
working-directory: ${{ github.workspace }}
run: |
find $SIGMA_HOME/KBs -name '*.ser' -delete
cp $SIGMA_SRC/config.xml $SIGMA_HOME/KBs
sed -i "s|/home/theuser/.sigmakee|$SIGMA_HOME|g" $SIGMA_HOME/KBs/config.xml
sed -i "s|/home/theuser/workspace/sumo|$ONTOLOGYPORTAL_GIT/sumo|g" $SIGMA_HOME/KBs/config.xml
sed -i "s|/home/theuser/E/bin/e_ltb_runner|/usr/local/bin/e_ltb_runner|g" $SIGMA_HOME/KBs/config.xml
sed -i "s|/home/theuser/workspace/vampire/vampire|/usr/local/bin/vampire|g" $SIGMA_HOME/KBs/config.xml
sed -i '/<kb name/,/<\/kb>/d' $SIGMA_HOME/KBs/config.xml
- name: Setup KB for integration tests
env:
ONTOLOGYPORTAL_GIT: ${{ github.workspace }}
SIGMA_HOME: ${{ github.workspace }}/sigmakee-runtime
SIGMA_SRC: ${{ github.workspace }}/sigmakee
CORPORA: ${{ github.workspace }}/sigmanlp/corpora
working-directory: ${{ github.workspace }}
run: >
sed -i '/<\/configuration>/i\
<kb name="SUMO">\n
<constituent filename="Merge.kif"\/>\n
<constituent filename="Mid-level-ontology.kif"\/>\n
<constituent filename="english_format.kif"\/>\n
<constituent filename="domainEnglishFormat.kif"\/>\n
<\/kb>' $SIGMA_HOME/KBs/config.xml
- name: Run integration tests
env:
ONTOLOGYPORTAL_GIT: ${{ github.workspace }}
SIGMA_HOME: ${{ github.workspace }}/sigmakee-runtime
SIGMA_SRC: ${{ github.workspace }}/sigmakee
CORPORA: ${{ github.workspace }}/sigmanlp/corpora
working-directory: ./sigmanlp
run: |
ant test.integration
- name: Prune KB after integration tests
env:
SIGMA_HOME: ${{ github.workspace }}/sigmakee-runtime
working-directory: ${{ github.workspace }}
run: |
find $SIGMA_HOME/KBs -name '*.ser' -delete
rm -rf $SIGMA_HOME/KBs/tests