Skip to content

Dipscript updates

Dipscript updates #933

Workflow file for this run

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