forked from DFHack/df-structures
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (47 loc) · 1.42 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
name: Build
on: [push, pull_request]
jobs:
validate:
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install \
libxml2-utils \
libxml-libxml-perl \
libxml-libxslt-perl
- name: Clone df-structures
uses: actions/checkout@v3
- name: Validate against schema
run: |
xmllint --schema data-definition.xsd --noout df.*.xml symbols.xml 2>&1 | tee xmllint.out; status=${PIPESTATUS[0]}
echo "** reformatted output: **"
grep -i error xmllint.out | perl -pe 's/(.+):(\d+):/::error file=\1,line=\2::/g'
exit $status
- name: Generate headers
run: |
perl ./codegen.pl | tee codegen.out
if grep -i error codegen.out; then
echo codegen produced error
exit 1
fi
- name: Verify list.pl output
run: |
ls codegen | sort | grep -v codegen.out.xml > ls.out
perl ./list.pl | cut -d/ -f2 | sort > list.pl.out
diff ls.out list.pl.out
test:
uses: DFHack/dfhack/.github/workflows/test.yml@develop
with:
structures_ref: ${{ github.ref }}
secrets: inherit
docs:
uses: DFHack/dfhack/.github/workflows/build-linux.yml@develop
with:
structures_ref: ${{ github.ref }}
artifact-name: docs
platform-files: false
common-files: false
docs: true
secrets: inherit