Skip to content

Commit 8477d3c

Browse files
authored
Merge pull request ArchipelagoMW#9 from ArchipelagoMW/main
Merge main branch into fork
2 parents 3d1be0c + 8a8263f commit 8477d3c

File tree

1,161 files changed

+92969
-24599
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,161 files changed

+92969
-24599
lines changed

.coveragerc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[report]
2+
exclude_lines =
3+
pragma: no cover
4+
if TYPE_CHECKING:
5+
if typing.TYPE_CHECKING:

.github/labeler.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
'is: documentation':
2+
- changed-files:
3+
- all-globs-to-all-files: '{**/docs/**,**/README.md}'
4+
5+
'affects: webhost':
6+
- changed-files:
7+
- all-globs-to-any-file: 'WebHost.py'
8+
- all-globs-to-any-file: 'WebHostLib/**/*'
9+
10+
'affects: core':
11+
- changed-files:
12+
- all-globs-to-any-file:
13+
- '!*Client.py'
14+
- '!README.md'
15+
- '!LICENSE'
16+
- '!*.yml'
17+
- '!.gitignore'
18+
- '!**/docs/**'
19+
- '!typings/kivy/**'
20+
- '!test/**'
21+
- '!data/**'
22+
- '!.run/**'
23+
- '!.github/**'
24+
- '!worlds_disabled/**'
25+
- '!worlds/**'
26+
- '!WebHost.py'
27+
- '!WebHostLib/**'
28+
- any-glob-to-any-file: # exceptions to the above rules of "stuff that isn't core"
29+
- 'worlds/generic/**/*.py'
30+
- 'worlds/*.py'
31+
- 'CommonClient.py'

.github/workflows/analyze-modified-files.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
runs-on: ubuntu-latest
2626

2727
steps:
28-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@v4
2929

3030
- name: "Determine modified files (pull_request)"
3131
if: github.event_name == 'pull_request'
@@ -50,7 +50,7 @@ jobs:
5050
run: |
5151
echo "diff=." >> $GITHUB_ENV
5252
53-
- uses: actions/setup-python@v4
53+
- uses: actions/setup-python@v5
5454
if: env.diff != ''
5555
with:
5656
python-version: 3.8
@@ -71,7 +71,7 @@ jobs:
7171
continue-on-error: true
7272
if: env.diff != '' && matrix.task == 'flake8'
7373
run: |
74-
flake8 --count --max-complexity=10 --max-doc-length=120 --max-line-length=120 --statistics ${{ env.diff }}
74+
flake8 --count --max-complexity=14 --max-doc-length=120 --max-line-length=120 --statistics ${{ env.diff }}
7575
7676
- name: "mypy: Type check modified files"
7777
continue-on-error: true

.github/workflows/build.yml

+26-7
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ on:
88
- '.github/workflows/build.yml'
99
- 'setup.py'
1010
- 'requirements.txt'
11+
- '*.iss'
1112
pull_request:
1213
paths:
1314
- '.github/workflows/build.yml'
1415
- 'setup.py'
1516
- 'requirements.txt'
17+
- '*.iss'
1618
workflow_dispatch:
1719

1820
env:
@@ -25,9 +27,9 @@ jobs:
2527
build-win-py38: # RCs will still be built and signed by hand
2628
runs-on: windows-latest
2729
steps:
28-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@v4
2931
- name: Install python
30-
uses: actions/setup-python@v4
32+
uses: actions/setup-python@v5
3133
with:
3234
python-version: '3.8'
3335
- name: Download run-time dependencies
@@ -46,25 +48,42 @@ jobs:
4648
cd build
4749
Rename-Item "exe.$NAME" Archipelago
4850
7z a -mx=9 -mhe=on -ms "../dist/$ZIP_NAME" Archipelago
51+
Rename-Item Archipelago "exe.$NAME" # inno_setup.iss expects the original name
4952
- name: Store 7z
50-
uses: actions/upload-artifact@v3
53+
uses: actions/upload-artifact@v4
5154
with:
5255
name: ${{ env.ZIP_NAME }}
5356
path: dist/${{ env.ZIP_NAME }}
5457
retention-days: 7 # keep for 7 days, should be enough
58+
- name: Build Setup
59+
run: |
60+
& "${env:ProgramFiles(x86)}\Inno Setup 6\iscc.exe" inno_setup.iss /DNO_SIGNTOOL
61+
if ( $? -eq $false ) {
62+
Write-Error "Building setup failed!"
63+
exit 1
64+
}
65+
$contents = Get-ChildItem -Path setups/*.exe -Force -Recurse
66+
$SETUP_NAME=$contents[0].Name
67+
echo "SETUP_NAME=$SETUP_NAME" >> $Env:GITHUB_ENV
68+
- name: Store Setup
69+
uses: actions/upload-artifact@v4
70+
with:
71+
name: ${{ env.SETUP_NAME }}
72+
path: setups/${{ env.SETUP_NAME }}
73+
retention-days: 7 # keep for 7 days, should be enough
5574

5675
build-ubuntu2004:
5776
runs-on: ubuntu-20.04
5877
steps:
5978
# - copy code below to release.yml -
60-
- uses: actions/checkout@v3
79+
- uses: actions/checkout@v4
6180
- name: Install base dependencies
6281
run: |
6382
sudo apt update
6483
sudo apt -y install build-essential p7zip xz-utils wget libglib2.0-0
6584
sudo apt -y install python3-gi libgirepository1.0-dev # should pull dependencies for gi installation below
6685
- name: Get a recent python
67-
uses: actions/setup-python@v4
86+
uses: actions/setup-python@v5
6887
with:
6988
python-version: '3.11'
7089
- name: Install build-time dependencies
@@ -100,13 +119,13 @@ jobs:
100119
source venv/bin/activate
101120
python setup.py build_exe --yes
102121
- name: Store AppImage
103-
uses: actions/upload-artifact@v3
122+
uses: actions/upload-artifact@v4
104123
with:
105124
name: ${{ env.APPIMAGE_NAME }}
106125
path: dist/${{ env.APPIMAGE_NAME }}
107126
retention-days: 7
108127
- name: Store .tar.gz
109-
uses: actions/upload-artifact@v3
128+
uses: actions/upload-artifact@v4
110129
with:
111130
name: ${{ env.TAR_NAME }}
112131
path: dist/${{ env.TAR_NAME }}

.github/workflows/codeql-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343

4444
steps:
4545
- name: Checkout repository
46-
uses: actions/checkout@v3
46+
uses: actions/checkout@v4
4747

4848
# Initializes the CodeQL tools for scanning.
4949
- name: Initialize CodeQL
+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Label Pull Request
2+
on:
3+
pull_request_target:
4+
types: ['opened', 'reopened', 'synchronize', 'ready_for_review', 'converted_to_draft', 'closed']
5+
branches: ['main']
6+
permissions:
7+
contents: read
8+
pull-requests: write
9+
10+
jobs:
11+
labeler:
12+
name: 'Apply content-based labels'
13+
if: github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize'
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/labeler@v5
17+
with:
18+
sync-labels: false
19+
peer_review:
20+
name: 'Apply peer review label'
21+
needs: labeler
22+
if: >-
23+
(github.event.action == 'opened' || github.event.action == 'reopened' ||
24+
github.event.action == 'ready_for_review') && !github.event.pull_request.draft
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: 'Add label'
28+
run: "gh pr edit \"$PR_URL\" --add-label 'waiting-on: peer-review'"
29+
env:
30+
PR_URL: ${{ github.event.pull_request.html_url }}
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
unblock_draft_prs:
33+
name: 'Remove waiting-on labels'
34+
needs: labeler
35+
if: github.event.action == 'converted_to_draft' || github.event.action == 'closed'
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: 'Remove labels'
39+
run: |-
40+
gh pr edit "$PR_URL" --remove-label 'waiting-on: peer-review' \
41+
--remove-label 'waiting-on: core-review' \
42+
--remove-label 'waiting-on: world-maintainer' \
43+
--remove-label 'waiting-on: author'
44+
env:
45+
PR_URL: ${{ github.event.pull_request.html_url }}
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set env
1919
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV # tag x.y.z will become "Archipelago x.y.z"
2020
- name: Create Release
21-
uses: softprops/action-gh-release@b7e450da2a4b4cb4bfbae528f788167786cfcedf
21+
uses: softprops/action-gh-release@975c1b265e11dd76618af1c374e7981f9a6ff44a
2222
with:
2323
draft: true # don't publish right away, especially since windows build is added by hand
2424
prerelease: false
@@ -35,14 +35,14 @@ jobs:
3535
- name: Set env
3636
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
3737
# - code below copied from build.yml -
38-
- uses: actions/checkout@v3
38+
- uses: actions/checkout@v4
3939
- name: Install base dependencies
4040
run: |
4141
sudo apt update
4242
sudo apt -y install build-essential p7zip xz-utils wget libglib2.0-0
4343
sudo apt -y install python3-gi libgirepository1.0-dev # should pull dependencies for gi installation below
4444
- name: Get a recent python
45-
uses: actions/setup-python@v4
45+
uses: actions/setup-python@v5
4646
with:
4747
python-version: '3.11'
4848
- name: Install build-time dependencies
@@ -74,7 +74,7 @@ jobs:
7474
echo "TAR_NAME=$TAR_NAME" >> $GITHUB_ENV
7575
# - code above copied from build.yml -
7676
- name: Add to Release
77-
uses: softprops/action-gh-release@b7e450da2a4b4cb4bfbae528f788167786cfcedf
77+
uses: softprops/action-gh-release@975c1b265e11dd76618af1c374e7981f9a6ff44a
7878
with:
7979
draft: true # see above
8080
prerelease: false

.github/workflows/scan-build.yml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Native Code Static Analysis
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.c'
7+
- '**.cc'
8+
- '**.cpp'
9+
- '**.cxx'
10+
- '**.h'
11+
- '**.hh'
12+
- '**.hpp'
13+
- '**.pyx'
14+
- 'setup.py'
15+
- 'requirements.txt'
16+
- '.github/workflows/scan-build.yml'
17+
pull_request:
18+
paths:
19+
- '**.c'
20+
- '**.cc'
21+
- '**.cpp'
22+
- '**.cxx'
23+
- '**.h'
24+
- '**.hh'
25+
- '**.hpp'
26+
- '**.pyx'
27+
- 'setup.py'
28+
- 'requirements.txt'
29+
- '.github/workflows/scan-build.yml'
30+
31+
jobs:
32+
scan-build:
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
with:
38+
submodules: recursive
39+
- name: Install newer Clang
40+
run: |
41+
wget https://apt.llvm.org/llvm.sh
42+
chmod +x ./llvm.sh
43+
sudo ./llvm.sh 17
44+
- name: Install scan-build command
45+
run: |
46+
sudo apt install clang-tools-17
47+
- name: Get a recent python
48+
uses: actions/setup-python@v5
49+
with:
50+
python-version: '3.11'
51+
- name: Install dependencies
52+
run: |
53+
python -m venv venv
54+
source venv/bin/activate
55+
python -m pip install --upgrade pip -r requirements.txt
56+
- name: scan-build
57+
run: |
58+
source venv/bin/activate
59+
scan-build-17 --status-bugs -o scan-build-reports -disable-checker deadcode.DeadStores python setup.py build -y
60+
- name: Store report
61+
if: failure()
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: scan-build-reports
65+
path: scan-build-reports

.github/workflows/unittests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ jobs:
4646
os: macos-latest
4747

4848
steps:
49-
- uses: actions/checkout@v3
49+
- uses: actions/checkout@v4
5050
- name: Set up Python ${{ matrix.python.version }}
51-
uses: actions/setup-python@v4
51+
uses: actions/setup-python@v5
5252
with:
5353
python-version: ${{ matrix.python.version }}
5454
- name: Install dependencies

.run/Archipelago Unittests.run.xml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="Archipelago Unittests" type="tests" factoryName="Unittests">
3+
<module name="Archipelago" />
4+
<option name="INTERPRETER_OPTIONS" value="" />
5+
<option name="PARENT_ENVS" value="true" />
6+
<option name="SDK_HOME" value="" />
7+
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
8+
<option name="IS_MODULE_SDK" value="true" />
9+
<option name="ADD_CONTENT_ROOTS" value="true" />
10+
<option name="ADD_SOURCE_ROOTS" value="true" />
11+
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
12+
<option name="_new_pattern" value="&quot;&quot;" />
13+
<option name="_new_additionalArguments" value="&quot;&quot;" />
14+
<option name="_new_target" value="&quot;$PROJECT_DIR$/test&quot;" />
15+
<option name="_new_targetType" value="&quot;PATH&quot;" />
16+
<method v="2" />
17+
</configuration>
18+
</component>

0 commit comments

Comments
 (0)