|
|
@ -6,6 +6,10 @@ jobs:
|
|
|
|
build:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Set up Python 3
|
|
|
|
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
python-version: 3
|
|
|
|
- name: Install dependencies
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get update
|
|
|
@ -18,18 +22,26 @@ jobs:
|
|
|
|
lua5.3 \
|
|
|
|
lua5.3 \
|
|
|
|
ninja-build \
|
|
|
|
ninja-build \
|
|
|
|
zlib1g-dev
|
|
|
|
zlib1g-dev
|
|
|
|
sudo pip3 install --system sphinx
|
|
|
|
pip install sphinx
|
|
|
|
- name: Clone DFHack
|
|
|
|
- name: Clone DFHack
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
|
|
|
|
fetch-depth: 0 # unlimited - we need past tags
|
|
|
|
submodules: true
|
|
|
|
submodules: true
|
|
|
|
- name: Set up environment
|
|
|
|
- name: Set up environment
|
|
|
|
|
|
|
|
id: env_setup
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
|
echo export DF_VERSION="$(sh travis/get-df-version.sh)" >> "$HOME/.df-env"
|
|
|
|
DF_VERSION="$(sh travis/get-df-version.sh)"
|
|
|
|
echo export DF_FOLDER="$HOME/DF/$DF_VERSION/df_linux" >> "$HOME/.df-env"
|
|
|
|
echo "::set-env name=DF_VERSION::${DF_VERSION}"
|
|
|
|
|
|
|
|
echo "::set-output name=df_version::${DF_VERSION}"
|
|
|
|
|
|
|
|
echo "::set-env name=DF_FOLDER::${HOME}/DF/${DF_VERSION}/df_linux"
|
|
|
|
|
|
|
|
- name: Fetch DF cache
|
|
|
|
|
|
|
|
uses: actions/cache@v2
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
path: ~/DF
|
|
|
|
|
|
|
|
key: ${{ steps.env_setup.outputs.df_version }}
|
|
|
|
- name: Download DF
|
|
|
|
- name: Download DF
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
|
source "$HOME/.df-env"
|
|
|
|
|
|
|
|
sh travis/download-df.sh
|
|
|
|
sh travis/download-df.sh
|
|
|
|
- name: Build docs
|
|
|
|
- name: Build docs
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
@ -41,7 +53,6 @@ jobs:
|
|
|
|
path: docs/html
|
|
|
|
path: docs/html
|
|
|
|
- name: Build DFHack
|
|
|
|
- name: Build DFHack
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
|
source "$HOME/.df-env"
|
|
|
|
|
|
|
|
cmake \
|
|
|
|
cmake \
|
|
|
|
-S . \
|
|
|
|
-S . \
|
|
|
|
-B build-ci \
|
|
|
|
-B build-ci \
|
|
|
@ -53,7 +64,6 @@ jobs:
|
|
|
|
ninja -C build-ci install
|
|
|
|
ninja -C build-ci install
|
|
|
|
- name: Run tests
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
|
source "$HOME/.df-env"
|
|
|
|
|
|
|
|
export TERM=dumb
|
|
|
|
export TERM=dumb
|
|
|
|
mv "$DF_FOLDER"/dfhack.init-example "$DF_FOLDER"/dfhack.init
|
|
|
|
mv "$DF_FOLDER"/dfhack.init-example "$DF_FOLDER"/dfhack.init
|
|
|
|
script -qe -c "python travis/run-tests.py --headless --keep-status \"$DF_FOLDER\""
|
|
|
|
script -qe -c "python travis/run-tests.py --headless --keep-status \"$DF_FOLDER\""
|
|
|
@ -66,6 +76,12 @@ jobs:
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
name: test-artifacts
|
|
|
|
name: test-artifacts
|
|
|
|
path: artifacts
|
|
|
|
path: artifacts
|
|
|
|
|
|
|
|
- name: Clean up DF folder
|
|
|
|
|
|
|
|
# to prevent DFHack-generated files from ending up in the cache
|
|
|
|
|
|
|
|
# (download-df.sh also removes them, this is just to save cache space)
|
|
|
|
|
|
|
|
if: success() || failure()
|
|
|
|
|
|
|
|
run: |
|
|
|
|
|
|
|
|
rm -rf "$DF_FOLDER"
|
|
|
|
lint:
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|