Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into landmines
Browse files Browse the repository at this point in the history
  • Loading branch information
Sun-Soaked committed Mar 21, 2024
2 parents 863c812 + 042c9fb commit 10e4330
Show file tree
Hide file tree
Showing 94 changed files with 1,119 additions and 1,010 deletions.
662 changes: 355 additions & 307 deletions .github/CONTRIBUTING.md

Large diffs are not rendered by default.

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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM beestation/byond:514.1583 as base
FROM beestation/byond:515.1616 as base

# Install the tools needed to compile our rust dependencies
FROM base as rust-build
Expand Down
6 changes: 3 additions & 3 deletions _maps/shuttles/independent/independent_box.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@
/obj/machinery/atmospherics/components/unary/outlet_injector/on{
dir = 8
},
/turf/open/floor/plating,
/turf/open/floor/plating/airless,
/area/ship/external)
"bq" = (
/turf/closed/wall/mineral/titanium/nodiagonal,
Expand Down Expand Up @@ -2227,7 +2227,7 @@
/obj/structure/catwalk/over,
/obj/item/cigbutt/roach,
/obj/item/reagent_containers/food/snacks/burrito,
/turf/open/floor/plating,
/turf/open/floor/plating/airless,
/area/ship/external)
"Dr" = (
/obj/machinery/door/airlock{
Expand Down Expand Up @@ -2622,7 +2622,7 @@
dir = 8
},
/obj/item/chair/plastic,
/turf/open/floor/plating,
/turf/open/floor/plating/airless,
/area/ship/external)
"Qh" = (
/obj/machinery/power/apc/auto_name/directional/south,
Expand Down
Binary file modified auxmos.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion check_regex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
standards:
- exactly: [0, "mangled characters", '[\u0000\uFFFF\uFFFD]']
- exactly: [8, "escapes", '\\\\(red|blue|green|black|b|i[^mc])']
- exactly: [9, "Del()s", '\WDel\(']
- exactly: [8, "Del()s", '\WDel\(']

- exactly: [1, "/atom text paths", '"/atom']
- exactly: [1, "/area text paths", '"/area']
Expand Down
11 changes: 11 additions & 0 deletions code/__DEFINES/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@
/// just check density
#define ATMOS_PASS_DENSITY -2

// Adjacency flags
#define ATMOS_ADJACENT_ANY (1<<0)
#define ATMOS_ADJACENT_FIRELOCK (1<<1)

#define CANATMOSPASS(A, O) (A.CanAtmosPass == ATMOS_PASS_PROC ? A.CanAtmosPass(O) : (A.CanAtmosPass == ATMOS_PASS_DENSITY ? !A.density : A.CanAtmosPass))
#define CANVERTICALATMOSPASS(A, O) (A.CanAtmosPassVertical == ATMOS_PASS_PROC ? A.CanAtmosPass(O, TRUE) : (A.CanAtmosPassVertical == ATMOS_PASS_DENSITY ? !A.density : A.CanAtmosPassVertical))

Expand Down Expand Up @@ -328,6 +332,13 @@
#define GAS_FLAG_DANGEROUS (1<<0)
#define GAS_FLAG_BREATH_PROC (1<<1)

// Flag for update_air_ref()
#define AIR_REF_CLOSED_TURF -1
#define AIR_REF_SPACE_TURF 0

#define AIR_REF_PLANETARY_TURF (1<<0) //SIMULATION_DIFFUSE 0b1
#define AIR_REF_OPEN_TURF (1<<1) //SIMULATION_ALL 0b10

//HELPERS
#define PIPING_LAYER_SHIFT(T, PipingLayer) \
if(T.dir & (NORTH|SOUTH)) { \
Expand Down
8 changes: 2 additions & 6 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,8 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache)
//subtypesof(), typesof() without the parent path
#define subtypesof(typepath) (typesof(typepath) - typepath)

/// Takes a datum as input, returns its ref string, or a cached version of it
/// This allows us to cache \ref creation, which ensures it'll only ever happen once per datum, saving string tree time
/// It is slightly less optimal then a []'d datum, but the cost is massively outweighed by the potential savings
/// It will only work for datums mind, for datum reasons
/// : because of the embedded typecheck
#define text_ref(datum) (isdatum(datum) ? (datum:cached_ref ||= "\ref[datum]") : ("\ref[datum]"))
/// Takes a datum as input, returns its ref string
#define text_ref(datum) ref(datum)

//Gets the turf this atom inhabits
#define get_turf(A) (get_step(A, 0))
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/qdel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@
#define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME)
#define QDEL_NULL(item) qdel(item); item = null
#define QDEL_LIST(L) if(L) { for(var/I in L) qdel(I); L.Cut(); }
#define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, PROC_REF(______qdel_list_wrapper), L), time, TIMER_STOPPABLE)
#define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(______qdel_list_wrapper), L), time, TIMER_STOPPABLE)
#define QDEL_LIST_ASSOC(L) if(L) { for(var/I in L) { qdel(L[I]); qdel(I); } L.Cut(); }
#define QDEL_LIST_ASSOC_VAL(L) if(L) { for(var/I in L) qdel(L[I]); L.Cut(); }
Loading

0 comments on commit 10e4330

Please sign in to comment.