Skip to content

Commit

Permalink
Merge branch 'Aurorastation:master' into instrumentstoloadout
Browse files Browse the repository at this point in the history
  • Loading branch information
4000daniel1 authored Apr 13, 2024
2 parents 8968612 + c1d2415 commit f4f8287
Show file tree
Hide file tree
Showing 1,923 changed files with 532,916 additions and 215,293 deletions.
34 changes: 20 additions & 14 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,31 @@

# This code requires the host/head dev to know of changes, therefore it's places in
# this dedicated section
/code/__defines/master_controller.dm @Arrow768
/code/controllers/master @Arrow768
/code/controllers/subsystems/fail2topic.dm @Arrow768
/code/game/world.dm @Arrow768
/code/modules/admin/ @Arrow768
/code/modules/web_interface/ @Arrow768
/code/modules/world_api/ @Arrow768
/code/datums/discord/ @Arrow768
/code/modules/udp/ @Arrow768
/code/defines/procs/dbcore.dm @Arrow768
/SQL/ @Arrow768
/code/modules/http/ @Arrow768
/code/datums/api.dm @Arrow768
/code/__defines/master_controller.dm @Arrow768 @NonQueueingMatt
/code/controllers/master @Arrow768 @NonQueueingMatt
/code/controllers/subsystems/fail2topic.dm @Arrow768 @NonQueueingMatt
/code/game/world.dm @Arrow768 @NonQueueingMatt
/code/modules/admin/ @Arrow768 @NonQueueingMatt
/code/modules/web_interface/ @Arrow768 @NonQueueingMatt
/code/modules/world_api/ @Arrow768 @NonQueueingMatt
/code/datums/discord/ @Arrow768 @NonQueueingMatt
/code/modules/udp/ @Arrow768 @NonQueueingMatt
/code/defines/procs/dbcore.dm @Arrow768 @NonQueueingMatt
/SQL/ @Arrow768 @NonQueueingMatt
/code/modules/http/ @Arrow768 @NonQueueingMatt
/code/datums/api.dm @Arrow768 @NonQueueingMatt

# Custom items, alb
/code/modules/customitems/item_defines.dm @Alberyk

# Mapping, inform dreamy
/maps/ @DreamySkrell

# Overmap, away sites and organs (brainmed), matt's expertise
/code/__defines/overmap.dm @NonQueueingMatt
/code/_helpers/overmap.dm @NonQueueingMatt
/code/modules/overmap/ @NonQueueingMatt
/maps/away/ @NonQueueingMatt
/maps/away/ @NonQueueingMatt @DreamySkrell

/code/__defines/organs.dm @NonQueueingMatt
/code/modules/organs/ @NonQueueingMatt
Expand Down Expand Up @@ -66,6 +69,9 @@ code/modules/tgui @JohnWildkins
/code/game/machinery/telecomms/ @JohnWildkins
/code/game/objects/items/devices/radio/ @JohnWildkins

# Sprites, wezzy
/icons/ @alsoandanswer

# Whatever else
/code/controllers/subsystems/cargo.dm @Arrow768
/code/datums/cargo.dm @Arrow768
Expand Down
159 changes: 141 additions & 18 deletions .github/workflows/byond.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
env:
MACRO_COUNT: 0
GENDER_COUNT: 6
TO_WORLD_COUNT: 181
TO_WORLD_COUNT: 179

#These variables are filled from dependencies.sh inside the steps, DO NOT SET THEM HERE
BYOND_MAJOR: ""
Expand All @@ -24,7 +24,7 @@ env:
FLYWAY_BUILD: ""
SPACEMAN_DMM_VERSION: ""
NODE_VERSION: ""
NODE_VERSION_PRECISE: ""
NODE_VERSION_LTS: ""
PYTHON_VERSION: ""

#If we want the runner to open an SSH shell for us to inspect it, fairly nieche, don't touch if you don't know what you're doing
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
# https://megalinter.io/latest/
- name: Check EditorConfig Compliance
id: ml
uses: oxsecurity/megalinter/flavors/python@v7.3.0
uses: oxsecurity/megalinter/flavors/python@v7.10.0
# Env config options outlined in https://megalinter.io/configuration/
env:
PRINT_ALPACA: false
Expand Down Expand Up @@ -191,14 +191,7 @@ jobs:
- name: Set ENV variables
run: bash dependencies.sh

#Restores SpacemanDMM from the cache repository
- name: Restore OpenDream cache
uses: actions/cache@v3
with:
path: ~/OpenDream/*
key: ${{ runner.os }}-opendream

- name: Install OpenDream
- name: Download OpenDream Compiler
run: |
bash tools/ci/install_od.sh
Expand Down Expand Up @@ -244,7 +237,7 @@ jobs:
uses: actions/setup-node@v3
with:
cache-dependency-path: tgui/yarn.lock
node-version: ${{ env.NODE_VERSION_PRECISE }}
node-version: ${{ env.NODE_VERSION_LTS }}
cache: 'yarn'

#Lint TGUI
Expand Down Expand Up @@ -301,9 +294,14 @@ jobs:
run: |
tools/bootstrap/python -m dmi.test
- name: Check DMM-Test
- name: Run Map Checks
run: |
tools/bootstrap/python -m mapmerge2.dmm_test
tools/bootstrap/python -m tools.maplint.source
- name: Scan DMMs
run: |
tools/bootstrap/python -m dmm_scanner.scan_camera_ctags
###########################################
############## GENERIC TESTS ##############
Expand Down Expand Up @@ -411,7 +409,7 @@ jobs:
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
grep "0 errors, 1 warning" build_log.txt
echo -n "$POD" > config/unit_test/identifier.txt
cp config/example/* config/ && cp config/ut/config-db.txt config/config.txt && cp config/ut/dbconfig.txt config/dbconfig.txt
Expand Down Expand Up @@ -534,7 +532,7 @@ jobs:
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
grep "0 errors, 1 warning" build_log.txt
echo -n "$POD" > config/unit_test/identifier.txt
cp config/example/* config/ && cp config/ut/config-db.txt config/config.txt && cp config/ut/dbconfig.txt config/dbconfig.txt
Expand Down Expand Up @@ -659,7 +657,132 @@ jobs:
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
grep "0 errors, 1 warning" build_log.txt
echo -n "$POD" > config/unit_test/identifier.txt
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)
- name: Upload Condensed UT Log
uses: actions/upload-artifact@v3
if: failure() || ${{ runner.debug }}
with:
name: condensed-${{ matrix.map }}-${{ matrix.pod }}.log
path: ./data/logs/**/condensed.log
retention-days: 5



###########################################
############# EXOPLANETS TESTS ############
###########################################
exoplanet_testing:
name: Run Exoplanet Tests
runs-on: ubuntu-22.04

if: ${{ !(contains(github.event.head_commit.message, '[ci skip]')) && !(contains(github.event.head_commit.message, '[ut skip]'))}}
needs: [validate-structure, lint-spacemandmm, lint-opendream, lint-tgui, lint-misc]

services:
mariadb:
image: mariadb:10.11
ports:
- 3306
env:
MYSQL_USER: build
MYSQL_PASSWORD: build
MYSQL_DATABASE: game
MYSQL_ROOT_PASSWORD: root

concurrency:
group: unit-tests-exoplanet_testing-${{ matrix.map }}-${{ matrix.pod }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

strategy:
matrix:
map: [exoplanet_testing]
pod: [exoplanet_testing-1, exoplanet_testing-2, exoplanet_testing-3]
fail-fast: false

steps:

#This allows us to SSH into the pod, and it's only enabled if we're running in debug mode
- name: Setup TMATE session (Debug only)
uses: mxschmitt/action-tmate@v3
if: ${{ env.RUNNER_DEBUG_SHELL == true }}
with:
detached: true
timeout-minutes: 5

#Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4

#Initialize the environment variables
- name: Set ENV variables
run: bash dependencies.sh

#Restores BYOND cache
- name: Restore BYOND cache
uses: actions/cache@v3
with:
path: ~/BYOND/*
key: ${{ runner.os }}-byond-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }}

- name: Restore FlyWay cache
uses: actions/cache@v3
with:
path: ~/flyway
key: ${{ runner.os }}-flyway-${{ env.FLYWAY_BUILD }}

#Add the x86 architecture and update apt-get's local indexes
- name: Prepare OS Environtment
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
#Installs the packages we need, from a cache
- name: Install OS Packages
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: gcc-multilib zlib1g-dev:i386 libssl-dev:i386 libgcc-s1:i386 libc6:i386
version: 1.1

#And natively, the packages that break from a cache
- name: Install OS Packages (Native)
run: |
sudo apt-get install libgcc-s1:i386 libssl-dev:i386
#Install flyway
- name: Install Flyway
run: |
tools/ci/install_flyway.sh
#Apply the database migration
- name: Apply Database Migrations (FlyWay)
env:
PORT: ${{ job.services.mariadb.ports[3306] }}
run: |
$HOME/flyway/flyway-$FLYWAY_BUILD/flyway migrate -user=root -password=root -url="jdbc:mariadb://localhost:$PORT/game" -validateMigrationNaming="true"
- name: Install BYOND & rust_g
run: |
source dependencies.sh
bash tools/ci/install_byond.sh
source $HOME/BYOND/byond/bin/byondsetup
bash tools/ci/install_rust_g.sh
- name: Configure pod, build and run
env:
PORT: ${{ job.services.mariadb.ports[3306] }}
POD: ${{ matrix.pod }}
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 errors, 1 warning" build_log.txt
echo -n "$POD" > config/unit_test/identifier.txt
cp config/example/* config/ && cp config/ut/config-db.txt config/config.txt && cp config/ut/dbconfig.txt config/dbconfig.txt
Expand Down Expand Up @@ -783,7 +906,7 @@ jobs:
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
grep "0 errors, 1 warning" build_log.txt
echo -n "$POD" > config/unit_test/identifier.txt
cp config/example/* config/ && cp config/ut/config-db.txt config/config.txt && cp config/ut/dbconfig.txt config/dbconfig.txt
Expand Down Expand Up @@ -906,7 +1029,7 @@ jobs:
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
grep "0 errors, 1 warning" build_log.txt
echo -n "$POD" > config/unit_test/identifier.txt
cp config/example/* config/ && cp config/ut/config-db.txt config/config.txt && cp config/ut/dbconfig.txt config/dbconfig.txt
Expand Down
75 changes: 46 additions & 29 deletions .github/workflows/update_changelog.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,53 @@
name: "Build Changelog"
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
push:
branches:
- master
paths:
- 'html/changelogs/**'

jobs:
update-changelog:
concurrency: changelog
compile:
name: "Compile changelogs"
runs-on: ubuntu-22.04
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
token: ${{ secrets.BOT_TOKEN_AURORA }}

- name: Update Changelogs
run: |
tools/bootstrap/python tools/GenerateChangelog/ss13_genchangelog.py html/changelog.html html/changelogs
- name: Commit Changelogs
run: |
git pull origin master
git config --local user.email "[email protected]"
git config --local user.name "AuroraBuildBot"
git add --force html/*
git commit -m "Automatic Changelog compile [ci skip]" -a || true
- name: Push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.BOT_TOKEN_AURORA }}
- name: "Check for BOT_TOKEN_AURORA secret and pass true to output if it exists to be checked by later steps"
id: value_holder
env:
ENABLER_SECRET: ${{ secrets.BOT_TOKEN_AURORA }}
run: |
unset SECRET_EXISTS
if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi
echo "ACTIONS_ENABLED=$SECRET_EXISTS" >> $GITHUB_OUTPUT
- name: "Setup python"
if: steps.value_holder.outputs.ACTIONS_ENABLED
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: "Install deps"
if: steps.value_holder.outputs.ACTIONS_ENABLED
run: |
python -m pip install --upgrade pip
python -m pip install pyyaml
sudo apt-get install dos2unix
- name: "Checkout"
if: steps.value_holder.outputs.ACTIONS_ENABLED
uses: actions/checkout@v4
with:
fetch-depth: 25
persist-credentials: false
- name: "Compile"
if: steps.value_holder.outputs.ACTIONS_ENABLED
run: |
tools/bootstrap/python tools/GenerateChangelog/ss13_genchangelog.py html/changelogs
- name: Commit
if: steps.value_holder.outputs.ACTIONS_ENABLED
run: |
git config --local user.email "[email protected]"
git config --local user.name "Changelogs"
git pull origin master
git add html/changelogs
git commit -m "Automatic changelog compile [ci skip]" -a || true
- name: "Push"
if: steps.value_holder.outputs.ACTIONS_ENABLED
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.BOT_TOKEN_AURORA || secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,6 @@ __pycache__/
.python-version

define_sanity_output.txt
tools/bootstrap/.cache/venv/

# Unit test / coverage reports
.cache
2 changes: 1 addition & 1 deletion .tgs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
version: 1
# The BYOND version to use (kept in sync with dependencies.sh by the "TGS Test Suite" CI job)
# Must be interpreted as a string, keep quoted
byond: "515.1623"
byond: "515.1633"
# Folders to create in "<instance_path>/Configuration/GameStaticFiles/"
static_files:
# Config directory should be static
Expand Down
4 changes: 4 additions & 0 deletions SQL/migrate-2023/V010__fix_pref_saving.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--
-- Fixes prefs not saving because lastmotd and lastmemo don't exist.
--
ALTER TABLE `ss13_player_preferences` DROP COLUMN `lastmotd`, DROP COLUMN `lastmemo`;
Loading

0 comments on commit f4f8287

Please sign in to comment.