Skip to content

OpenDream compatibility #701

OpenDream compatibility

OpenDream compatibility #701

Workflow file for this run

name: CI
on:
push:
branches:
- latest
pull_request:
branches:
- latest
jobs:
run_linters:
name: Run Linters
runs-on: ubuntu-20.04
steps:
# Fetch
- name: Fetch latest
uses: actions/checkout@v2
with:
ref: latest
- name: Fetch PR commits
uses: actions/checkout@v2
# Setup caches
- name: Setup SpacemanDMM cache
uses: actions/cache@v2
with:
path: $HOME/SpacemanDMM
key: ${{ runner.os }}-spacemandmm
- name: Setup Yarn cache
uses: actions/cache@v2
with:
path: tgui/.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('tgui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
- name: Setup bootstrap cache
uses: actions/cache@v2
with:
path: tools/bootstrap/.cache
key: ${{ runner.os }}-bootstrap-${{ hashFiles('./dependencies.sh', 'tools/bootstrap/node', 'tools/bootstrap/python') }}
# Dependencies & tools
- name: Install dependencies
id: deps
run: |
pip3 install setuptools
bash tools/ci/install_node.sh
bash tools/ci/install_spaceman_dmm.sh dreamchecker
tools/bootstrap/python -c ''
# Actual checks
- name: Check changelog
if: always()
run: bash tools/ci/check_changelogs.sh
- name: Check DMIs
if: always()
run: tools/bootstrap/python -m dmi.test
- name: Check tgUI linting
if: always()
run: tools/build/build --ci tgui-lint
- name: Check regex-linting
if: always()
run: tools/bootstrap/python -m ci.check_regex --log-changes-only
- name: Check HTML tags
if: always()
run: tools/bootstrap/python -m ci.tag_matcher .
- name: Check Dreamchecker
if: always()
run: ~/dreamchecker -c SpacemanDMM.toml > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1
# Annotations
- name: Annotate regex-lints
if: always()
run: |
cat check_regex_output.txt
- name: Annotate Dreamchecker lints
uses: yogstation13/DreamAnnotate@v2
if: always()
with:
outputFile: output-annotations.txt
test_compile:
name: Test Compile
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Byond cache
uses: actions/cache@v2
with:
path: $HOME/BYOND
key: ${{ runner.os }}-byond
- name: Setup bootstrap cache
uses: actions/cache@v2
with:
path: tools/bootstrap/.cache
key: ${{ runner.os }}-bootstrap-${{ hashFiles('./dependencies.sh', 'tools/bootstrap/node', 'tools/bootstrap/python') }}
- name: Setup Yarn cache
uses: actions/cache@v2
with:
path: tgui/.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('tgui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
- name: Run compile
run: |
bash tools/ci/install_byond.sh
source $HOME/BYOND/byond/bin/byondsetup
tools/build/build -Werror
maps:
name: Unit-Test
runs-on: ubuntu-20.04
strategy:
matrix:
maps: [example, tyclo-pluto, away_sites_testing]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Setup Byond cache
uses: actions/cache@v2
with:
path: $HOME/BYOND
key: ${{ runner.os }}-byond
- name: Setup bootstrap cache
uses: actions/cache@v2
with:
path: tools/bootstrap/.cache
key: ${{ runner.os }}-bootstrap-${{ hashFiles('./dependencies.sh', 'tools/bootstrap/node', 'tools/bootstrap/python') }}
- name: Setup Yarn cache
uses: actions/cache@v2
with:
path: tgui/.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('tgui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install rust-g
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install -o APT::Immediate-Configure=false libssl1.1:i386
bash tools/ci/install_rust_g.sh
- name: Copy example config
run: |
cp -p config/example/* config/
- name: Run tests
env:
MAP_PATH: ${{matrix.maps}}
run: |
bash tools/ci/install_byond.sh
source $HOME/BYOND/byond/bin/byondsetup
tools/build/build --map-override=${MAP_PATH} test
- name: Log post-processing
run: |
bash tools/ci/check_log.sh data/logs/ci/diary.log