Skip to content

Commit 53ff5c9

Browse files
authored
Merge branch 'ArchipelagoMW:main' into newmain
2 parents 0436e7a + 8aacc23 commit 53ff5c9

947 files changed

Lines changed: 135160 additions & 30967 deletions

File tree

Some content is hidden

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

.github/labeler.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
- '!data/**'
2222
- '!.run/**'
2323
- '!.github/**'
24-
- '!worlds_disabled/**'
2524
- '!worlds/**'
2625
- '!WebHost.py'
2726
- '!WebHostLib/**'

.github/pyright-config.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
{
22
"include": [
3-
"type_check.py",
3+
"../BizHawkClient.py",
4+
"../Patch.py",
5+
"../test/param.py",
6+
"../test/general/test_groups.py",
7+
"../test/general/test_helpers.py",
8+
"../test/general/test_memory.py",
9+
"../test/general/test_names.py",
10+
"../test/multiworld/__init__.py",
11+
"../test/multiworld/test_multiworlds.py",
12+
"../test/netutils/__init__.py",
13+
"../test/programs/__init__.py",
14+
"../test/programs/test_multi_server.py",
15+
"../test/utils/__init__.py",
16+
"../test/webhost/test_descriptions.py",
417
"../worlds/AutoSNIClient.py",
5-
"../Patch.py"
18+
"type_check.py"
619
],
720

821
"exclude": [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
continue-on-error: false
6666
if: env.diff != '' && matrix.task == 'flake8'
6767
run: |
68-
flake8 --count --select=E9,F63,F7,F82 --show-source --statistics ${{ env.diff }}
68+
flake8 --count --select=E9,F63,F7,F82 --ignore F824 --show-source --statistics ${{ env.diff }}
6969
7070
- name: "flake8: Lint modified files"
7171
continue-on-error: true

.github/workflows/build.yml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,17 @@ env:
2121
ENEMIZER_VERSION: 7.1
2222
APPIMAGETOOL_VERSION: 13
2323

24+
permissions: # permissions required for attestation
25+
id-token: 'write'
26+
attestations: 'write'
27+
2428
jobs:
2529
# build-release-macos: # LF volunteer
2630

27-
build-win: # RCs will still be built and signed by hand
31+
build-win: # RCs and releases may still be built and signed by hand
2832
runs-on: windows-latest
2933
steps:
34+
# - copy code below to release.yml -
3035
- uses: actions/checkout@v4
3136
- name: Install python
3237
uses: actions/setup-python@v5
@@ -65,6 +70,18 @@ jobs:
6570
$contents = Get-ChildItem -Path setups/*.exe -Force -Recurse
6671
$SETUP_NAME=$contents[0].Name
6772
echo "SETUP_NAME=$SETUP_NAME" >> $Env:GITHUB_ENV
73+
# - copy code above to release.yml -
74+
- name: Attest Build
75+
if: ${{ github.event_name == 'workflow_dispatch' }}
76+
uses: actions/attest-build-provenance@v2
77+
with:
78+
subject-path: |
79+
build/exe.*/ArchipelagoLauncher.exe
80+
build/exe.*/ArchipelagoLauncherDebug.exe
81+
build/exe.*/ArchipelagoGenerate.exe
82+
build/exe.*/ArchipelagoServer.exe
83+
dist/${{ env.ZIP_NAME }}
84+
setups/${{ env.SETUP_NAME }}
6885
- name: Check build loads expected worlds
6986
shell: bash
7087
run: |
@@ -99,8 +116,8 @@ jobs:
99116
if-no-files-found: error
100117
retention-days: 7 # keep for 7 days, should be enough
101118

102-
build-ubuntu2004:
103-
runs-on: ubuntu-20.04
119+
build-ubuntu2204:
120+
runs-on: ubuntu-22.04
104121
steps:
105122
# - copy code below to release.yml -
106123
- uses: actions/checkout@v4
@@ -132,7 +149,7 @@ jobs:
132149
# charset-normalizer was somehow incomplete in the github runner
133150
"${{ env.PYTHON }}" -m venv venv
134151
source venv/bin/activate
135-
"${{ env.PYTHON }}" -m pip install --upgrade pip PyGObject charset-normalizer
152+
"${{ env.PYTHON }}" -m pip install --upgrade pip "PyGObject<3.51.0" charset-normalizer
136153
python setup.py build_exe --yes bdist_appimage --yes
137154
echo -e "setup.py build output:\n `ls build`"
138155
echo -e "setup.py dist output:\n `ls dist`"
@@ -142,6 +159,16 @@ jobs:
142159
echo "APPIMAGE_NAME=$APPIMAGE_NAME" >> $GITHUB_ENV
143160
echo "TAR_NAME=$TAR_NAME" >> $GITHUB_ENV
144161
# - copy code above to release.yml -
162+
- name: Attest Build
163+
if: ${{ github.event_name == 'workflow_dispatch' }}
164+
uses: actions/attest-build-provenance@v2
165+
with:
166+
subject-path: |
167+
build/exe.*/ArchipelagoLauncher
168+
build/exe.*/ArchipelagoGenerate
169+
build/exe.*/ArchipelagoServer
170+
dist/${{ env.APPIMAGE_NAME }}*
171+
dist/${{ env.TAR_NAME }}
145172
- name: Build Again
146173
run: |
147174
source venv/bin/activate

.github/workflows/ctest.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- '**.hh?'
1212
- '**.hpp'
1313
- '**.hxx'
14-
- '**.CMakeLists'
14+
- '**/CMakeLists.txt'
1515
- '.github/workflows/ctest.yml'
1616
pull_request:
1717
paths:
@@ -21,7 +21,7 @@ on:
2121
- '**.hh?'
2222
- '**.hpp'
2323
- '**.hxx'
24-
- '**.CMakeLists'
24+
- '**/CMakeLists.txt'
2525
- '.github/workflows/ctest.yml'
2626

2727
jobs:
@@ -36,9 +36,9 @@ jobs:
3636

3737
steps:
3838
- uses: actions/checkout@v4
39-
- uses: ilammy/msvc-dev-cmd@v1
39+
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756
4040
if: startsWith(matrix.os,'windows')
41-
- uses: Bacondish2023/setup-googletest@v1
41+
- uses: Bacondish2023/setup-googletest@49065d1f7a6d21f6134864dd65980fe5dbe06c73
4242
with:
4343
build-type: 'Release'
4444
- name: Build tests

.github/workflows/label-pull-requests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
permissions:
77
contents: read
88
pull-requests: write
9+
env:
10+
GH_REPO: ${{ github.repository }}
911

1012
jobs:
1113
labeler:

.github/workflows/release.yml

Lines changed: 85 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ env:
1111
ENEMIZER_VERSION: 7.1
1212
APPIMAGETOOL_VERSION: 13
1313

14+
permissions: # permissions required for attestation
15+
id-token: 'write'
16+
attestations: 'write'
17+
contents: 'write' # additionally required for release
18+
1419
jobs:
1520
create-release:
1621
runs-on: ubuntu-latest
@@ -26,11 +31,79 @@ jobs:
2631
env:
2732
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2833

29-
# build-release-windows: # this is done by hand because of signing
3034
# build-release-macos: # LF volunteer
3135

32-
build-release-ubuntu2004:
33-
runs-on: ubuntu-20.04
36+
build-release-win:
37+
runs-on: windows-latest
38+
if: ${{ true }} # change to false to skip if release is built by hand
39+
needs: create-release
40+
steps:
41+
- name: Set env
42+
shell: bash
43+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
44+
# - code below copied from build.yml -
45+
- uses: actions/checkout@v4
46+
- name: Install python
47+
uses: actions/setup-python@v5
48+
with:
49+
python-version: '~3.12.7'
50+
check-latest: true
51+
- name: Download run-time dependencies
52+
run: |
53+
Invoke-WebRequest -Uri https://github.com/Ijwu/Enemizer/releases/download/${Env:ENEMIZER_VERSION}/win-x64.zip -OutFile enemizer.zip
54+
Expand-Archive -Path enemizer.zip -DestinationPath EnemizerCLI -Force
55+
choco install innosetup --version=6.2.2 --allow-downgrade
56+
- name: Build
57+
run: |
58+
python -m pip install --upgrade pip
59+
python setup.py build_exe --yes
60+
if ( $? -eq $false ) {
61+
Write-Error "setup.py failed!"
62+
exit 1
63+
}
64+
$NAME="$(ls build | Select-String -Pattern 'exe')".Split('.',2)[1]
65+
$ZIP_NAME="Archipelago_$NAME.7z"
66+
echo "$NAME -> $ZIP_NAME"
67+
echo "ZIP_NAME=$ZIP_NAME" >> $Env:GITHUB_ENV
68+
New-Item -Path dist -ItemType Directory -Force
69+
cd build
70+
Rename-Item "exe.$NAME" Archipelago
71+
7z a -mx=9 -mhe=on -ms "../dist/$ZIP_NAME" Archipelago
72+
Rename-Item Archipelago "exe.$NAME" # inno_setup.iss expects the original name
73+
- name: Build Setup
74+
run: |
75+
& "${env:ProgramFiles(x86)}\Inno Setup 6\iscc.exe" inno_setup.iss /DNO_SIGNTOOL
76+
if ( $? -eq $false ) {
77+
Write-Error "Building setup failed!"
78+
exit 1
79+
}
80+
$contents = Get-ChildItem -Path setups/*.exe -Force -Recurse
81+
$SETUP_NAME=$contents[0].Name
82+
echo "SETUP_NAME=$SETUP_NAME" >> $Env:GITHUB_ENV
83+
# - code above copied from build.yml -
84+
- name: Attest Build
85+
uses: actions/attest-build-provenance@v2
86+
with:
87+
subject-path: |
88+
build/exe.*/ArchipelagoLauncher.exe
89+
build/exe.*/ArchipelagoLauncherDebug.exe
90+
build/exe.*/ArchipelagoGenerate.exe
91+
build/exe.*/ArchipelagoServer.exe
92+
setups/*
93+
- name: Add to Release
94+
uses: softprops/action-gh-release@975c1b265e11dd76618af1c374e7981f9a6ff44a
95+
with:
96+
draft: true # see above
97+
prerelease: false
98+
name: Archipelago ${{ env.RELEASE_VERSION }}
99+
files: |
100+
setups/*
101+
env:
102+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103+
104+
build-release-ubuntu2204:
105+
runs-on: ubuntu-22.04
106+
needs: create-release
34107
steps:
35108
- name: Set env
36109
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
@@ -64,7 +137,7 @@ jobs:
64137
# charset-normalizer was somehow incomplete in the github runner
65138
"${{ env.PYTHON }}" -m venv venv
66139
source venv/bin/activate
67-
"${{ env.PYTHON }}" -m pip install --upgrade pip PyGObject charset-normalizer
140+
"${{ env.PYTHON }}" -m pip install --upgrade pip "PyGObject<3.51.0" charset-normalizer
68141
python setup.py build_exe --yes bdist_appimage --yes
69142
echo -e "setup.py build output:\n `ls build`"
70143
echo -e "setup.py dist output:\n `ls dist`"
@@ -74,6 +147,14 @@ jobs:
74147
echo "APPIMAGE_NAME=$APPIMAGE_NAME" >> $GITHUB_ENV
75148
echo "TAR_NAME=$TAR_NAME" >> $GITHUB_ENV
76149
# - code above copied from build.yml -
150+
- name: Attest Build
151+
uses: actions/attest-build-provenance@v2
152+
with:
153+
subject-path: |
154+
build/exe.*/ArchipelagoLauncher
155+
build/exe.*/ArchipelagoGenerate
156+
build/exe.*/ArchipelagoServer
157+
dist/*
77158
- name: Add to Release
78159
uses: softprops/action-gh-release@975c1b265e11dd76618af1c374e7981f9a6ff44a
79160
with:

.github/workflows/strict-type-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
- name: "Install dependencies"
2828
run: |
29-
python -m pip install --upgrade pip pyright==1.1.358
29+
python -m pip install --upgrade pip pyright==1.1.392.post0
3030
python ModuleUpdate.py --append "WebHostLib/requirements.txt" --force --yes
3131
3232
- name: "pyright: strict check on specific files"

.gitignore

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
*_Spoiler.txt
55
*.bmbp
66
*.apbp
7+
*.apcivvi
78
*.apl2ac
89
*.apm3
910
*.apmc
1011
*.apz5
1112
*.aptloz
13+
*.aptww
1214
*.apemerald
1315
*.pyc
1416
*.pyd
@@ -54,7 +56,6 @@ success.txt
5456
output/
5557
Output Logs/
5658
/factorio/
57-
/Minecraft Forge Server/
5859
/WebHostLib/static/generated
5960
/freeze_requirements.txt
6061
/Archipelago.zip
@@ -182,12 +183,6 @@ _speedups.c
182183
_speedups.cpp
183184
_speedups.html
184185

185-
# minecraft server stuff
186-
jdk*/
187-
minecraft*/
188-
minecraft_versions.json
189-
!worlds/minecraft/
190-
191186
# pyenv
192187
.python-version
193188

AHITClient.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
import sys
12
from worlds.ahit.Client import launch
23
import Utils
34
import ModuleUpdate
45
ModuleUpdate.update()
56

67
if __name__ == "__main__":
78
Utils.init_logging("AHITClient", exception_logger="Client")
8-
launch()
9+
launch(*sys.argv[1:])

0 commit comments

Comments
 (0)