Merge branch 'master' into adv-beta #1761
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
- 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 | |
shell: bash | |
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: | |
dfhack_repo: ${{ format('{0}/dfhack', github.event_name == 'push' && github.repository_owner || github.event.pull_request.base.repo.owner.login) }} | |
dfhack_ref: ${{ (((github.base_ref || github.ref_name) == 'master') && 'develop' || (github.base_ref || github.ref_name)) }} | |
structures_repo: ${{ github.repository }} | |
structures_ref: ${{ github.ref }} | |
secrets: inherit | |
docs: | |
uses: DFHack/dfhack/.github/workflows/build-linux.yml@develop | |
with: | |
dfhack_repo: ${{ format('{0}/dfhack', github.event_name == 'push' && github.repository_owner || github.event.pull_request.base.repo.owner.login) }} | |
dfhack_ref: ${{ (((github.base_ref || github.ref_name) == 'master') && 'develop' || (github.base_ref || github.ref_name)) }} | |
structures_repo: ${{ github.repository }} | |
structures_ref: ${{ github.ref }} | |
artifact-name: docs | |
platform-files: false | |
common-files: false | |
docs: true | |
secrets: inherit |