2020-04-06 17:57:20 -06:00
|
|
|
name: Build and test
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
2020-04-10 21:46:19 -06:00
|
|
|
build:
|
2020-04-06 17:57:20 -06:00
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2020-04-06 18:00:10 -06:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install \
|
2020-04-06 17:57:20 -06:00
|
|
|
libsdl-image1.2-dev \
|
|
|
|
libsdl-ttf2.0-dev \
|
|
|
|
libsdl1.2-dev \
|
|
|
|
libxml-libxml-perl \
|
|
|
|
libxml-libxslt-perl \
|
|
|
|
lua5.3 \
|
|
|
|
ninja-build \
|
|
|
|
zlib1g-dev
|
|
|
|
sudo pip3 install --system sphinx
|
|
|
|
- name: Clone DFHack
|
|
|
|
uses: actions/checkout@v1
|
2020-04-10 21:38:32 -06:00
|
|
|
with:
|
|
|
|
submodules: true
|
2020-04-06 17:57:20 -06:00
|
|
|
- name: Set up environment
|
|
|
|
run: |
|
2020-04-10 21:53:12 -06:00
|
|
|
echo 'export DF_VERSION=$(sh travis/get-df-version.sh)' >> "$HOME/.dfhackrc"
|
|
|
|
echo 'export DF_FOLDER="$HOME/DF/$DF_VERSION/df_linux"' >> "$HOME/.dfhackrc"
|
2020-04-06 17:57:20 -06:00
|
|
|
- name: Download DF
|
|
|
|
run: |
|
2020-04-10 21:53:12 -06:00
|
|
|
source "$HOME/.dfhackrc"
|
2020-04-06 17:57:20 -06:00
|
|
|
sh travis/download-df.sh
|
|
|
|
- name: Git information
|
|
|
|
run: |
|
|
|
|
sh travis/git-info.sh
|
|
|
|
- name: Build docs
|
|
|
|
run: |
|
|
|
|
sphinx-build -qW -j3 . docs/html
|
2020-04-10 21:46:19 -06:00
|
|
|
- name: Upload docs
|
|
|
|
uses: actions/upload-artifact@master
|
2020-04-06 17:57:20 -06:00
|
|
|
with:
|
|
|
|
name: docs
|
|
|
|
path: docs/html
|
2020-04-10 21:46:19 -06:00
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install \
|
|
|
|
lua5.3 \
|
|
|
|
ruby
|
2020-04-10 21:47:47 -06:00
|
|
|
- name: Clone DFHack
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
submodules: true
|
2020-04-10 21:46:19 -06:00
|
|
|
- name: Check whitespace
|
|
|
|
run: |
|
|
|
|
python travis/lint.py
|
|
|
|
- name: Check Authors.rst
|
|
|
|
run: |
|
|
|
|
python travis/authors-rst.py
|
|
|
|
- name: Check for missing documentation
|
|
|
|
run: |
|
|
|
|
python travis/script-docs.py
|
|
|
|
- name: Check Lua syntax
|
|
|
|
run: |
|
|
|
|
python travis/script-syntax.py --ext=lua --cmd="luac5.3 -p"
|
|
|
|
- name: Check Ruby syntax
|
|
|
|
run: |
|
|
|
|
python travis/script-syntax.py --ext=rb --cmd="ruby -c"
|