Skip to content

Commit

Permalink
Merge upstream 04.10.24 (#503)
Browse files Browse the repository at this point in the history
## About The Pull Request

Мергируем апстрим
  • Loading branch information
larentoun authored Oct 5, 2024
2 parents 7500383 + 29d85c8 commit 628bcce
Show file tree
Hide file tree
Showing 4,804 changed files with 77,060 additions and 45,613 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@
/_maps/ @EOBGames @Maurukas @MMMiracles @san7890 @ShizCalev

/icons/ @Imaginos16 @Krysonism @Twaticus @Wallemations
/icons/ass/ @Ghilker @tralezab

/code/__DEFINES/atmospherics/ @Ghilker @LemonInTheDark

Expand Down
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: github-actions
directory: /
target-branch: master
schedule:
interval: daily
labels:
- GitHub
open-pull-requests-limit: 10
2 changes: 1 addition & 1 deletion .github/guides/RUNNING_A_SERVER.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BYOND installed. You can get it from https://www.byond.com/download. Once you've
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.

Double-click `BUILD.bat` in the root directory of the source code. This'll take
Double-click `BUILD.cmd` 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:

```
Expand Down
24 changes: 24 additions & 0 deletions .github/guides/STANDARDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,30 @@ The following is a list of procs, and their safe replacements.
* Move away from something, taking turf density into account `walk_away()` -> `SSmove_manager.move_away()`
* Move to a random place nearby. NOT random walk `walk_rand()` -> `SSmove_manager.move_rand()` is random walk, `SSmove_manager.move_to_rand()` is walk to a random place

### Avoid pointer use

BYOND has a variable type called pointers, which allow you to reference a variable rather then its value. As an example of how this works:

```
var/pointed_at = "text"
var/value = pointed_at // copies the VALUE of pointed at
var/reference = &pointed_at // points at pointed_at itself
// so we can retain a reference even if pointed_at changes
pointed_at = "text AGAIN"
world << (*reference) // Deref to get the value, outputs "text AGAIN"
// or modify the var remotely
*reference = "text a THIRD TIME"
world << pointed_at // outputs "text a THIRD TIME"
```

The problem with this is twofold.
- First: if you use a pointer to reference a var on a datum, it is essentially as if you held an invisible reference to that datum. This risks hard deletes in very unclear ways that cannot be tested for.
- Second: People don't like, understand how pointers work? They mix them up with classical C pointers, when they're more like `std::shared_ptr`. This leads to code that just doesn't work properly, or is hard to follow without first getting your mind around it. It also risks hiding what code does in dumb ways because pointers don't have unique types.

For these reasons and with the hope of avoiding pointers entering general use, be very careful using them, if you use them at all.

### BYOND hellspawn

What follows is documentation of inconsistent or strange behavior found in our engine, BYOND.
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/auto_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,22 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Generate App Token
id: app-token-generation
uses: actions/create-github-app-token@v1
if: env.APP_PRIVATE_KEY != '' && env.APP_ID != ''
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
env:
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
APP_ID: ${{ secrets.APP_ID }}

- name: Run auto changelog
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const { processAutoChangelog } = await import('${{ github.workspace }}/tools/pull_request_hooks/autoChangelog.js')
await processAutoChangelog({ github, context })
github-token: ${{ secrets.COMFY_ORANGE_PAT || secrets.GITHUB_TOKEN }}
github-token: ${{ steps.app-token-generation.outputs.token || secrets.GITHUB_TOKEN }}
49 changes: 28 additions & 21 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,17 @@ concurrency:
cancel-in-progress: true

jobs:
run_linters:
start_gate:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Start Gate
runs-on: ubuntu-latest
steps:
- name: Mandatory Empty Step
run: exit 0

run_linters:
name: Run Linters
needs: start_gate
runs-on: ubuntu-22.04
timeout-minutes: 5

Expand Down Expand Up @@ -71,7 +79,7 @@ jobs:
path: tools/icon_cutter/cache
key: ${{ runner.os }}-cutter-${{ hashFiles('dependencies.sh') }}
- name: Install OpenDream
uses: robinraju/release-downloader@v1.9
uses: robinraju/release-downloader@v1.11
with:
repository: "OpenDreamProject/OpenDream"
tag: "latest"
Expand Down Expand Up @@ -134,9 +142,8 @@ jobs:
run: tools/build/build --ci lint tgui-test

compile_all_maps:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Compile Maps
needs: [collect_data]
needs: collect_data
runs-on: ubuntu-22.04
timeout-minutes: 5

Expand All @@ -159,8 +166,8 @@ jobs:
max-required-client-version: ${{needs.collect_data.outputs.max_required_byond_client}}

collect_data:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Collect data for other tasks
needs: start_gate
runs-on: ubuntu-22.04
timeout-minutes: 5
outputs:
Expand Down Expand Up @@ -189,9 +196,8 @@ jobs:
echo "max_required_byond_client=$(grep -Ev '^[[:blank:]]{0,}#{1,}|^[[:blank:]]{0,}$' .github/max_required_byond_client.txt | tail -n1)" >> $GITHUB_OUTPUT
run_all_tests:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Integration Tests
needs: [collect_data]
needs: collect_data

strategy:
fail-fast: false
Expand All @@ -204,9 +210,9 @@ jobs:
max_required_byond_client: ${{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 != '[]' )
if: needs.collect_data.outputs.alternate_tests != '[]'
name: Alternate Tests
needs: [collect_data]
needs: collect_data
strategy:
fail-fast: false
matrix:
Expand All @@ -219,18 +225,9 @@ jobs:
minor: ${{ matrix.setup.minor }}
max_required_byond_client: ${{needs.collect_data.outputs.max_required_byond_client}}

check_alternate_tests:
if: ( !contains(github.event.head_commit.message, '[ci skip]') && needs.collect_data.outputs.alternate_tests != '[]' )
name: Check Alternate Tests
needs: [run_alternate_tests]
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- run: echo Alternate tests passed.

compare_screenshots:
if: ( !contains(github.event.head_commit.message, '[ci skip]') && (always() && (!failure() && !cancelled())) )
needs: [run_all_tests, run_alternate_tests]
if: needs.collect_data.outputs.alternate_tests == '[]' || needs.run_alternate_tests.result == 'success'
needs: [ collect_data, run_all_tests, run_alternate_tests ]
name: Compare Screenshot Tests
timeout-minutes: 15
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -267,7 +264,6 @@ jobs:
path: artifacts/screenshot_comparisons

test_windows:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Windows Build
needs: [collect_data]
runs-on: windows-latest
Expand All @@ -291,3 +287,14 @@ jobs:
with:
dmb-location: tgstation.dmb
max-required-client-version: ${{needs.collect_data.outputs.max_required_byond_client}}

completion_gate: # Serves as a non-moving target for branch rulesets
if: always() && !cancelled()
name: Completion Gate
needs: [ test_windows, compare_screenshots, compile_all_maps, run_linters ]
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
27 changes: 23 additions & 4 deletions .github/workflows/compile_changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
compile:
name: "Compile changelogs"
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: "Check for ACTION_ENABLER secret and pass true to output if it exists to be checked by later steps"
id: value_holder
Expand All @@ -18,37 +20,54 @@ jobs:
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
uses: actions/setup-python@v5
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: |
python tools/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 config --local user.name "tgstation-ci[bot]"
git config --local user.email "179393467+tgstation-ci[bot]@users.noreply.github.com"
git pull origin master
git add html/changelogs
git commit -m "Automatic changelog compile [ci skip]" -a || true
- name: Generate App Token
id: app-token-generation
uses: actions/create-github-app-token@v1
if: env.APP_PRIVATE_KEY != '' && env.APP_ID != ''
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
env:
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
APP_ID: ${{ secrets.APP_ID }}

- name: "Push"
if: steps.value_holder.outputs.ACTIONS_ENABLED
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.COMFY_ORANGE_PAT || secrets.GITHUB_TOKEN }}
github_token: ${{ steps.app-token-generation.outputs.token || secrets.GITHUB_TOKEN }}
11 changes: 5 additions & 6 deletions .github/workflows/generate_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ jobs:
touch dmdoc/.nojekyll
echo codedocs.tgstation13.org > dmdoc/CNAME
- name: Deploy
uses: JamesIves/github-pages-deploy-action@3.7.1
uses: JamesIves/github-pages-deploy-action@v4.6.8
with:
BRANCH: gh-pages
CLEAN: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SINGLE_COMMIT: true
FOLDER: dmdoc
branch: gh-pages
clean: true
single-commit: true
folder: dmdoc
2 changes: 1 addition & 1 deletion .github/workflows/remove_guide_comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Remove guide comments
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const { removeGuideComments } = await import('${{ github.workspace }}/tools/pull_request_hooks/removeGuideComments.js')
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rerun_flaky_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Rerun flaky tests
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const { rerunFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js')
Expand All @@ -24,7 +24,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Report flaky tests
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const { reportFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/show_screenshot_test_results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
npm install node-fetch
- name: Show screenshot test results
if: steps.secrets_set.outputs.SECRETS_ENABLED
uses: actions/github-script@v6
uses: actions/github-script@v7
env:
FILE_HOUSE_KEY: ${{ secrets.ARTIFACTS_FILE_HOUSE_KEY }}
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/stale@v4
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: "This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, please address any outstanding review items and ensure your PR is finished, if these are all true and you are auto-staled anyway, you need to actively ask maintainers if your PR will be merged. Once you have done any of the previous actions then you should request a maintainer remove the stale label on your PR, to reset the stale timer. If you feel no maintainer will respond in that time, you may wish to close this PR youself, while you seek maintainer comment, as you will then be able to reopen the PR yourself"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_merge_bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
npm install node-fetch
- name: Check for test merges
if: steps.secrets_set.outputs.GET_TEST_MERGES_URL
uses: actions/github-script@v6
uses: actions/github-script@v7
env:
GET_TEST_MERGES_URL: ${{ secrets.GET_TEST_MERGES_URL }}
with:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tgs_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
- 'code/__DEFINES/tgs.dm'
- 'code/game/world.dm'
- 'code/modules/tgs/**'
- 'tools/bootstrap/**'
- 'tools/tgs_scripts/**'
- 'tools/tgs_test/**'
pull_request:
Expand All @@ -28,6 +29,7 @@ on:
- 'code/__DEFINES/tgs.dm'
- 'code/game/world.dm'
- 'code/modules/tgs/**'
- 'tools/bootstrap/**'
- 'tools/tgs_scripts/**'
- 'tools/tgs_test/**'
merge_group:
Expand Down Expand Up @@ -57,7 +59,7 @@ jobs:
- 5000:5000 #Can't use env here for some reason
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

Expand Down
Loading

0 comments on commit 628bcce

Please sign in to comment.