Skip to content

Commit

Permalink
Merge pull request #1306 from MrCat15352 - Full Update
Browse files Browse the repository at this point in the history
UPDATE: Обновляемся до последней версии офов
  • Loading branch information
MysticalFaceLesS authored Dec 29, 2024
2 parents 691a69b + 5e2a89f commit f22fe96
Show file tree
Hide file tree
Showing 1,751 changed files with 153,234 additions and 115,798 deletions.
15 changes: 15 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,23 @@
- '**/*.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 .dmi changes
'🎨 Спрайты 🎨':

# Any changes to .ogg files are marked as sound
Sound:
- changed-files:
- any-glob-to-any-file:
- '**/*.dmi'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/autowiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
sudo apt update || true
sudo apt install -o APT::Immediate-configure=false libssl-dev:i386
bash tools/ci/install_rust_g.sh
- name: Cache dependencies
if: steps.secrets_set.outputs.SECRETS_ENABLED
uses: actions/cache@v3
Expand Down
135 changes: 96 additions & 39 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,35 @@ on:
push:
branches:
- master
- "project/**"
pull_request:
branches:
- master
- "project/**"
merge_group:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
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:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Run Linters
needs: start_gate
runs-on: ubuntu-22.04
timeout-minutes: 20

steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -53,39 +71,63 @@ 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
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:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Compile Maps
needs: start_gate
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v3

Expand All @@ -107,37 +149,41 @@ jobs:
run_all_tests:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Integration Tests
needs: start_gate
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 }}

# 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 }}
# 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 }}

test_windows:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Windows Build
needs: start_gate
runs-on: windows-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3

Expand All @@ -162,7 +208,18 @@ jobs:
bash tools/deploy.sh ./deploy
- name: Deploy artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: deploy
path: deploy

completion_gate: # Serves as a non-moving target for branch rulesets
if: always() && !cancelled()
name: Completion Gate
needs: [test_windows, compile_all_maps, run_linters, run_all_tests]
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) }}
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
37 changes: 37 additions & 0 deletions .github/workflows/rerun_flaky_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Rerun/Report Flaky Tests
on:
workflow_run:
workflows: [Checks, TGS Test Suite]
types:
- completed

permissions:
actions: write
contents: write
issues: write

jobs:
rerun_flaky_tests:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt == 1 }}
steps:
- 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@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

9 changes: 7 additions & 2 deletions .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,12 +59,12 @@ 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

- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Test TGS Integration
run: dotnet run -c Release --project tools/tgs_test ${{ github.repository }} /tgs_instances/tgstation ${{ env.TGS_API_PORT }} ${{ github.event.pull_request.head.sha || github.sha }} ${{ secrets.GITHUB_TOKEN }} ${{ env.PR_NUMBER }}
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
Loading

0 comments on commit f22fe96

Please sign in to comment.