Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed Jan 20, 2025
2 parents d8c5ff6 + ea6f8d8 commit 5fa96a4
Show file tree
Hide file tree
Showing 1,585 changed files with 168,249 additions and 235,195 deletions.
12 changes: 12 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ Map Change:
- "**/*.dmm"
- "_maps/**"

Ship:
- changed-files:
- any-glob-to-any-file:
- "_maps/shuttles/**"
- "_maps/configs/**"

Ruin:
- changed-files:
- any-glob-to-any-file:
- "_maps/RandomRuins/**"
- "code/datums/ruins/**"

# Any changes to .ogg files are marked as sound
Sound:
- changed-files:
Expand Down
107 changes: 80 additions & 27 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ on:
push:
branches:
- master
- "project/**"
pull_request:
branches:
- master
- "project/**"
merge_group:
branches:
- master
Expand All @@ -23,6 +25,16 @@ jobs:
- name: Mandatory Empty Step
run: exit 0

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

steps:
- name: Mandatory Empty Step
run: exit 0

run_linters:
name: Run Linters
needs: start_gate
Expand Down Expand Up @@ -68,35 +80,55 @@ jobs:
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: exit 0
- name: Run Grep Checks
if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: bash tools/ci/check_grep.sh
- name: Run DreamChecker
if: steps.linter-setup.conclusion == 'success' && !cancelled()
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 tools.maplint.source --github
tools/build/build --ci lint tgui-test
bash tools/ci/check_filedirs.sh shiptest.dme
bash tools/ci/check_changelogs.sh
bash tools/ci/check_misc.sh
bash tools/ci/check_grep.sh
tools/bootstrap/python -m dmi.test
tools/bootstrap/python -m mapmerge2.dmm_test
~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1
- name: Annotate Lints
if: always()
uses: yogstation13/DreamAnnotate@v2
with:
outputFile: output-annotations.txt

- name: Run Check Regex
tools/bootstrap/python -m tools.maplint.source
- 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 shiptest.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
- name: Run Regex Checks
if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: |
tools/bootstrap/python -m ci.check_regex --log-changes-only --github-actions
cat check_regex_output.txt
- name: Install OpenDream
uses: robinraju/[email protected]
with:
repository: "OpenDreamProject/OpenDream"
tag: "latest"
fileName: "DMCompiler_linux-x64.tar.gz"
extract: true

- name: Annotate Regex Matches
- name: Run OpenDream Linter
run: |
cat check_regex_output.txt
./DMCompiler_linux-x64/DMCompiler shiptest.dme --suppress-unimplemented --define=CIBUILDING | bash tools/ci/annotate_od.sh
compile_all_maps:
name: Compile Maps
Expand Down Expand Up @@ -128,17 +160,19 @@ jobs:
strategy:
fail-fast: false
matrix:
arg: [
"BASIC_TESTS",
"CREATE_AND_DESTROY_TEST",
"PLANET_GEN_TEST",
"RUIN_PLACEMENT_TEST",
"SHIP_PLACEMENT_TEST"
]
arg:
[
"BASIC_TESTS",
"CREATE_AND_DESTROY_TEST",
"PLANET_GEN_TEST",
"RUIN_PLACEMENT_TEST",
"SHIP_PLACEMENT_TEST",
]
uses: ./.github/workflows/run_integration_tests.yml
with:
arg: ${{ matrix.arg }}

<<<<<<< HEAD
run_extra_tests:
name: Extra Tests
needs: start_gate
Expand All @@ -151,11 +185,26 @@ jobs:
uses: ./.github/workflows/run_integration_tests.yml
with:
arg: ${{ matrix.arg }}
=======
# run_alternate_tests:
# if: "!contains(github.event.head_commit.message, '[ci skip]')"
# name: Alternate Tests
# strategy:
# fail-fast: false
# matrix:
# major: [515]
# minor: [1614]
# uses: ./.github/workflows/run_integration_tests.yml
# with:
# major: ${{ matrix.major }}
# minor: ${{ matrix.minor }}
>>>>>>> ea6f8d8f627fa07d2f00bfae5f6e9b633fc8e00d

test_windows:
name: Windows Build
needs: start_gate
runs-on: windows-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -188,7 +237,11 @@ jobs:
completion_gate: # Serves as a non-moving target for branch rulesets
if: always() && !cancelled()
name: Completion Gate
<<<<<<< HEAD
needs: [ test_windows, compile_all_maps, run_linters, run_all_tests ]
=======
needs: [test_windows, compile_all_maps, run_linters, run_all_tests]
>>>>>>> ea6f8d8f627fa07d2f00bfae5f6e9b633fc8e00d
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeowner_reviews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on: pull_request_target
jobs:
assign-users:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so the job can access it
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/rerun_flaky_tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Rerun/Report Flaky Tests
on:
workflow_run:
workflows: [CI Suite]
workflows: [Checks, TGS Test Suite]
types:
- completed
- completed

permissions:
actions: write
Expand All @@ -15,23 +15,23 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt == 1 }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rerun flaky tests
uses: actions/github-script@v6
with:
script: |
const { rerunFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js')
await rerunFlakyTests({ github, context })
- name: Checkout
uses: actions/checkout@v3
- name: Rerun flaky tests
uses: actions/github-script@v6
with:
script: |
const { rerunFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js')
await rerunFlakyTests({ github, context })
report_flaky_tests:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.run_attempt == 2 }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Report flaky tests
uses: actions/github-script@v6
with:
script: |
const { reportFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js')
await reportFlakyTests({ github, context })
- name: Checkout
uses: actions/checkout@v3
- name: Report flaky tests
uses: actions/github-script@v6
with:
script: |
const { reportFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js')
await reportFlakyTests({ github, context })
2 changes: 2 additions & 0 deletions .github/workflows/run_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ on:
required: false
default: ALL_TESTS
type: string

jobs:
run_integration_tests:
runs-on: ubuntu-latest
timeout-minutes: 15
services:
mysql:
image: mysql:latest
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/stale@v4
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: "This PR has been inactive for a month. This means it is at risk of being auto closed in a week, 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"
days-before-stale: 30
days-before-close: 7
days-before-issue-stale: -1
stale-pr-label: "Stale"
exempt-pr-labels: "RED LABEL, Test Merged, Test Merge Candidate, Stale Exempt"
exempt-draft-pr: true

stale-issue-message: "This flaky fail has not been detected in 7 days. If it doesn't show up again in another 7 days, it will be auto-closed."
only-issue-labels: "🤖 Flaky Test Report"
days-before-issue-stale: 7

7 changes: 6 additions & 1 deletion .github/workflows/tgs_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ on:
push:
branches:
- master
- 'project/**'
- 'gh-readonly-queue/master/**'
- 'gh-readonly-queue/project/**'
paths:
- '.tgs.yml'
- '.github/workflows/tgs_test.yml'
Expand All @@ -12,11 +14,13 @@ on:
- 'code/__DEFINES/tgs.dm'
- 'code/game/world.dm'
- 'code/modules/tgs/**'
- 'tools/bootstrap/**'
- 'tools/tgs_scripts/**'
- 'tools/tgs_test/**'
pull_request:
branches:
- master
- 'project/**'
paths:
- '.tgs.yml'
- '.github/workflows/tgs_test.yml'
Expand All @@ -25,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 @@ -54,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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*.lk
*.int
*.backup
/shiptest.json
### https://raw.github.com/github/gitignore/cc542de017c606138a87ee4880e5f06b3a306def/Global/Linux.gitignore

*~
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN git init \
&& git remote add origin \$AUXMOS_REPO \
&& git fetch --depth 1 origin \$AUXMOS_VERSION" \
&& git checkout FETCH_HEAD \
&& env PKG_CONFIG_ALLOW_CROSS=1 cargo build --release --target=i686-unknown-linux-gnu --features "all_reaction_hooks,katmos"
&& env PKG_CONFIG_ALLOW_CROSS=1 cargo build --release --target=i686-unknown-linux-gnu --features "citadel_reactions,katmos"

# Install nodejs which is required to deploy Shiptest
FROM base as node
Expand Down
10 changes: 10 additions & 0 deletions __odlint.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This file is included right at the start of the DME.
// Its purpose is to enable multiple lints (pragmas) that are supported by OpenDream to better validate the codebase
// These are essentially nitpicks the DM compiler should pick up on but doesnt

#if !defined(SPACEMAN_DMM) && defined(OPENDREAM)
// This is in a separate file as a hack to avoid SpacemanDMM
// evaluating the #pragma lines, even if its outside a block it cares about
// (Also so people can code-own it. Shoutout to AA)
#include "tools/ci/od_lints.dm"
#endif
4 changes: 2 additions & 2 deletions _maps/RandomRuins/BeachRuins/beach_ancient_ruin.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
name = "charge rifle"
},
/obj/item/gun/energy/lasercannon{
pixel_y = 5;
pixel_y = 5
},
/obj/item/gun/energy/lasercannon,
/obj/effect/turf_decal/industrial/hatch,
Expand Down Expand Up @@ -1144,7 +1144,7 @@
/turf/open/floor/concrete/slab_1,
/area/ruin/beach/complex/wall)
"sa" = (
/obj/effect/spawner/lootdrop/garden/seaweed,
/obj/effect/spawner/random/food_or_drink/garden/seaweed,
/turf/open/water/beach,
/area/overmap_encounter/planetoid/beachplanet/explored)
"so" = (
Expand Down
Loading

0 comments on commit 5fa96a4

Please sign in to comment.