Skip to content

Merge pull request #613 from ab9rf/assign_trade #755

Merge pull request #613 from ab9rf/assign_trade

Merge pull request #613 from ab9rf/assign_trade #755

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
docs:
runs-on: ubuntu-22.04
steps:
- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: 3
- name: Install dependencies
run: |
pip install 'sphinx<4.4.0'
- name: Clone df-structures
uses: actions/checkout@v1
- name: Set up DFHack
run: |
git clone https://github.com/DFHack/dfhack.git $HOME/dfhack --depth 1 --branch develop
git -C $HOME/dfhack submodule update --init --depth 1 --remote plugins/stonesense scripts
rmdir $HOME/dfhack/library/xml
ln -sv $(pwd) $HOME/dfhack/library/xml
- name: Build docs
run: |
sphinx-build -W --keep-going -j3 --color $HOME/dfhack html
- name: Upload docs
if: success() || failure()
uses: actions/upload-artifact@master
with:
name: docs
path: html
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@v1
- 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