Skip to content

Commit

Permalink
Merge pull request #16 from Ms-Mee/shiptest-mirror-13-08-2024
Browse files Browse the repository at this point in the history
Shiptest Mirror #7 [MDB IGNORE]
  • Loading branch information
TheNeoGamer42 authored Aug 22, 2024
2 parents 0c0780f + eb46ef6 commit afcc3ff
Show file tree
Hide file tree
Showing 1,972 changed files with 137,529 additions and 261,421 deletions.
23 changes: 11 additions & 12 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@
# In the event that multiple org members are to be informed of changes
# to the same file or dir, add them to the end under Multiple Owners

# MarkSuckerberg
/code/controllers/subsystem/shuttle.dm @MarkSuckerberg
/code/modules/shuttle/ @MarkSuckerberg
/code/modules/overmap/ @MarkSuckerberg

# Teams
# TEAMS

# Map Maintainers
/_maps/ @shiptest-ss13/maptainers


# Sprite Maintainers
/icons/ @shiptest-ss13/spritetainers
/whitesands/icons/ @shiptest-ss13/spritetainers


# CI and tool chains
/tools/ @shiptest-ss13/admins

#SIC SEMPER TYRANNIS
/_maps/RandomRuins/LavaRuins/lavaland_surface_sloth.dmm @MarkSuckerberg

# MAINTAINERS


# CONTRIBUTORS


# MULTIPLE OWNERS
662 changes: 355 additions & 307 deletions .github/CONTRIBUTING.md

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
add: Added new things
add: Added more things
del: Removed old things
tweak: tweaked a few things
balance: rebalanced something
fix: fixed a few things
soundadd: added a new sound thingy
Expand Down
31 changes: 17 additions & 14 deletions .github/RUNNING_A_SERVER.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ First-time installation should be fairly straightforward. First, you'll need
BYOND installed. You can get it from https://www.byond.com/download. Once you've done
that, extract the game files to wherever you want to keep them. This is a
sourcecode-only release, so the next step is to compile the server files.
Open shiptest.dme by double-clicking it, open the Build menu, and click
compile. This'll take a little while, and if everything's done right you'll get
a message like this:

Double-click `BUILD.bat` in the root directory of the source code. This'll take
a little while, and if everything's done right you'll get a message like this:

```
saving shiptest.dmb (DEBUG mode)
Expand All @@ -17,14 +17,6 @@ If you see any errors or warnings, something has gone wrong - possibly a corrupt
download or the files extracted wrong. If problems persist, ask for assistance
in [the discord](https://shiptest.net/discord)

Once that's done, open up the config folder. You'll want to edit config.txt to
set the probabilities for different gamemodes in Secret and to set your server
location so that all your players don't get disconnected at the end of each
round. It's recommended you don't turn on the gamemodes with probability 0,
except Extended, as they have various issues and aren't currently being tested,
so they may have unknown and bizarre bugs. Extended is essentially no mode, and
isn't in the Secret rotation by default as it's just not very fun.

You'll also want to edit config/admins.txt to remove the default admins and add
your own. "Game Master" is the highest level of access, and probably the one
you'll want to use for now. You can set up your own ranks and find out more in
Expand All @@ -43,9 +35,15 @@ Windows DLL is included in this repository, but Linux users will need to build
and install it themselves. Directions can be found at the [rust-g
repo](https://github.com/tgstation/rust-g).

**Unlike other servers,** Shiptest also uses an external library called Auxmos, which
needs to be compiled on linux systems. Like with rust-g, Windows hosts should be fine, as the DLL
it needs is shipped with the repository. Please download and install [auxmos](https://github.com/Putnam3145/auxmos)
using the instructions provided if you're running a linux system.
`tools/ci/build_auxmos.sh` can also be used if you're in a rush.

Finally, to start the server, run Dream Daemon and enter the path to your
compiled shiptest.dmb file. Make sure to set the port to the one you
specified in the config.txt, and set the Security box to 'Safe'. Then press GO
specified in the config.txt, and set the Security box to 'Trusted'. Then press GO
and the server should start up and be ready to join. It is also recommended that
you set up the SQL backend (see below).

Expand All @@ -68,9 +66,14 @@ https://github.com/tgstation/tgstation-server

## SQL SETUP

The SQL backend requires a Mariadb server running 10.2 or later. Mysql is not supported but Mariadb is a drop in replacement for mysql. SQL is required for the library, stats tracking, admin notes, and job-only bans, among other features, mostly related to server administration. Your server details go in /config/dbconfig.txt, and the SQL schema is in /SQL/tgstation_schema.sql and /SQL/tgstation_schema_prefix.sql depending on if you want table prefixes. More detailed setup instructions are located here: https://shiptest.net/wiki/Downloading_the_source_code#Setting_up_the_database
The SQL backend requires a Mariadb server running 10.2 or later. Mysql is not
supported, but Mariadb is a drop in replacement for mysql. SQL is required for the
library, stats tracking, admin notes, and job-only bans, among other features,
mostly related to server administration. Your server details go in /config/dbconfig.txt,
and the SQL schema is in /SQL/tgstation_schema.sql and /SQL/tgstation_schema_prefix.sql
depending on if you want table prefixes.

If you are hosting a testing server on windows you can use a standalone version of MariaDB pre load with a blank (but initialized) tgdb database. Find them here: https://tgstation13.download/database/ Just unzip and run for a working (but insecure) database server. Includes a zipped copy of the data folder for easy resetting back to square one.
More detailed setup instructions are located here: https://shiptest.net/wiki/Downloading_the_source_code#Setting_up_the_database

## WEB/CDN RESOURCE DELIVERY

Expand Down
39 changes: 33 additions & 6 deletions .github/workflows/autowiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,59 @@ jobs:
unset SECRET_EXISTS
if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi
echo "SECRETS_ENABLED=$SECRET_EXISTS" >> $GITHUB_OUTPUT
- name: Checkout
if: steps.secrets_set.outputs.SECRETS_ENABLED
uses: actions/checkout@v3
- name: Restore BYOND cache

- name: Setup BYOND cache
id: cache-byond
if: steps.secrets_set.outputs.SECRETS_ENABLED
uses: actions/cache@v3
with:
path: ~/BYOND
key: ${{ runner.os }}-byond-${{ secrets.CACHE_PURGE_KEY }}
- name: Install rust-g
key: ${{ runner.os }}-byond-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}

- name: Install BYOND
if: steps.cache-byond.outputs.cache-hit != 'true' && steps.secrets_set.outputs.SECRETS_ENABLED
run: bash tools/ci/install_byond.sh

- name: Install runtime dependencies
if: steps.secrets_set.outputs.SECRETS_ENABLED
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install -o APT::Immediate-Configure=false libssl-dev:i386
sudo apt install -o APT::Immediate-configure=false libssl-dev:i386
bash tools/ci/install_rust_g.sh
- name: Install auxmos
- name: Cache dependencies
if: steps.secrets_set.outputs.SECRETS_ENABLED
uses: actions/cache@v3
with:
path: ~/.byond/bin
key: ${{ runner.os }}-deps-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}

- name: Install build dependencies
if: steps.cache-deps.outputs.cache-hit != 'true' && steps.secrets_set.outputs.SECRETS_ENABLED
run: |
bash tools/ci/install_auxmos.sh
sudo apt install -o APT::Immediate-Configure=false libgcc-s1:i386 g++-multilib zlib1g-dev:i386
rustup target add i686-unknown-linux-gnu
- name: Build auxmos
if: steps.cache-deps.outputs.cache-hit != 'true' && steps.secrets_set.outputs.SECRETS_ENABLED
run: bash tools/ci/build_auxmos.sh

- name: Build rust-g
if: steps.cache-deps.outputs.cache-hit != 'true' && steps.secrets_set.outputs.SECRETS_ENABLED
run: bash tools/ci/build_rust_g.sh

- name: Compile and generate Autowiki files
if: steps.secrets_set.outputs.SECRETS_ENABLED
run: |
bash tools/ci/install_byond.sh
source $HOME/BYOND/byond/bin/byondsetup
tools/build/build --ci autowiki
- name: Run Autowiki
if: steps.secrets_set.outputs.SECRETS_ENABLED
env:
Expand Down
45 changes: 30 additions & 15 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,26 @@ jobs:
with:
ref: master
- uses: actions/checkout@v3

- name: Restore SpacemanDMM cache
id: cache-spacemandmm
uses: actions/cache@v3
with:
path: ~/dreamchecker
key: ${{ runner.os }}-spacemandmm-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}
- name: Build SpacemanDMM
run: bash tools/ci/build_spaceman_dmm.sh dreamchecker

- name: Restore BYOND cache
id: cache-byond
uses: actions/cache@v3
with:
path: ~/SpacemanDMM
key: ${{ runner.os }}-spacemandmm-${{ secrets.CACHE_PURGE_KEY }}
path: ~/BYOND
key: ${{ runner.os }}-byond-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}
- name: Install BYOND
if: steps.cache-byond.outputs.cache-hit != 'true'
run: bash tools/ci/install_byond.sh

- name: Restore Yarn cache
uses: actions/cache@v3
with:
Expand All @@ -33,14 +48,15 @@ jobs:
${{ runner.os }}-build-${{ secrets.CACHE_PURGE_KEY }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Tools
run: |
pip3 install setuptools
bash tools/ci/install_node.sh
bash tools/ci/install_byond.sh
bash tools/ci/install_spaceman_dmm.sh dreamchecker
cargo install ripgrep --features pcre2
tools/bootstrap/python -c ''
- name: Run Linters
run: |
tools/bootstrap/python -m tools.maplint.source --github
Expand All @@ -52,19 +68,17 @@ jobs:
tools/bootstrap/python -m dmi.test
tools/bootstrap/python -m mapmerge2.dmm_test
~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1
- name: Annotate Lints
uses: yogstation13/DreamAnnotate@v2
if: always()
with:
outputFile: output-annotations.txt
- uses: actions/setup-python@v4
with:
python-version: "3.9"

- name: Run Check Regex
run: |
tools/bootstrap/python -m ci.check_regex --log-changes-only --github-actions
- name: Annotate Regex Matches
if: always()
run: |
cat check_regex_output.txt
Expand All @@ -74,30 +88,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Python setup
uses: actions/setup-python@v4
with:
python-version: "3.9"

- name: Setup cache
id: cache-byond
uses: actions/cache@v3
with:
path: ~/BYOND
key: ${{ runner.os }}-byond-cache-${{ hashFiles('Dockerfile') }}
key: ${{ runner.os }}-byond-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}
- name: Install BYOND
if: steps.cache-byond.outputs.cache-hit != 'true'
run: bash tools/ci/install_byond.sh

- name: Compile All Maps
run: |
bash tools/ci/install_byond.sh
source $HOME/BYOND/byond/bin/byondsetup
tools/build/build --ci dm -DCIBUILDING -DCITESTING -DALL_MAPS -DFULL_INIT
run_all_tests:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Integration Tests
strategy:
fail-fast: true
fail-fast: false
matrix:
arg: [
"BASIC_TESTS",
Expand Down Expand Up @@ -129,6 +140,7 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3

- name: Restore Yarn cache
uses: actions/cache@v3
with:
Expand All @@ -138,14 +150,17 @@ jobs:
${{ runner.os }}-build-${{ secrets.CACHE_PURGE_KEY }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Compile
run: pwsh tools/ci/build.ps1
env:
DM_EXE: "C:\\byond\\bin\\dm.exe"

- name: Create artifact
run: |
md deploy
bash tools/deploy.sh ./deploy
- name: Deploy artifact
uses: actions/upload-artifact@v3
with:
Expand Down
49 changes: 37 additions & 12 deletions .github/workflows/run_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,61 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v3
- name: Setup cache

- name: Setup BYOND cache
id: cache-byond
uses: actions/cache@v3
with:
path: ~/BYOND
key: ${{ runner.os }}-byond-cache-${{ hashFiles('Dockerfile') }}
key: ${{ runner.os }}-byond-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}

- name: Install BYOND
if: steps.cache-byond.outputs.cache-hit != 'true'
run: bash tools/ci/install_byond.sh

- name: Install runtime dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install -o APT::Immediate-Configure=false libssl-dev:i386
- name: Setup dependencies cache
id: cache-deps
uses: actions/cache@v3
with:
path: ~/.byond/bin
key: ${{ runner.os }}-deps-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}

- name: Install build dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
sudo apt install -o APT::Immediate-Configure=false libgcc-s1:i386 g++-multilib zlib1g-dev:i386
rustup target add i686-unknown-linux-gnu
- name: Build auxmos
if: steps.cache-deps.outputs.cache-hit != 'true'
run: bash tools/ci/build_auxmos.sh

- name: Build rust-g
if: steps.cache-deps.outputs.cache-hit != 'true'
run: bash tools/ci/build_rust_g.sh

- name: Setup database
run: |
sudo systemctl start mysql
mysql -u root -proot -e 'CREATE DATABASE tg_ci;'
mysql -u root -proot tg_ci < SQL/tgstation_schema.sql
mysql -u root -proot -e 'CREATE DATABASE tg_ci_prefixed;'
mysql -u root -proot tg_ci_prefixed < SQL/tgstation_schema_prefixed.sql
- name: Install rust-g
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install -o APT::Immediate-Configure=false libssl-dev:i386
bash tools/ci/install_rust_g.sh
- name: Install auxmos
run: |
bash tools/ci/install_auxmos.sh
- name: Configure version
if: ${{ inputs.major }}
run: |
echo "BYOND_MAJOR=${{ inputs.major }}" >> $GITHUB_ENV
echo "BYOND_MINOR=${{ inputs.minor }}" >> $GITHUB_ENV
- name: Compile Tests
run: |
bash tools/ci/install_byond.sh
source $HOME/BYOND/byond/bin/byondsetup
tools/build/build --ci dm -DCIBUILDING -DANSICOLORS -D${{ inputs.arg }}
- name: Run Tests
Expand Down
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: "514.1588"
byond: "515.1633"
# Folders to create in "<instance_path>/Configuration/GameStaticFiles/"
static_files:
# Config directory should be static
Expand Down
Loading

0 comments on commit afcc3ff

Please sign in to comment.