Skip to content

Commit

Permalink
TGMC Q1 2025 TGUI bump/516 compat (tgstation#17054)
Browse files Browse the repository at this point in the history
Co-authored-by: TiviPlus <[email protected]>
  • Loading branch information
TiviPlus and TiviPlus authored Feb 16, 2025
1 parent 226f800 commit b737dbc
Show file tree
Hide file tree
Showing 542 changed files with 30,419 additions and 21,180 deletions.
51 changes: 51 additions & 0 deletions .github/actions/restore_or_install_byond/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This action attempts to restore BYOND from a cache, or to install it otherwise.
name: Restore or Install BYOND
description: Attempts to restore a specified BYOND version from cache; if it can't, it installs it.

inputs:
major:
description: "The major BYOND version to install. Defaults to the BYOND_MAJOR specified in `dependencies.sh`."
required: false
type: string
minor:
description: "The minor BYOND version to install. Defaults to the BYOND_MINOR specified in `dependencies.sh`."
required: false
type: string

runs:
using: composite
steps:
- name: Configure BYOND version from inputs
if: ${{ inputs.major }}
shell: bash
run: |
echo "BYOND_MAJOR=${{ inputs.major }}" >> $GITHUB_ENV
echo "BYOND_MINOR=${{ inputs.minor }}" >> $GITHUB_ENV
- name: Configure BYOND version from dependencies.sh
if: ${{ !inputs.major }}
shell: bash
run: |
source dependencies.sh
echo "BYOND_MAJOR=$BYOND_MAJOR" >> $GITHUB_ENV
echo "BYOND_MINOR=$BYOND_MINOR" >> $GITHUB_ENV
# The use of `actions/cache/restore` and `actions/cache/save` here is deliberate, as we want to
# save the BYOND install to a cache as early as possible. If we used just `actions/cache`, it
# would only attempt to save the cache at the end of a job. This ensures that if a workflow run
# is cancelled, we already have a cache to restore from.
- name: Restore BYOND cache
id: restore_byond_cache
uses: actions/cache/restore@v4
with:
path: ~/BYOND
key: ${{ runner.os }}-byond-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }}
- name: Install BYOND
if: ${{ !steps.restore_byond_cache.outputs.cache-hit }}
shell: bash
run: bash tools/ci/install_byond.sh
- name: Save BYOND cache
if: ${{ !steps.restore_byond_cache.outputs.cache-hit }}
uses: actions/cache/save@v4
with:
path: ~/BYOND
key: ${{ steps.restore_byond_cache.outputs.cache-primary-key }}
26 changes: 26 additions & 0 deletions .github/actions/setup_node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This action is a wrapper around `actions/setup-node`, to use the version specified in
# `dependencies.sh`.
name: Setup Node
description: Install Node using the version specified in `dependencies.sh`; additionally, restores the Yarn cache if one exists

inputs:
restore-yarn-cache:
description: 'If `true`, restores the Yarn cache alongside installing node.'
required: false
type: boolean
default: false

runs:
using: composite
steps:
- name: Configure Node version
shell: bash
run: |
source dependencies.sh
echo "NODE_VERSION_REQUIRED=$NODE_VERSION_LTS" >> $GITHUB_ENV
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION_REQUIRED }}
cache: ${{ fromJSON(inputs.restore-yarn-cache) && 'yarn' || '' }}
cache-dependency-path: ${{ fromJSON(inputs.restore-yarn-cache) && 'tgui/yarn.lock' || '' }}
1 change: 1 addition & 0 deletions .github/alternate_byond_versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
# Format is version: map
# Example:
# 500.1337: runtimestation
516.1648: debugdalus;516
45 changes: 15 additions & 30 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,10 @@ jobs:
key: ${{ runner.os }}-spacemandmm-${{ hashFiles('dependencies.sh') }}
restore-keys: |
${{ runner.os }}-spacemandmm-
- name: Restore Yarn cache
uses: actions/cache@v4
- name: Setup Node
uses: ./.github/actions/setup_node
with:
path: tgui/.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('tgui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Restore Node cache
uses: actions/cache@v4
with:
path: ~/.nvm
key: ${{ runner.os }}-node-${{ hashFiles('dependencies.sh') }}
restore-keys: |
${{ runner.os }}-node-
restore-yarn-cache: true
- name: Restore Bootstrap cache
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -72,7 +62,6 @@ jobs:
- name: Install Tools
run: |
pip3 install setuptools
bash tools/ci/install_node.sh
bash tools/ci/install_spaceman_dmm.sh dreamchecker
bash tools/ci/install_ripgrep.sh
tools/bootstrap/python -c ''
Expand Down Expand Up @@ -125,14 +114,12 @@ jobs:
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Restore BYOND cache
uses: actions/cache@v4
with:
path: ~/BYOND
key: ${{ runner.os }}-byond-${{ hashFiles('dependencies.sh') }}
- name: Setup Node
uses: ./.github/actions/setup_node
- name: Restore BYOND from Cache
uses: ./.github/actions/restore_or_install_byond
- 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
- name: Check client Compatibility
Expand All @@ -143,7 +130,7 @@ jobs:

collect_data:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Collect data for other tasks
name: Collect data and setup caches for other tasks
runs-on: ubuntu-22.04
outputs:
maps: ${{ steps.map_finder.outputs.maps }}
Expand All @@ -164,13 +151,14 @@ jobs:
- name: Find Alternate Tests
id: alternate_test_finder
run: |
ALTERNATE_TESTS_JSON=$(jq -nRc '[inputs | capture("^(?<major>[0-9]+)\\.(?<minor>[0-9]+): (?<map>.+)$")]' .github/alternate_byond_versions.txt)
echo "alternate_tests=$ALTERNATE_TESTS_JSON" >> $GITHUB_OUTPUT
ALTERNATE_TESTS_JSON=$(jq -nRc '[inputs | capture("^(?<major>[0-9]+)\\.(?<minor>[0-9]+): (?<map>[^;]+);?(?<max_client_version>[0-9]+)?$")]' .github/alternate_byond_versions.txt)
- name: Collect byond client version configuration
id: max_required_byond_client
#the regex here does not filter out non-numbers because error messages about no input are less helpful then error messages about bad input (which includes the bad input)
run: |
echo "max_required_byond_client=$(grep -Ev '^[[:blank:]]{0,}#{1,}|^[[:blank:]]{0,}$' .github/max_required_byond_client.txt | tail -n1)" >> $GITHUB_OUTPUT
- name: Set up BYOND cache
uses: ./.github/actions/restore_or_install_byond

run_all_tests:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
Expand All @@ -186,7 +174,7 @@ jobs:
uses: ./.github/workflows/run_integration_tests.yml
with:
map: ${{ matrix.map }}
max_required_byond_client: ${{needs.collect_data.outputs.max_required_byond_client}}
max_required_byond_client: ${{ matrix.setup.max_client_version || needs.collect_data.outputs.max_required_byond_client }}

run_alternate_tests:
if: ( !contains(github.event.head_commit.message, '[ci skip]') && needs.collect_data.outputs.alternate_tests != '[]' )
Expand Down Expand Up @@ -224,13 +212,10 @@ jobs:
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Restore Yarn cache
uses: actions/cache@v4
- name: Setup Node
uses: ./.github/actions/setup_node
with:
path: tgui/.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('tgui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
restore-yarn-cache: true
- name: Compile
run: pwsh tools/ci/build.ps1
env:
Expand Down
17 changes: 7 additions & 10 deletions .github/workflows/run_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,21 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v4
- name: Restore BYOND cache
uses: actions/cache@v4
with:
path: ~/BYOND
key: ${{ runner.os }}-byond-${{ hashFiles('dependencies.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/tgmc-schema.sql
- name: Setup Node
uses: ./.github/actions/setup_node
- name: Install rust-g
run: |
bash tools/ci/install_rust_g.sh
- name: Configure version
run: |
echo "BYOND_MAJOR=${{ inputs.major }}" >> $GITHUB_ENV
echo "BYOND_MINOR=${{ inputs.minor }}" >> $GITHUB_ENV
if: ${{ inputs.major }}
- name: Restore BYOND from Cache
uses: ./.github/actions/restore_or_install_byond
with:
major: ${{ inputs.major }}
minor: ${{ inputs.minor }}
- name: Compile Tests
id: compile_tests
run: |
Expand Down
34 changes: 29 additions & 5 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,30 @@
"dependsOn": "dm: reparse",
"label": "Build All"
},
{
"type": "process",
"command": "tools/build/build",
"args": ["-DLOWMEMORYMODE"],
"windows": {
"command": ".\\tools\\build\\build.bat",
"args": ["-DLOWMEMORYMODE"]
},
"options": {
"env": {
"DM_EXE": "${config:dreammaker.byondPath}"
}
},
"problemMatcher": [
"$dreammaker",
"$tsc",
"$eslint-stylish"
],
"group": {
"kind": "build"
},
"dependsOn": "dm: reparse",
"label": "Build All (low memory mode)"
},
{
"type": "dreammaker",
"dme": "tgmc.dme",
Expand All @@ -33,6 +57,11 @@
"group": "build",
"label": "dm: build - tgmc.dme"
},
{
"command": "${command:dreammaker.reparse}",
"group": "build",
"label": "dm: reparse"
},
{
"type": "shell",
"command": "bin/tgui-build",
Expand Down Expand Up @@ -97,11 +126,6 @@
],
"group": "build",
"label": "tgui: rebuild tgfont"
},
{
"command": "${command:dreammaker.reparse}",
"group": "build",
"label": "dm: reparse"
}
]
}
28 changes: 14 additions & 14 deletions code/__DEFINES/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@

#define R_EVERYTHING (ALL) //the sum of all other rank permissions, used for +EVERYTHING

#define ADMIN_QUE(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];moreinfo=[REF(user)]'>?</a>)"
#define ADMIN_FLW(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];observefollow=[REF(user)]'>FLW</a>)"
#define ADMIN_JMP(src) "(<a href='?_src_=holder;[HrefToken(TRUE)];observecoordjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)"
#define ADMIN_JMP_USER(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];observecoordjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)"
#define ADMIN_PP(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];playerpanel=[REF(user)]'>PP</a>)"
#define ADMIN_VV(atom) "(<a href='?_src_=vars;[HrefToken(forceGlobal = TRUE)];vars=[REF(atom)]'>VV</a>)"
#define ADMIN_SM(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];subtlemessage=[REF(user)]'>SM</a>)"
#define ADMIN_IF(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];imginaryfriend=[REF(user)]'>IF</a>)"
#define ADMIN_TP(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];traitorpanel=[REF(user)]'>TP</a>)"
#define ADMIN_KICK(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];kick=[REF(user)]'>KICK</a>)"
#define ADMIN_SC(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];spawncookie=[REF(user)]'>SC</a>)"
#define ADMIN_SFC(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];spawnfortunecookie=[REF(user)]'>SFC</a>)"
#define ADMIN_QUE(user) "(<a href='byond://?_src_=holder;[HrefToken(TRUE)];moreinfo=[REF(user)]'>?</a>)"
#define ADMIN_FLW(user) "(<a href='byond://?_src_=holder;[HrefToken(TRUE)];observefollow=[REF(user)]'>FLW</a>)"
#define ADMIN_JMP(src) "(<a href='byond://?_src_=holder;[HrefToken(TRUE)];observecoordjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)"
#define ADMIN_JMP_USER(user) "(<a href='byond://?_src_=holder;[HrefToken(TRUE)];observecoordjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)"
#define ADMIN_PP(user) "(<a href='byond://?_src_=holder;[HrefToken(TRUE)];playerpanel=[REF(user)]'>PP</a>)"
#define ADMIN_VV(atom) "(<a href='byond://?_src_=vars;[HrefToken(forceGlobal = TRUE)];vars=[REF(atom)]'>VV</a>)"
#define ADMIN_SM(user) "(<a href='byond://?_src_=holder;[HrefToken(TRUE)];subtlemessage=[REF(user)]'>SM</a>)"
#define ADMIN_IF(user) "(<a href='byond://?_src_=holder;[HrefToken(TRUE)];imginaryfriend=[REF(user)]'>IF</a>)"
#define ADMIN_TP(user) "(<a href='byond://?_src_=holder;[HrefToken(TRUE)];traitorpanel=[REF(user)]'>TP</a>)"
#define ADMIN_KICK(user) "(<a href='byond://?_src_=holder;[HrefToken(TRUE)];kick=[REF(user)]'>KICK</a>)"
#define ADMIN_SC(user) "(<a href='byond://?_src_=holder;[HrefToken(TRUE)];spawncookie=[REF(user)]'>SC</a>)"
#define ADMIN_SFC(user) "(<a href='byond://?_src_=holder;[HrefToken(TRUE)];spawnfortunecookie=[REF(user)]'>SFC</a>)"
#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]"
#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]"
#define ADMIN_FULLMONTY_NONAME(user) "[ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_JMP(user)] [ADMIN_FLW(user)]"
Expand All @@ -70,8 +70,8 @@
#define AREACOORD_NO_Z(src) "[src ? "[get_area_name(src, TRUE)] (X: [src.x], Y: [src.y])" : "nonexistent location"]"
#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]"
#define ADMIN_VERBOSEJMP(src) "[src ? "[AREACOORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]"
#define ADMIN_INDIVIDUALLOG(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];individuallog=[REF(user)]'>LOGS</a>)"
#define ADMIN_TAG(datum) "(<A href='?src=[REF(src)];[HrefToken(forceGlobal = TRUE)];tag_datum=[REF(datum)]'>TAG</a>)"
#define ADMIN_INDIVIDUALLOG(user) "(<a href='byond://?_src_=holder;[HrefToken(TRUE)];individuallog=[REF(user)]'>LOGS</a>)"
#define ADMIN_TAG(datum) "(<A href='byond://?src=[REF(src)];[HrefToken(forceGlobal = TRUE)];tag_datum=[REF(datum)]'>TAG</a>)"

#define AHELP_ACTIVE 1
#define AHELP_CLOSED 2
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/cas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
#endif

///Provide a link for CAS users to click to jump to.
#define CAS_JUMP_LINK(location) "(<a href='?_src_=usr;cas_jump=[text_ref(location)];'>JUMP</a>)"
#define CAS_JUMP_LINK(location) "(<a href='byond://?_src_=usr;cas_jump=[text_ref(location)];'>JUMP</a>)"
Loading

0 comments on commit b737dbc

Please sign in to comment.