Skip to content

Commit

Permalink
Merge pull request #623 from myk002/myk_reusable
Browse files Browse the repository at this point in the history
use reusable test action from the dfhack repo
  • Loading branch information
myk002 committed Aug 4, 2023
2 parents c87d226 + c2468e8 commit 4277ad7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 32 deletions.
36 changes: 8 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,6 @@ 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:
Expand All @@ -41,7 +14,7 @@ jobs:
libxml-libxml-perl \
libxml-libxslt-perl
- name: Clone df-structures
uses: actions/checkout@v1
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]}
Expand All @@ -60,3 +33,10 @@ jobs:
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_ref: develop
structures_ref: ${{ github.ref }}
secrets: inherit
6 changes: 3 additions & 3 deletions .github/workflows/check-type-sizes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
run: |
python3 library/xml/tools/compare-sizes.py --old sizes-old.txt --new sizes-new.txt --platform ${{ env.GHA_OS_TAG }} --output sizes-${{ env.GHA_OS_TAG }}.json
- name: Upload report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: sizes-${{ env.GHA_OS_TAG }}
path: sizes-${{ env.GHA_OS_TAG }}.json
Expand All @@ -87,7 +87,7 @@ jobs:
- name: Clone df-structures
uses: actions/checkout@v3
- name: Download reports
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
path: reports
- name: Generate comment
Expand All @@ -107,7 +107,7 @@ jobs:
--arg rows "${{ steps.generate_comment.outputs.rows }}" \
'{$comment, $comment_search, $pr_number, update_only:($rows|tonumber <= 0)}' > comment-info.json
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: comment-info.json
path: comment-info.json
2 changes: 1 addition & 1 deletion .github/workflows/comment-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v3
with:
workflow: .github/workflows/check-type-sizes.yml
run_id: ${{ github.event.workflow_run.id }}
Expand Down

0 comments on commit 4277ad7

Please sign in to comment.