Skip to content

Commit

Permalink
Merge remote-tracking branch 'skyrat/master' into upstream-12/19/2023
Browse files Browse the repository at this point in the history
  • Loading branch information
StrangeWeirdKitten committed Dec 19, 2023
2 parents 9cca82d + 7d817bf commit 5e95011
Show file tree
Hide file tree
Showing 3,479 changed files with 115,195 additions and 83,035 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Bug report
about: Create a report to help reproduce and fix the issue
---
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable -->

## Issue Summary

<!-- Briefly explain your issue in a few plain sentences, e.g. "X has Y issue" "When I do X, Y happens instead of Z" "X on Y map has Z issue". You may copy and paste the issue title here if it is suitable. -->

## Round ID:

<!--- **INCLUDE THE ROUND ID**
Expand Down
2 changes: 0 additions & 2 deletions .github/alternate_byond_versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@
# Format is version: map
# Example:
# 500.1337: runtimestation

515.1603: runtimestation
1 change: 1 addition & 0 deletions .github/gbp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ reset_label = "GBP: Reset"
"Code Improvement" = 2
"Documentation" = 1
"Feature" = -6
"Good First PR" = 6
"Feedback" = 2
"Fix" = 3
"Grammar and Formatting" = 1
Expand Down
41 changes: 41 additions & 0 deletions .github/guides/STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,47 @@ world.log << "[apples] apples left, taking one."
apples--
```

### initial() versus ::
`::` is a compile time scope operator which we use as an alternative to `initial()`.
It's used within the definition of a datum as opposed to `Initialize` or other procs.

```dm
// Bad
/atom/thing/better
name = "Thing"
/atom/thing/better/Initialize()
var/atom/thing/parent = /atom/thing
desc = inital(parent)
// Good
/atom/thing/better
name = "Thing"
desc = /atom/thing::desc
```

Another good use for it easy access of the parent's variables.
```dm
/obj/item/fork/dangerous
damage = parent_type::damage * 2
```

```dm
/obj/item/fork
flags_1 = parent_type::flags_1 | FLAG_COOLER
```


It's important to note that `::` does not apply to every application of `initial()`.
Primarily in cases where the type you're using for the initial value is not static.

For example,
```dm
/proc/cmp_subsystem_init(datum/controller/subsystem/a, datum/controller/subsystem/b)
return initial(b.init_order) - initial(a.init_order)
```
could not use `::` as the provided types are not static.

## Procs

### Getters and setters
Expand Down
10 changes: 6 additions & 4 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Changes to a .dmm or anything in the _map subfolder
# Changes to anything in the _map subfolder
Map Modification:
- '_maps/**'
- changed-files:
- any-glob-to-any-file: '_maps/**'

# Chganges to a .dmi
# Changes to a .dmi
Sprites:
- '**/*.dmi'
- changed-files:
- any-glob-to-any-file: '**/*.dmi'
3 changes: 0 additions & 3 deletions .github/workflows/autowiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ jobs:
- name: Install rust-g
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 libssl1.1:i386
bash tools/ci/install_rust_g.sh
- name: Compile and generate Autowiki files
if: steps.secrets_set.outputs.SECRETS_ENABLED
Expand Down
124 changes: 84 additions & 40 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,74 +15,120 @@ on:
- master
jobs:
run_linters:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Run Linters
runs-on: ubuntu-22.04
concurrency:
group: run_linters-${{ github.ref }}
group: run_linters-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- name: Restore SpacemanDMM cache
uses: actions/cache@v3
with:
path: ~/SpacemanDMM
key: ${{ runner.os }}-spacemandmm-${{ secrets.CACHE_PURGE_KEY }}
key: ${{ runner.os }}-spacemandmm
- name: Restore Yarn cache
uses: actions/cache@v3
with:
path: tgui/.yarn/cache
key: ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('tgui/yarn.lock') }}
key: ${{ runner.os }}-yarn-${{ hashFiles('tgui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ secrets.CACHE_PURGE_KEY }}-
${{ runner.os }}-build-
${{ runner.os }}-
${{ runner.os }}-yarn-
- name: Restore Node cache
uses: actions/cache@v3
with:
path: ~/.nvm
key: ${{ runner.os }}-node-${{ hashFiles('dependencies.sh') }}
restore-keys: |
${{ runner.os }}-node-
- name: Restore Bootstrap cache
uses: actions/cache@v3
with:
path: tools/bootstrap/.cache
key: ${{ runner.os }}-bootstrap-${{ hashFiles('tools/requirements.txt') }}
restore-keys: |
${{ runner.os }}-bootstrap-
- name: Restore Rust cache
uses: actions/cache@v3
with:
path: ~/.cargo
key: ${{ runner.os }}-rust-${{ secrets.CACHE_PURGE_KEY }}
restore-keys: |
${{ runner.os }}-build-${{ secrets.CACHE_PURGE_KEY }}-
${{ runner.os }}-build-
${{ runner.os }}-
key: ${{ runner.os }}-rust
- name: Restore Cutter cache
uses: actions/cache@v3
with:
path: tools/icon_cutter/cache
key: ${{ runner.os }}-cutter-${{ hashFiles('dependencies.sh') }}
- name: Install Tools
run: |
pip3 install setuptools
bash tools/ci/install_node.sh
bash tools/ci/install_spaceman_dmm.sh dreamchecker
cargo install ripgrep --features pcre2
tools/bootstrap/python -c ''
- name: Run Linters
- name: Give Linters A Go
id: linter-setup
run: ':'
- name: Run Grep Checks
if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: |
bash tools/ci/check_filedirs.sh tgstation.dme
bash tools/ci/check_changelogs.sh
bash tools/ci/check_grep.sh
bash skyrat/tools/skyrat_check_grep.sh # SKYRAT EDIT ADDITION - checking modular_skyrat code
bash tools/ci/check_misc.sh
- name: Ticked File Enforcement
if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: |
tools/bootstrap/python tools/ticked_file_enforcement/ticked_file_enforcement.py < tools/ticked_file_enforcement/schemas/tgstation_dme.json
tools/bootstrap/python -m tools.maplint.source --github
tools/build/build --ci lint tgui-test
tools/bootstrap/python -m define_sanity.check
tools/bootstrap/python -m dmi.test
tools/bootstrap/python tools/ticked_file_enforcement/ticked_file_enforcement.py < tools/ticked_file_enforcement/schemas/unit_tests.json
tools/bootstrap/python tools/ticked_file_enforcement/ticked_file_enforcement.py < tools/ticked_file_enforcement/schemas/modular_skyrat.json # SKYRAT EDIT ADDITION - modular tick enforcement
- name: Check Define Sanity
if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: tools/bootstrap/python -m define_sanity.check
- name: Check Trait Validity
if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: tools/bootstrap/python -m trait_validity.check
- name: Run DreamChecker
if: steps.linter-setup.conclusion == 'success' && !cancelled()
shell: bash
run: ~/dreamchecker 2>&1 | bash tools/ci/annotate_dm.sh
- name: Run Map Checks
if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: |
tools/bootstrap/python -m mapmerge2.dmm_test
~/dreamchecker 2>&1 | bash tools/ci/annotate_dm.sh
tools/bootstrap/python -m tools.maplint.source
- name: Check Cutter
if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: tools/bootstrap/python -m tools.icon_cutter.check
- name: Run DMI Tests
if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: tools/bootstrap/python -m dmi.test
- name: Check File Directories
if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: bash tools/ci/check_filedirs.sh tgstation.dme
- name: Check Changelogs
if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: bash tools/ci/check_changelogs.sh
- name: Check Miscellaneous Files
if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: bash tools/ci/check_misc.sh
- name: Run TGUI Checks
if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: tools/build/build --ci lint tgui-test

compile_all_maps:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Compile Maps
needs: [collect_data]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
concurrency:
group: compile_all_maps-${{ github.ref }}
group: compile_all_maps-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- name: Restore BYOND cache
uses: actions/cache@v3
with:
path: ~/BYOND
key: ${{ runner.os }}-byond-${{ secrets.CACHE_PURGE_KEY }}
key: ${{ runner.os }}-byond
- name: Compile All Maps
run: |
bash tools/ci/install_byond.sh
Expand All @@ -95,15 +141,15 @@ jobs:
max-required-client-version: ${{needs.collect_data.outputs.max_required_byond_client}}

collect_data:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Collect data for other tasks
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
maps: ${{ steps.map_finder.outputs.maps }}
alternate_tests: ${{ steps.alternate_test_finder.outputs.alternate_tests }}
max_required_byond_client: ${{ steps.max_required_byond_client.outputs.max_required_byond_client }}
concurrency:
group: find_all_maps-${{ github.ref }}
group: find_all_maps-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
Expand All @@ -126,31 +172,31 @@ 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]')"
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Integration Tests
needs: [collect_data]
strategy:
fail-fast: false
matrix:
map: ${{ fromJSON(needs.collect_data.outputs.maps).paths }}
concurrency:
group: run_all_tests-${{ github.ref }}-${{ matrix.map }}
group: run_all_tests-${{ github.head_ref || github.run_id }}-${{ matrix.map }}
cancel-in-progress: true
uses: ./.github/workflows/run_integration_tests.yml
with:
map: ${{ matrix.map }}
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.find_all_maps.outputs.alternate_tests != '[]'"
if: ( !contains(github.event.head_commit.message, '[ci skip]') && needs.find_all_maps.outputs.alternate_tests != '[]' )
name: Alternate Tests
needs: [collect_data]
strategy:
fail-fast: false
matrix:
setup: ${{ fromJSON(needs.collect_data.outputs.alternate_tests) }}
concurrency:
group: run_all_tests-${{ github.ref }}-${{ matrix.setup.major }}.${{ matrix.setup.minor }}-${{ matrix.setup.map }}
group: run_all_tests-${{ github.head_ref || github.run_id }}-${{ matrix.setup.major }}.${{ matrix.setup.minor }}-${{ matrix.setup.map }}
cancel-in-progress: true
uses: ./.github/workflows/run_integration_tests.yml
with:
Expand All @@ -160,10 +206,10 @@ jobs:
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.find_all_maps.outputs.alternate_tests != '[]'"
if: ( !contains(github.event.head_commit.message, '[ci skip]') && needs.find_all_maps.outputs.alternate_tests != '[]' )
name: Check Alternate Tests
needs: [run_alternate_tests]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- run: echo Alternate tests passed.

Expand Down Expand Up @@ -203,24 +249,22 @@ jobs:
# path: artifacts/screenshot_comparisons

test_windows:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Windows Build
needs: [collect_data]
runs-on: windows-latest
concurrency:
group: test_windows-${{ github.ref }}
group: test_windows-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- name: Restore Yarn cache
uses: actions/cache@v3
with:
path: tgui/.yarn/cache
key: ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('tgui/yarn.lock') }}
key: ${{ runner.os }}-yarn-${{ hashFiles('tgui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ secrets.CACHE_PURGE_KEY }}-
${{ runner.os }}-build-
${{ runner.os }}-
${{ runner.os }}-yarn-
- name: Compile
run: pwsh tools/ci/build.ps1
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compile_changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
compile:
name: "Compile changelogs"
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
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 Down
2 changes: 1 addition & 1 deletion .github/workflows/docker_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
publish:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generate_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
generate_documentation:
permissions:
contents: write # for JamesIves/github-pages-deploy-action to push changes in repo
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-20.04
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
runs-on: ubuntu-22.04
concurrency: gen-docs
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_emoji.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions:

jobs:
title_and_changelog:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: Wayland-Smithy/emoji-stripper-action@de0c1d158edee50700583d6454aa5f5117337599
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/round_id_linker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
link_rounds:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: tgstation/round_linker@master
with:
Expand Down
Loading

0 comments on commit 5e95011

Please sign in to comment.