-
Notifications
You must be signed in to change notification settings - Fork 40
84 lines (80 loc) · 2.9 KB
/
inference_diff.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
name: Inference diff
on:
# Triggers the workflow on pull request events for the master branch
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
classify_pr:
runs-on: ubuntu-latest
container: obolibrary/odkfull:${{ vars.ODK_VERSION }}
steps:
- uses: actions/checkout@v4
- name: Classify ontology
run: cd src/ontology; make -j 4 ROBOT_ENV='ROBOT_JAVA_ARGS=-Xmx6G' reasoned.owl
- name: Upload PR reasoned.owl
uses: actions/upload-artifact@v4
with:
name: reasoned-pr.owl
path: src/ontology/reasoned.owl
retention-days: 1
classify_master:
runs-on: ubuntu-latest
container: obolibrary/odkfull:${{ vars.ODK_VERSION }}
steps:
- uses: actions/checkout@v4
with:
ref: master
- name: Classify ontology
run: cd src/ontology; make -j 4 ROBOT_ENV='ROBOT_JAVA_ARGS=-Xmx6G' reasoned.owl
- name: Upload master reasoned.owl
uses: actions/upload-artifact@v4
with:
name: reasoned-master.owl
path: src/ontology/reasoned.owl
retention-days: 1
diff_classification:
needs:
- classify_pr
- classify_master
runs-on: ubuntu-latest
container: obolibrary/odkfull:${{ vars.ODK_VERSION }}
steps:
- uses: actions/checkout@v4
- name: Download master classification
uses: actions/download-artifact@v4
with:
name: reasoned-master.owl
path: reasoned-master.owl
- name: Download PR classification
uses: actions/download-artifact@v4
with:
name: reasoned-pr.owl
path: reasoned-pr.owl
- name: Diff classification
run: export ROBOT_JAVA_ARGS=-Xmx6G; cd src/ontology; robot diff --left ../../reasoned-master.owl/reasoned.owl --left-catalog catalog-v001.xml --right ../../reasoned-pr.owl/reasoned.owl --right-catalog catalog-v001.xml -f markdown -o classification-diff.md
- name: Upload diff
uses: actions/upload-artifact@v4
with:
name: classification-diff.md
path: src/ontology/classification-diff.md
post_comment:
needs: diff_classification
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download diff
uses: actions/download-artifact@v4
with:
name: classification-diff.md
path: classification-diff.md
- name: Prepare comment
run: "echo \"Here's a diff of how these changes impact the classified ontology: \n\" >comment.md; cat classification-diff.md/classification-diff.md >>comment.md"
- name: Post comment
uses: NejcZdovc/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "../../comment.md"