-
Notifications
You must be signed in to change notification settings - Fork 15
226 lines (192 loc) · 5.51 KB
/
build.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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
name: Build slims
on:
workflow_dispatch:
pull_request:
paths:
- './config/*'
push:
paths:
- 'config.yaml'
- '.github/workflows/build.yml'
- './config/*'
schedule:
- cron: 1 0 1 1-12 *
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
# Get slimmer and robot
- name: add slimmer and robot URLs to environment
run: |
echo $(java --version)
config_file="config.yaml"
robot_jar=""
robot=""
slimmer=""
while IFS=":" read -r key value; do
key=$(echo "$key" | tr -d '[:space:]')
case "$key" in
robot-jar)
robot_jar=$(echo "$value" | tr -d '[:space:]')
;;
robot-wrapper)
robot=$(echo "$value" | tr -d '[:space:]')
;;
slimmer)
slimmer=$(echo "$value" | tr -d '[:space:]')
;;
esac
done < "$config_file"
echo SLIMMER: $slimmer
echo ROBOT JAR: $robot_jar
echo ROBOT WRAPPER: $robot
echo 'slimmer='${slimmer}'' >> $GITHUB_ENV
echo 'robot='${robot}'' >> $GITHUB_ENV
echo 'robot_jar='${robot_jar}'' >> $GITHUB_ENV
- name: get slimmer
run: wget ${{ env.slimmer }}
- name: get robot
run: |
cd ./scripts/src/build-workflow
wget ${{ env.robot }}
wget ${{ env.robot_jar}}
# slim all ontologies
# Authorize running slim script
- name: authorize running slim scripts
run: chmod 755 scripts/src/build-workflow/*.sh
# Slim aopo
- name: slim-aopo
if: always()
run: bash scripts/src/build-workflow/slim.sh aopo
# Slim bao
- name: slim-bao
if: always()
run: bash scripts/src/build-workflow/slim.sh bao
# Slim bfo
- name: slim-bfo
if: always()
run: bash scripts/src/build-workflow/slim.sh bfo
# Slim bto
- name: slim-bto
if: always()
run: bash scripts/src/build-workflow/slim.sh bto
# Slim ccont
- name: slim-ccont
if: always()
run: bash scripts/src/build-workflow/slim.sh ccont
# Slim cheminf
- name: slim-cheminf
if: always()
run: bash scripts/src/build-workflow/slim.sh cheminf
# Slim chebi
- name: slim-chebi
if: always()
run: bash scripts/src/build-workflow/slim.sh chebi
# Slim chmo
- name: slim-chmo
if: always()
run: bash scripts/src/build-workflow/slim.sh chmo
# Slim clo
- name: slim-clo
if: always()
run: bash scripts/src/build-workflow/slim.sh clo
# Slim efo
- name: slim-efo
if: always()
run: bash scripts/src/build-workflow/slim.sh efo
# Slim envo
- name: slim-envo
if: always()
run: bash scripts/src/build-workflow/slim.sh envo
# Slim fabio
- name: slim-fabio
if: always()
run: bash scripts/src/build-workflow/slim.sh fabio
# Slim go
- name: slim-go
if: always()
run: bash scripts/src/build-workflow/slim.sh go
# Slim iao
- name: slim-iao
if: always()
run: bash scripts/src/build-workflow/slim.sh iao
# Slim ncit
- name: slim-ncit
if: always()
run: bash scripts/src/build-workflow/slim.sh ncit
# Slim npo
- name: slim-npo
if: always()
run: bash scripts/src/build-workflow/slim.sh npo
# Slim oae
- name: slim-oae
if: always()
run: bash scripts/src/build-workflow/slim.sh oae
# Slim obcs
- name: slim-obcs
if: always()
run: bash scripts/src/build-workflow/slim.sh obcs
# Slim obi
- name: slim-obi
if: always()
run: bash scripts/src/build-workflow/slim.sh obi
# Slim pato
- name: slim-pato
if: always()
run: bash scripts/src/build-workflow/slim.sh pato
# Slim sio
- name: slim-sio
if: always()
run: bash scripts/src/build-workflow/slim.sh sio
# Slim uberon
- name: slim-uberon
if: always()
run: bash scripts/src/build-workflow/slim.sh uberon
# Slim uo
- name: slim-uo
if: always()
run: bash scripts/src/build-workflow/slim.sh uo
# Slim msio
- name: slim-msio
if: always()
run: bash scripts/src/build-workflow/slim.sh msio
# apply props bao
- name: Apply props bao
if: always()
run: bash scripts/src/build-workflow/props.sh bao
# apply props npo
- name: Apply props npo
if: always()
run: bash scripts/src/build-workflow/props.sh npo
# apply props sio
- name: Apply props sio
if: always()
run: bash scripts/src/build-workflow/props.sh sio
- name: Apply props cheminf
if: always()
run: bash scripts/src/build-workflow/props.sh cheminf
- name: Apply props ro
if: always()
run: bash scripts/src/build-workflow/props.sh ro
# Commit and push
- name: Commit OWL files
if: always()
run: |
git fetch
echo "::set-output name=has_changes::$(git diff --name-only origin/main)"
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add external-dev/*.owl
git commit -m "Actions - slim updated" ./external-dev/*.owl
git push -f
- name: Create issue about failure
if: failure()
uses: JasonEtco/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/action-issue-template.md