65 lines (63 loc) · 1.98 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Build
on: [push, pull_request]
jobs:
docs:
runs-on: ubuntu-18.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 scripts
uses: actions/checkout@v1
- name: Set up DFHack
run: |
git clone git://github.com/dfhack/dfhack $HOME/dfhack --depth 1 --branch develop
git -C $HOME/dfhack submodule update --init --depth 1 --remote plugins/stonesense library/xml
rmdir $HOME/dfhack/scripts
ln -sv $(pwd) $HOME/dfhack/scripts
- name: Build docs
run: |
sphinx-build -W --keep-going -j3 $HOME/dfhack html
- name: Check for missing docs
if: success() || failure()
run: python $HOME/dfhack/travis/script-docs.py .
- name: Upload docs
if: success() || failure()
uses: actions/upload-artifact@master
with:
name: docs
path: html
lint:
runs-on: ubuntu-18.04
steps:
- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: 3
- name: Set up Ruby 2.7
uses: actions/setup-ruby@v1
with:
ruby-version: 2.7
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install lua5.3
- name: Clone scripts
uses: actions/checkout@v1
- name: Set up DFHack
run: |
git clone git://github.com/dfhack/dfhack $HOME/dfhack --depth 1 --branch develop
rmdir $HOME/dfhack/scripts
ln -sv $(pwd) $HOME/dfhack/scripts
- name: Check whitespace
run: python $HOME/dfhack/travis/lint.py
- name: Check Lua syntax
if: success() || failure()
run: python $HOME/dfhack/travis/script-syntax.py --ext=lua --cmd="luac5.3 -p" --github-actions
- name: Check Ruby syntax
if: success() || failure()
run: python $HOME/dfhack/travis/script-syntax.py --ext=rb --cmd="ruby -c" --github-actions