-
-
Notifications
You must be signed in to change notification settings - Fork 179
65 lines (64 loc) · 3.21 KB
/
ci-xqts.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
name: XQTS
on: [push, pull_request]
permissions:
contents: read
jobs:
xqts:
name: W3C XQuery Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: liberica
java-version: '17'
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: xqts-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: xqts-${{ runner.os }}-maven
- name: Maven XQTS Build
run: mvn -V -B clean package -DskipTests -Ddependency-check.skip=true --projects exist-xqts --also-make
- name: Run XQTS
timeout-minutes: 60
env:
JAVA_OPTS: -XX:+UseZGC -Xmx6g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -XX:+ExitOnOutOfMemoryError
run: find exist-xqts/target -name exist-xqts-runner.sh -exec {} --xqts-version HEAD --output-dir /tmp/xqts-output --exclude-test-case RangeExpr-411d,RangeExpr-409d,RangeExpr-408d,RangeExpr-409c,RangeExpr-408c,GenCompEq-21 \;
- name: Check for HeapDump
id: check_heapdump
uses: andstor/file-existence-action@v3
with:
files: "/tmp/*.hprof"
- name: Compress HeapDump
if: steps.check_heapdump.outputs.files_exists == 'true'
run: zstd --rm -9 --progress -T0 /tmp/*.hprof
- name: Attach HeapDump artifact
if: steps.check_heapdump.outputs.files_exists == 'true'
uses: actions/upload-artifact@v4
with:
name: exist-xqts-runner-hprof
retention-days: 1
path: /tmp/*.hprof.zst
- name: Archive XQTS Logs
if: always()
uses: actions/upload-artifact@v4
with:
name: xqts-logs
retention-days: 14
path: /tmp/xqts-output
- name: Get Previous XQTS Logs Artifacts JSON
run: 'curl -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/exist-db/exist/actions/artifacts?name=xqts-logs > /tmp/previous-xqts-logs-artifacts.json'
- name: Extract Previous XQTS Logs Artifact JSON
run: cat /tmp/previous-xqts-logs-artifacts.json | jq -r "[.artifacts[] | select(.workflow_run.head_branch == \"develop\")][1].archive_download_url" > /tmp/previous-xqts-logs-artifact.json
- name: Get Previous XQTS Logs Artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: 'cat /tmp/previous-xqts-logs-artifact.json | xargs curl -H "Authorization: Bearer ${GITHUB_TOKEN}" --location --output /tmp/previous-xqts-output.zip'
- name: Extract Previous XQTS Logs Artifact
run: mkdir /tmp/previous-xqts-output && unzip /tmp/previous-xqts-output.zip -d /tmp/previous-xqts-output
- name: Compare Previous and Current XQTS Logs
run: java -jar ~/.m2/repository/net/sf/saxon/Saxon-HE/9.9.1-8/Saxon-HE-9.9.1-8.jar -xsl:exist-xqts/src/main/xslt/compare-results.xslt -it:compare-results -o:/tmp/comparison-results.xml xqts.previous.junit-data-path=/tmp/previous-xqts-output/junit/data xqts.current.junit-data-path=/tmp/xqts-output/junit/data
- name: Show Comparison Results
run: cat /tmp/comparison-results.xml