Fix atomizer changelog (#16532) #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Suite | |
on: | |
merge_group: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
env: | |
MACRO_COUNT: 0 | |
GENDER_COUNT: 6 | |
TO_WORLD_COUNT: 199 | |
TGM_CHECK: "//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE" | |
jobs: | |
lint: | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install | |
run: | | |
sudo apt-get install python3-cffi | |
pip install --user -r ./tools/requirements.txt | |
chmod +x ./scripts/code_check.sh && ./scripts/code_check.sh $PWD | |
bash tools/ci/install_spaceman_dmm.sh dreamchecker | |
- name: Code checks | |
run: | | |
awk -f tools/indentation.awk **/*.dm | |
python3 tools/TagMatcher/tag-matcher.py ../.. | |
python3 tools/GenerateChangelog/ss13_genchangelog.py html/changelog.html html/changelogs --dry-run | |
python3 tools/mapmerge2/travis_mapcheck.py | |
echo "6a5ae087fe5bfa66e52e508655e57120 *html/changelogs/example.yml" | md5sum -c - | |
- name: Run dreamchecker | |
id: runDreamchecker | |
run: ~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1 | |
- name: Annotate Lints | |
if: failure() && steps.runDreamchecker.outcome == 'failure' | |
uses: yogstation13/DreamAnnotate@v2 | |
with: | |
outputFile: output-annotations.txt | |
# TODO: Move that to the linters at some point | |
tgui-test: | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 14 | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Restore Yarn cache | |
uses: actions/cache@v3 | |
with: | |
path: tgui/.yarn/cache | |
key: ${{ runner.os }}-yarn-${{ hashFiles('tgui/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Lint TGUI | |
run: | | |
tools/build/build --ci lint tgui-test | |
unit-test-linux: | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
strategy: | |
matrix: | |
map: [runtime, aurora, sccv_horizon, away_sites_testing, exoplanet_testing] | |
fail-fast: false | |
runs-on: ubuntu-22.04 | |
needs: lint | |
services: | |
mariadb: | |
image: mariadb:latest | |
ports: | |
- 3306 | |
env: | |
MYSQL_USER: build | |
MYSQL_PASSWORD: build | |
MYSQL_DATABASE: game | |
MYSQL_ROOT_PASSWORD: root | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install BYOND | |
run: | | |
source .versions.sh | |
sudo dpkg --add-architecture i386 | |
sudo apt-get update | |
sudo apt-get install -y gcc-multilib zlib1g-dev:i386 libssl-dev:i386 libgcc-s1:i386 libc6:i386 | |
bash tools/ci/install_byond.sh | |
source $HOME/BYOND/byond/bin/byondsetup | |
echo "Getting rust_g from https://github.com/Aurorastation/rust-g/releases/download/${RUST_G_VERSION}/librust_g.so" | |
wget "https://github.com/Aurorastation/rust-g/releases/download/${RUST_G_VERSION}/librust_g.so" -O ./librust_g.so | |
chmod +x ./librust_g.so | |
ldd ./librust_g.so | |
- name: Install Flyway | |
run: | | |
source .versions.sh | |
bash scripts/install-flyway.sh | |
- name: Migrate database | |
env: | |
PORT: ${{ job.services.mariadb.ports[3306] }} | |
run: | | |
source .versions.sh | |
$HOME/flyway-$FLYWAY_BUILD/flyway migrate -user=root -password=root -url="jdbc:mariadb://localhost:$PORT/game" | |
- name: Build | |
run: | | |
export LD_LIBRARY_PATH=./:$PWD:$HOME/BYOND/byond/bin:/usr/local/lib:$LD_LIBRARY_PATH | |
scripts/dm.sh -DUNIT_TEST -M${{ matrix.map }} aurorastation.dme | |
grep "0 warnings" build_log.txt | |
- name: Run tests | |
env: | |
PORT: ${{ job.services.mariadb.ports[3306] }} | |
run: | | |
export LD_LIBRARY_PATH=./:$PWD:$HOME/BYOND/byond/bin:/usr/local/lib:$LD_LIBRARY_PATH | |
cp config/example/* config/ && cp config/ut/config-db.txt config/config.txt && cp config/ut/dbconfig.txt config/dbconfig.txt | |
echo "PORT $PORT" >> config/dbconfig.txt | |
$HOME/BYOND/byond/bin/DreamDaemon aurorastation.dmb -invisible -trusted -core 2>&1 | tee log.txt | |
grep "All Unit Tests Passed" log.txt | |
(! grep "runtime error:" log.txt) |