diff --git a/.github/workflows/analyze-modified-files.yml b/.github/workflows/analyze-modified-files.yml deleted file mode 100644 index 862a050c517..00000000000 --- a/.github/workflows/analyze-modified-files.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: Analyze modified files - -on: - pull_request: - paths: - - "**.py" - push: - paths: - - "**.py" - -env: - BASE: ${{ github.event.pull_request.base.sha }} - HEAD: ${{ github.event.pull_request.head.sha }} - BEFORE: ${{ github.event.before }} - AFTER: ${{ github.event.after }} - -jobs: - flake8-or-mypy: - strategy: - fail-fast: false - matrix: - task: [flake8, mypy] - - name: ${{ matrix.task }} - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: "Determine modified files (pull_request)" - if: github.event_name == 'pull_request' - run: | - git fetch origin $BASE $HEAD - DIFF=$(git diff --diff-filter=d --name-only $BASE...$HEAD -- "*.py") - echo "modified files:" - echo "$DIFF" - echo "diff=${DIFF//$'\n'/$' '}" >> $GITHUB_ENV - - - name: "Determine modified files (push)" - if: github.event_name == 'push' && github.event.before != '0000000000000000000000000000000000000000' - run: | - git fetch origin $BEFORE $AFTER - DIFF=$(git diff --diff-filter=d --name-only $BEFORE..$AFTER -- "*.py") - echo "modified files:" - echo "$DIFF" - echo "diff=${DIFF//$'\n'/$' '}" >> $GITHUB_ENV - - - name: "Treat all files as modified (new branch)" - if: github.event_name == 'push' && github.event.before == '0000000000000000000000000000000000000000' - run: | - echo "diff=." >> $GITHUB_ENV - - - uses: actions/setup-python@v5 - if: env.diff != '' - with: - python-version: '3.11' - - - name: "Install dependencies" - if: env.diff != '' - run: | - python -m pip install --upgrade pip ${{ matrix.task }} - python ModuleUpdate.py --append "WebHostLib/requirements.txt" --force --yes - - - name: "flake8: Stop the build if there are Python syntax errors or undefined names" - continue-on-error: false - if: env.diff != '' && matrix.task == 'flake8' - run: | - flake8 --count --select=E9,F63,F7,F82 --ignore F824 --show-source --statistics ${{ env.diff }} - - - name: "flake8: Lint modified files" - continue-on-error: true - if: env.diff != '' && matrix.task == 'flake8' - run: | - flake8 --count --max-complexity=14 --max-doc-length=120 --max-line-length=120 --statistics ${{ env.diff }} - - - name: "mypy: Type check modified files" - continue-on-error: true - if: env.diff != '' && matrix.task == 'mypy' - run: | - mypy --follow-imports=silent --install-types --non-interactive --strict ${{ env.diff }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9c0cd14f8b2..1942c105d9d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,219 +1,40 @@ -# This workflow will build a release-like distribution when manually dispatched - name: Build on: push: - paths: - - '.github/workflows/build.yml' - - 'setup.py' - - 'requirements.txt' - - '*.iss' - - 'worlds/*/archipelago.json' + branches: [ "master", "main" ] + tags: + - '*' pull_request: - paths: - - '.github/workflows/build.yml' - - 'setup.py' - - 'requirements.txt' - - '*.iss' - - 'worlds/*/archipelago.json' - workflow_dispatch: - -env: - ENEMIZER_VERSION: 7.1 - # NOTE: since appimage/appimagetool and appimage/type2-runtime does not have tags anymore, - # we check the sha256 and require manual intervention if it was updated. - APPIMAGE_FORK: 'PopTracker' - APPIMAGETOOL_VERSION: 'r-2025-11-18' - APPIMAGETOOL_X86_64_HASH: '4577a452b30af2337123fbb383aea154b618e51ad5448c3b62085cbbbfbfd9a2' - APPIMAGE_RUNTIME_VERSION: 'r-2025-11-07' - APPIMAGE_RUNTIME_X86_64_HASH: '27ddd3f78e483fc5f7856e413d7c17092917f8c35bfe3318a0d378aa9435ad17' + branches: [ "master", "main" ] + release: + types: [published] -permissions: # permissions required for attestation - id-token: 'write' - attestations: 'write' +permissions: + contents: write jobs: - # build-release-macos: # LF volunteer - - build-win: # RCs and releases may still be built and signed by hand - runs-on: windows-latest + build-apworld: + runs-on: ubuntu-latest steps: - # - copy code below to release.yml - - uses: actions/checkout@v4 - - name: Install python - uses: actions/setup-python@v5 - with: - python-version: '~3.12.7' - check-latest: true - - name: Download run-time dependencies - run: | - Invoke-WebRequest -Uri https://github.com/Ijwu/Enemizer/releases/download/${Env:ENEMIZER_VERSION}/win-x64.zip -OutFile enemizer.zip - Expand-Archive -Path enemizer.zip -DestinationPath EnemizerCLI -Force - choco install innosetup --version=6.2.2 --allow-downgrade - - name: Build - run: | - python -m pip install --upgrade pip - python setup.py build_exe --yes - if ( $? -eq $false ) { - Write-Error "setup.py failed!" - exit 1 - } - $NAME="$(ls build | Select-String -Pattern 'exe')".Split('.',2)[1] - $ZIP_NAME="Archipelago_$NAME.7z" - echo "$NAME -> $ZIP_NAME" - echo "ZIP_NAME=$ZIP_NAME" >> $Env:GITHUB_ENV - New-Item -Path dist -ItemType Directory -Force - cd build - Rename-Item "exe.$NAME" Archipelago - 7z a -mx=9 -mhe=on -ms "../dist/$ZIP_NAME" Archipelago - Rename-Item Archipelago "exe.$NAME" # inno_setup.iss expects the original name - - name: Build Setup - run: | - & "${env:ProgramFiles(x86)}\Inno Setup 6\iscc.exe" inno_setup.iss /DNO_SIGNTOOL - if ( $? -eq $false ) { - Write-Error "Building setup failed!" - exit 1 - } - $contents = Get-ChildItem -Path setups/*.exe -Force -Recurse - $SETUP_NAME=$contents[0].Name - echo "SETUP_NAME=$SETUP_NAME" >> $Env:GITHUB_ENV - # - copy code above to release.yml - - - name: Attest Build - if: ${{ github.event_name == 'workflow_dispatch' }} - uses: actions/attest-build-provenance@v2 - with: - subject-path: | - build/exe.*/ArchipelagoLauncher.exe - build/exe.*/ArchipelagoLauncherDebug.exe - build/exe.*/ArchipelagoGenerate.exe - build/exe.*/ArchipelagoServer.exe - dist/${{ env.ZIP_NAME }} - setups/${{ env.SETUP_NAME }} - - name: Check build loads expected worlds - shell: bash - run: | - cd build/exe* - mv Players/Templates/meta.yaml . - ls -1 Players/Templates | sort > setup-player-templates.txt - rm -R Players/Templates - timeout 30 ./ArchipelagoLauncher "Generate Template Options" || true - ls -1 Players/Templates | sort > generated-player-templates.txt - cmp setup-player-templates.txt generated-player-templates.txt \ - || diff setup-player-templates.txt generated-player-templates.txt - mv meta.yaml Players/Templates/ - - name: Test Generate - shell: bash - run: | - cd build/exe* - cp Players/Templates/VVVVVV.yaml Players/ - timeout 30 ./ArchipelagoGenerate - - name: Store 7z - uses: actions/upload-artifact@v4 - with: - name: ${{ env.ZIP_NAME }} - path: dist/${{ env.ZIP_NAME }} - compression-level: 0 # .7z is incompressible by zip - if-no-files-found: error - retention-days: 7 # keep for 7 days, should be enough - - name: Store Setup - uses: actions/upload-artifact@v4 - with: - name: ${{ env.SETUP_NAME }} - path: setups/${{ env.SETUP_NAME }} - if-no-files-found: error - retention-days: 7 # keep for 7 days, should be enough - build-ubuntu2204: - runs-on: ubuntu-22.04 - steps: - # - copy code below to release.yml - - - uses: actions/checkout@v4 - - name: Install base dependencies - run: | - sudo apt update - sudo apt -y install build-essential p7zip xz-utils wget libglib2.0-0 - sudo apt -y install python3-gi libgirepository1.0-dev # should pull dependencies for gi installation below - - name: Get a recent python - uses: actions/setup-python@v5 - with: - python-version: '~3.12.7' - check-latest: true - - name: Install build-time dependencies - run: | - echo "PYTHON=python3.12" >> $GITHUB_ENV - wget -nv https://github.com/$APPIMAGE_FORK/appimagetool/releases/download/$APPIMAGETOOL_VERSION/appimagetool-x86_64.AppImage - echo "$APPIMAGETOOL_X86_64_HASH appimagetool-x86_64.AppImage" | sha256sum -c - wget -nv https://github.com/$APPIMAGE_FORK/type2-runtime/releases/download/$APPIMAGE_RUNTIME_VERSION/runtime-x86_64 - echo "$APPIMAGE_RUNTIME_X86_64_HASH runtime-x86_64" | sha256sum -c - chmod a+rx appimagetool-x86_64.AppImage - ./appimagetool-x86_64.AppImage --appimage-extract - echo -e '#/bin/sh\n./squashfs-root/AppRun --runtime-file runtime-x86_64 "$@"' > appimagetool - chmod a+rx appimagetool - - name: Download run-time dependencies - run: | - wget -nv https://github.com/Ijwu/Enemizer/releases/download/$ENEMIZER_VERSION/ubuntu.16.04-x64.7z - 7za x -oEnemizerCLI/ ubuntu.16.04-x64.7z - - name: Build - run: | - # pygobject is an optional dependency for kivy that's not in requirements - # charset-normalizer was somehow incomplete in the github runner - "${{ env.PYTHON }}" -m venv venv - source venv/bin/activate - "${{ env.PYTHON }}" -m pip install --upgrade pip "PyGObject<3.51.0" charset-normalizer - python setup.py build_exe --yes bdist_appimage --yes - echo -e "setup.py build output:\n `ls build`" - echo -e "setup.py dist output:\n `ls dist`" - cd dist && export APPIMAGE_NAME="`ls *.AppImage`" && cd .. - export TAR_NAME="${APPIMAGE_NAME%.AppImage}.tar.gz" - (cd build && DIR_NAME="`ls | grep exe`" && mv "$DIR_NAME" Archipelago && tar -cv Archipelago | gzip -8 > ../dist/$TAR_NAME && mv Archipelago "$DIR_NAME") - echo "APPIMAGE_NAME=$APPIMAGE_NAME" >> $GITHUB_ENV - echo "TAR_NAME=$TAR_NAME" >> $GITHUB_ENV - # - copy code above to release.yml - - - name: Attest Build - if: ${{ github.event_name == 'workflow_dispatch' }} - uses: actions/attest-build-provenance@v2 - with: - subject-path: | - build/exe.*/ArchipelagoLauncher - build/exe.*/ArchipelagoGenerate - build/exe.*/ArchipelagoServer - dist/${{ env.APPIMAGE_NAME }}* - dist/${{ env.TAR_NAME }} - - name: Build Again - run: | - source venv/bin/activate - python setup.py build_exe --yes - - name: Check build loads expected worlds - shell: bash + - name: Create minecraft.apworld run: | - cd build/exe* - mv Players/Templates/meta.yaml . - ls -1 Players/Templates | sort > setup-player-templates.txt - rm -R Players/Templates - timeout 30 ./ArchipelagoLauncher "Generate Template Options" || true - ls -1 Players/Templates | sort > generated-player-templates.txt - cmp setup-player-templates.txt generated-player-templates.txt \ - || diff setup-player-templates.txt generated-player-templates.txt - mv meta.yaml Players/Templates/ - - name: Test Generate - shell: bash - run: | - cd build/exe* - cp Players/Templates/VVVVVV.yaml Players/ - timeout 30 ./ArchipelagoGenerate - - name: Store AppImage - uses: actions/upload-artifact@v4 - with: - name: ${{ env.APPIMAGE_NAME }} - path: dist/${{ env.APPIMAGE_NAME }} - if-no-files-found: error - retention-days: 7 - - name: Store .tar.gz + cd worlds + zip -r ../minecraft_fabric.apworld minecraft_fabric + + - name: Upload APWorld Artifact uses: actions/upload-artifact@v4 with: - name: ${{ env.TAR_NAME }} - path: dist/${{ env.TAR_NAME }} - compression-level: 0 # .gz is incompressible by zip - if-no-files-found: error - retention-days: 7 + name: Archipelago-Worlds + path: "*.apworld" + + - name: Update Release with APWorlds (tag push or published release) + if: github.event_name == 'release' || startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v2 + with: + files: "*.apworld" + tag_name: ${{ github.event_name == 'release' && github.event.release.tag_name || github.ref_name }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 3abbb5f6449..00000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,75 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ main ] - paths: - - '**.py' - - '**.js' - - '.github/workflows/codeql-analysis.yml' - pull_request: - # The branches below must be a subset of the branches above - branches: [ main ] - paths: - - '**.py' - - '**.js' - - '.github/workflows/codeql-analysis.yml' - schedule: - - cron: '44 8 * * 1' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - language: [ 'javascript', 'python' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/ctest.yml b/.github/workflows/ctest.yml deleted file mode 100644 index 610f6d74777..00000000000 --- a/.github/workflows/ctest.yml +++ /dev/null @@ -1,54 +0,0 @@ -# Run CMake / CTest C++ unit tests - -name: ctest - -on: - push: - paths: - - '**.cc?' - - '**.cpp' - - '**.cxx' - - '**.hh?' - - '**.hpp' - - '**.hxx' - - '**/CMakeLists.txt' - - '.github/workflows/ctest.yml' - pull_request: - paths: - - '**.cc?' - - '**.cpp' - - '**.cxx' - - '**.hh?' - - '**.hpp' - - '**.hxx' - - '**/CMakeLists.txt' - - '.github/workflows/ctest.yml' - -jobs: - ctest: - runs-on: ${{ matrix.os }} - name: Test C++ ${{ matrix.os }} - - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest] - - steps: - - uses: actions/checkout@v4 - - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 - if: startsWith(matrix.os,'windows') - - uses: Bacondish2023/setup-googletest@49065d1f7a6d21f6134864dd65980fe5dbe06c73 - with: - build-type: 'Release' - - name: Build tests - run: | - cd test/cpp - mkdir build - cmake -S . -B build/ -DCMAKE_BUILD_TYPE=Release - cmake --build build/ --config Release - ls - - name: Run tests - run: | - cd test/cpp - ctest --test-dir build/ -C Release --output-on-failure diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index 0061dd15b00..00000000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,154 +0,0 @@ -name: Build and Publish Docker Images - -on: - push: - paths: - - "**" - - "!docs/**" - - "!deploy/**" - - "!setup.py" - - "!.gitignore" - - "!.github/workflows/**" - - ".github/workflows/docker.yml" - branches: - - "main" - tags: - - "v?[0-9]+.[0-9]+.[0-9]*" - workflow_dispatch: - -env: - REGISTRY: ghcr.io - -jobs: - prepare: - runs-on: ubuntu-latest - outputs: - image-name: ${{ steps.image.outputs.name }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - package-name: ${{ steps.package.outputs.name }} - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set lowercase image name - id: image - run: | - echo "name=${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT - - - name: Set package name - id: package - run: | - echo "name=$(basename ${GITHUB_REPOSITORY,,})" >> $GITHUB_OUTPUT - - - name: Extract metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ steps.image.outputs.name }} - tags: | - type=ref,event=branch,enable={{is_not_default_branch}} - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=raw,value=nightly,enable={{is_default_branch}} - - - name: Compute final tags - id: final-tags - run: | - readarray -t tags <<< "${{ steps.meta.outputs.tags }}" - - if [[ "${{ github.ref_type }}" == "tag" ]]; then - tag="${{ github.ref_name }}" - if [[ "$tag" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - full_latest="${{ env.REGISTRY }}/${{ steps.image.outputs.name }}:latest" - # Check if latest is already in tags to avoid duplicates - if ! printf '%s\n' "${tags[@]}" | grep -q "^$full_latest$"; then - tags+=("$full_latest") - fi - fi - fi - - # Set multiline output - echo "tags<> $GITHUB_OUTPUT - printf '%s\n' "${tags[@]}" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - - build: - needs: prepare - runs-on: ${{ matrix.runner }} - permissions: - contents: read - packages: write - strategy: - matrix: - include: - - platform: amd64 - runner: ubuntu-latest - suffix: amd64 - cache-scope: amd64 - - platform: arm64 - runner: ubuntu-24.04-arm - suffix: arm64 - cache-scope: arm64 - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Compute suffixed tags - id: tags - run: | - readarray -t tags <<< "${{ needs.prepare.outputs.tags }}" - suffixed=() - for t in "${tags[@]}"; do - suffixed+=("$t-${{ matrix.suffix }}") - done - echo "tags=$(IFS=','; echo "${suffixed[*]}")" >> $GITHUB_OUTPUT - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - file: ./Dockerfile - platforms: linux/${{ matrix.platform }} - push: true - tags: ${{ steps.tags.outputs.tags }} - labels: ${{ needs.prepare.outputs.labels }} - cache-from: type=gha,scope=${{ matrix.cache-scope }} - cache-to: type=gha,mode=max,scope=${{ matrix.cache-scope }} - provenance: false - - manifest: - needs: [prepare, build] - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Create and push multi-arch manifest - run: | - readarray -t tag_array <<< "${{ needs.prepare.outputs.tags }}" - - for tag in "${tag_array[@]}"; do - docker manifest create "$tag" \ - "$tag-amd64" \ - "$tag-arm64" - - docker manifest push "$tag" - done diff --git a/.github/workflows/label-pull-requests.yml b/.github/workflows/label-pull-requests.yml deleted file mode 100644 index 1675c942bdd..00000000000 --- a/.github/workflows/label-pull-requests.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Label Pull Request -on: - pull_request_target: - types: ['opened', 'reopened', 'synchronize', 'ready_for_review', 'converted_to_draft', 'closed'] - branches: ['main'] -permissions: - contents: read - pull-requests: write -env: - GH_REPO: ${{ github.repository }} - -jobs: - labeler: - name: 'Apply content-based labels' - runs-on: ubuntu-latest - steps: - - uses: actions/labeler@v5 - with: - sync-labels: false - peer_review: - name: 'Apply peer review label' - needs: labeler - if: >- - (github.event.action == 'opened' || github.event.action == 'reopened' || - github.event.action == 'ready_for_review') && !github.event.pull_request.draft - runs-on: ubuntu-latest - steps: - - name: 'Add label' - run: "gh pr edit \"$PR_URL\" --add-label 'waiting-on: peer-review'" - env: - PR_URL: ${{ github.event.pull_request.html_url }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - unblock_draft_prs: - name: 'Remove waiting-on labels' - needs: labeler - if: github.event.action == 'converted_to_draft' || github.event.action == 'closed' - runs-on: ubuntu-latest - steps: - - name: 'Remove labels' - run: |- - gh pr edit "$PR_URL" --remove-label 'waiting-on: peer-review' \ - --remove-label 'waiting-on: core-review' \ - --remove-label 'waiting-on: world-maintainer' \ - --remove-label 'waiting-on: author' - env: - PR_URL: ${{ github.event.pull_request.html_url }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 7f81e575074..00000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,176 +0,0 @@ -# This workflow will create a release and store builds to it when an x.y.z tag is pushed - -name: Release - -on: - push: - tags: - - 'v?[0-9]+.[0-9]+.[0-9]*' - -env: - ENEMIZER_VERSION: 7.1 - # NOTE: since appimage/appimagetool and appimage/type2-runtime does not have tags anymore, - # we check the sha256 and require manual intervention if it was updated. - APPIMAGE_FORK: 'PopTracker' - APPIMAGETOOL_VERSION: 'r-2025-11-18' - APPIMAGETOOL_X86_64_HASH: '4577a452b30af2337123fbb383aea154b618e51ad5448c3b62085cbbbfbfd9a2' - APPIMAGE_RUNTIME_VERSION: 'r-2025-11-07' - APPIMAGE_RUNTIME_X86_64_HASH: '27ddd3f78e483fc5f7856e413d7c17092917f8c35bfe3318a0d378aa9435ad17' - -permissions: # permissions required for attestation - id-token: 'write' - attestations: 'write' - contents: 'write' # additionally required for release - -jobs: - create-release: - runs-on: ubuntu-latest - steps: - - name: Set env - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV # tag x.y.z will become "Archipelago x.y.z" - - name: Create Release - uses: softprops/action-gh-release@975c1b265e11dd76618af1c374e7981f9a6ff44a - with: - draft: true # don't publish right away, especially since windows build is added by hand - prerelease: false - name: Archipelago ${{ env.RELEASE_VERSION }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # build-release-macos: # LF volunteer - - build-release-win: - runs-on: windows-latest - if: ${{ true }} # change to false to skip if release is built by hand - needs: create-release - steps: - - name: Set env - shell: bash - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - # - code below copied from build.yml - - - uses: actions/checkout@v4 - - name: Install python - uses: actions/setup-python@v5 - with: - python-version: '~3.12.7' - check-latest: true - - name: Download run-time dependencies - run: | - Invoke-WebRequest -Uri https://github.com/Ijwu/Enemizer/releases/download/${Env:ENEMIZER_VERSION}/win-x64.zip -OutFile enemizer.zip - Expand-Archive -Path enemizer.zip -DestinationPath EnemizerCLI -Force - choco install innosetup --version=6.2.2 --allow-downgrade - - name: Build - run: | - python -m pip install --upgrade pip - python setup.py build_exe --yes - if ( $? -eq $false ) { - Write-Error "setup.py failed!" - exit 1 - } - $NAME="$(ls build | Select-String -Pattern 'exe')".Split('.',2)[1] - $ZIP_NAME="Archipelago_$NAME.7z" - echo "$NAME -> $ZIP_NAME" - echo "ZIP_NAME=$ZIP_NAME" >> $Env:GITHUB_ENV - New-Item -Path dist -ItemType Directory -Force - cd build - Rename-Item "exe.$NAME" Archipelago - 7z a -mx=9 -mhe=on -ms "../dist/$ZIP_NAME" Archipelago - Rename-Item Archipelago "exe.$NAME" # inno_setup.iss expects the original name - - name: Build Setup - run: | - & "${env:ProgramFiles(x86)}\Inno Setup 6\iscc.exe" inno_setup.iss /DNO_SIGNTOOL - if ( $? -eq $false ) { - Write-Error "Building setup failed!" - exit 1 - } - $contents = Get-ChildItem -Path setups/*.exe -Force -Recurse - $SETUP_NAME=$contents[0].Name - echo "SETUP_NAME=$SETUP_NAME" >> $Env:GITHUB_ENV - # - code above copied from build.yml - - - name: Attest Build - uses: actions/attest-build-provenance@v2 - with: - subject-path: | - build/exe.*/ArchipelagoLauncher.exe - build/exe.*/ArchipelagoLauncherDebug.exe - build/exe.*/ArchipelagoGenerate.exe - build/exe.*/ArchipelagoServer.exe - setups/* - - name: Add to Release - uses: softprops/action-gh-release@975c1b265e11dd76618af1c374e7981f9a6ff44a - with: - draft: true # see above - prerelease: false - name: Archipelago ${{ env.RELEASE_VERSION }} - files: | - setups/* - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - build-release-ubuntu2204: - runs-on: ubuntu-22.04 - needs: create-release - steps: - - name: Set env - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - # - code below copied from build.yml - - - uses: actions/checkout@v4 - - name: Install base dependencies - run: | - sudo apt update - sudo apt -y install build-essential p7zip xz-utils wget libglib2.0-0 - sudo apt -y install python3-gi libgirepository1.0-dev # should pull dependencies for gi installation below - - name: Get a recent python - uses: actions/setup-python@v5 - with: - python-version: '~3.12.7' - check-latest: true - - name: Install build-time dependencies - run: | - echo "PYTHON=python3.12" >> $GITHUB_ENV - wget -nv https://github.com/$APPIMAGE_FORK/appimagetool/releases/download/$APPIMAGETOOL_VERSION/appimagetool-x86_64.AppImage - echo "$APPIMAGETOOL_X86_64_HASH appimagetool-x86_64.AppImage" | sha256sum -c - wget -nv https://github.com/$APPIMAGE_FORK/type2-runtime/releases/download/$APPIMAGE_RUNTIME_VERSION/runtime-x86_64 - echo "$APPIMAGE_RUNTIME_X86_64_HASH runtime-x86_64" | sha256sum -c - chmod a+rx appimagetool-x86_64.AppImage - ./appimagetool-x86_64.AppImage --appimage-extract - echo -e '#/bin/sh\n./squashfs-root/AppRun --runtime-file runtime-x86_64 "$@"' > appimagetool - chmod a+rx appimagetool - - name: Download run-time dependencies - run: | - wget -nv https://github.com/Ijwu/Enemizer/releases/download/$ENEMIZER_VERSION/ubuntu.16.04-x64.7z - 7za x -oEnemizerCLI/ ubuntu.16.04-x64.7z - - name: Build - run: | - # pygobject is an optional dependency for kivy that's not in requirements - # charset-normalizer was somehow incomplete in the github runner - "${{ env.PYTHON }}" -m venv venv - source venv/bin/activate - "${{ env.PYTHON }}" -m pip install --upgrade pip "PyGObject<3.51.0" charset-normalizer - python setup.py build_exe --yes bdist_appimage --yes - echo -e "setup.py build output:\n `ls build`" - echo -e "setup.py dist output:\n `ls dist`" - cd dist && export APPIMAGE_NAME="`ls *.AppImage`" && cd .. - export TAR_NAME="${APPIMAGE_NAME%.AppImage}.tar.gz" - (cd build && DIR_NAME="`ls | grep exe`" && mv "$DIR_NAME" Archipelago && tar -cv Archipelago | gzip -8 > ../dist/$TAR_NAME && mv Archipelago "$DIR_NAME") - echo "APPIMAGE_NAME=$APPIMAGE_NAME" >> $GITHUB_ENV - echo "TAR_NAME=$TAR_NAME" >> $GITHUB_ENV - # - code above copied from build.yml - - - name: Attest Build - uses: actions/attest-build-provenance@v2 - with: - subject-path: | - build/exe.*/ArchipelagoLauncher - build/exe.*/ArchipelagoGenerate - build/exe.*/ArchipelagoServer - dist/* - - name: Add to Release - uses: softprops/action-gh-release@975c1b265e11dd76618af1c374e7981f9a6ff44a - with: - draft: true # see above - prerelease: false - name: Archipelago ${{ env.RELEASE_VERSION }} - files: | - dist/* - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/scan-build.yml b/.github/workflows/scan-build.yml deleted file mode 100644 index ac842070625..00000000000 --- a/.github/workflows/scan-build.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Native Code Static Analysis - -on: - push: - paths: - - '**.c' - - '**.cc' - - '**.cpp' - - '**.cxx' - - '**.h' - - '**.hh' - - '**.hpp' - - '**.pyx' - - 'setup.py' - - 'requirements.txt' - - '.github/workflows/scan-build.yml' - pull_request: - paths: - - '**.c' - - '**.cc' - - '**.cpp' - - '**.cxx' - - '**.h' - - '**.hh' - - '**.hpp' - - '**.pyx' - - 'setup.py' - - 'requirements.txt' - - '.github/workflows/scan-build.yml' - -jobs: - scan-build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Install newer Clang - run: | - wget https://apt.llvm.org/llvm.sh - chmod +x ./llvm.sh - sudo ./llvm.sh 19 - - name: Install scan-build command - run: | - sudo apt install clang-tools-19 - - name: Get a recent python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - name: Install dependencies - run: | - python -m venv venv - source venv/bin/activate - python -m pip install --upgrade pip -r requirements.txt - - name: scan-build - run: | - source venv/bin/activate - scan-build-19 --status-bugs -o scan-build-reports -disable-checker deadcode.DeadStores python setup.py build -y - - name: Store report - if: failure() - uses: actions/upload-artifact@v4 - with: - name: scan-build-reports - path: scan-build-reports diff --git a/.github/workflows/strict-type-check.yml b/.github/workflows/strict-type-check.yml deleted file mode 100644 index 2ccdad8d11a..00000000000 --- a/.github/workflows/strict-type-check.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: type check - -on: - pull_request: - paths: - - "**.py" - - ".github/pyright-config.json" - - ".github/workflows/strict-type-check.yml" - - "**.pyi" - push: - paths: - - "**.py" - - ".github/pyright-config.json" - - ".github/workflows/strict-type-check.yml" - - "**.pyi" - -jobs: - pyright: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - - name: "Install dependencies" - run: | - python -m pip install --upgrade pip pyright==1.1.392.post0 - python ModuleUpdate.py --append "WebHostLib/requirements.txt" --force --yes - - - name: "pyright: strict check on specific files" - run: python .github/type_check.py diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml deleted file mode 100644 index b08b389005e..00000000000 --- a/.github/workflows/unittests.yml +++ /dev/null @@ -1,96 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: unittests - -on: - push: - paths: - - '**' - - '!docs/**' - - '!deploy/**' - - '!setup.py' - - '!Dockerfile' - - '!*.iss' - - '!.gitignore' - - '!.dockerignore' - - '!.github/workflows/**' - - '.github/workflows/unittests.yml' - pull_request: - paths: - - '**' - - '!docs/**' - - '!deploy/**' - - '!setup.py' - - '!Dockerfile' - - '!*.iss' - - '!.gitignore' - - '!.dockerignore' - - '!.github/workflows/**' - - '.github/workflows/unittests.yml' - -jobs: - unit: - runs-on: ${{ matrix.os }} - name: Test Python ${{ matrix.python.version }} ${{ matrix.os }} - - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - python: - - {version: '3.11.2'} # Change to '3.11' around 2026-06-10 - - {version: '3.12'} - - {version: '3.13'} - include: - - python: {version: '3.11'} # old compat - os: windows-latest - - python: {version: '3.13'} # current - os: windows-latest - - python: {version: '3.13'} # current - os: macos-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python.version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python.version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r ci-requirements.txt - python ModuleUpdate.py --yes --force --append "WebHostLib/requirements.txt" - python Launcher.py --update_settings # make sure host.yaml exists for tests - - name: Unittests - run: | - pytest -n auto - - hosting: - runs-on: ${{ matrix.os }} - name: Test hosting with ${{ matrix.python.version }} on ${{ matrix.os }} - - strategy: - matrix: - os: - - ubuntu-latest - python: - - {version: '3.13'} # current - - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python.version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python.version }} - - name: Install dependencies - run: | - python -m venv venv - source venv/bin/activate - python -m pip install --upgrade pip - python ModuleUpdate.py --yes --force --append "WebHostLib/requirements.txt" - - name: Test hosting - run: | - source venv/bin/activate - export PYTHONPATH=$(pwd) - timeout 600 python test/hosting/__main__.py diff --git a/README.md b/README.md index efa18bc1ef0..4512e6ad041 100644 --- a/README.md +++ b/README.md @@ -1,148 +1,85 @@ -# [Archipelago](https://archipelago.gg) ![Discord Shield](https://discordapp.com/api/guilds/731205301247803413/widget.png?style=shield) | [Install](https://github.com/ArchipelagoMW/Archipelago/releases) - -Archipelago provides a generic framework for developing multiworld capability for game randomizers. In all cases, -presently, Archipelago is also the randomizer itself. - -Currently, the following games are supported: - -* The Legend of Zelda: A Link to the Past -* Factorio -* Subnautica -* Risk of Rain 2 -* The Legend of Zelda: Ocarina of Time -* Timespinner -* Super Metroid -* Secret of Evermore -* Final Fantasy -* VVVVVV -* Raft -* Super Mario 64 -* Meritous -* Super Metroid/Link to the Past combo randomizer (SMZ3) -* ChecksFinder -* Hollow Knight -* The Witness -* Sonic Adventure 2: Battle -* Starcraft 2 -* Donkey Kong Country 3 -* Dark Souls 3 -* Super Mario World -* Pokémon Red and Blue -* Hylics 2 -* Overcooked! 2 -* Zillion -* Lufia II Ancient Cave -* Blasphemous -* Wargroove -* Stardew Valley -* The Legend of Zelda -* The Messenger -* Kingdom Hearts 2 -* The Legend of Zelda: Link's Awakening DX -* Adventure -* DLC Quest -* Noita -* Undertale -* Bumper Stickers -* Mega Man Battle Network 3: Blue Version -* Muse Dash -* DOOM 1993 -* Terraria -* Lingo -* Pokémon Emerald -* DOOM II -* Shivers -* Heretic -* Landstalker: The Treasures of King Nole -* Final Fantasy Mystic Quest -* TUNIC -* Kirby's Dream Land 3 -* Celeste 64 -* Castlevania 64 -* A Short Hike -* Yoshi's Island -* Mario & Luigi: Superstar Saga -* Bomb Rush Cyberfunk -* Aquaria -* Yu-Gi-Oh! Ultimate Masters: World Championship Tournament 2006 -* A Hat in Time -* Old School Runescape -* Kingdom Hearts 1 -* Mega Man 2 -* Yacht Dice -* Faxanadu -* Saving Princess -* Castlevania: Circle of the Moon -* Inscryption -* Civilization VI -* The Legend of Zelda: The Wind Waker -* Jak and Daxter: The Precursor Legacy -* Super Mario Land 2: 6 Golden Coins -* shapez -* Paint -* Celeste (Open World) -* Choo-Choo Charles -* APQuest -* Satisfactory -* EarthBound - -For setup and instructions check out our [tutorials page](https://archipelago.gg/tutorial/). -Downloads can be found at [Releases](https://github.com/ArchipelagoMW/Archipelago/releases), including compiled -windows binaries. - -## History - -Archipelago is built upon a strong legacy of brilliant hobbyists. We want to honor that legacy by showing it here. -The repositories which Archipelago is built upon, inspired by, or otherwise owes its gratitude to are: - -* [bonta0's MultiWorld](https://github.com/Bonta0/ALttPEntranceRandomizer/tree/multiworld_31) -* [AmazingAmpharos' Entrance Randomizer](https://github.com/AmazingAmpharos/ALttPEntranceRandomizer) -* [VT Web Randomizer](https://github.com/sporchia/alttp_vt_randomizer) -* [Dessyreqt's alttprandomizer](https://github.com/Dessyreqt/alttprandomizer) -* [Zarby89's](https://github.com/Ijwu/Enemizer/commits?author=Zarby89) - and [sosuke3's](https://github.com/Ijwu/Enemizer/commits?author=sosuke3) contributions to Enemizer, which make up the - vast majority of Enemizer contributions. - -We recognize that there is a strong community of incredibly smart people that have come before us and helped pave the -path. Just because one person's name may be in a repository title does not mean that only one person made that project -happen. We can't hope to perfectly cover every single contribution that lead up to Archipelago, but we hope to honor -them fairly. - -### Path to the Archipelago - -Archipelago was directly forked from bonta0's `multiworld_31` branch of ALttPEntranceRandomizer (this project has a -long legacy of its own, please check it out linked above) on January 12, 2020. The repository was then named to -_MultiWorld-Utilities_ to better encompass its intended function. As Archipelago matured, then known as -"Berserker's MultiWorld" by some, we found it necessary to transform our repository into a root level repository -(as opposed to a 'forked repo') and change the name (which came later) to better reflect our project. - -## Running Archipelago - -For most people, all you need to do is head over to -the [releases page](https://github.com/ArchipelagoMW/Archipelago/releases), then download and run the appropriate -installer, or AppImage for Linux-based systems. - -If you are a developer or are running on a platform with no compiled releases available, please see our doc on -[running Archipelago from source](docs/running%20from%20source.md). - -## Related Repositories - -This project makes use of multiple other projects. We wouldn't be here without these other repositories and the -contributions of their developers, past and present. - -* [z3randomizer](https://github.com/ArchipelagoMW/z3randomizer) -* [Enemizer](https://github.com/Ijwu/Enemizer) -* [Ocarina of Time Randomizer](https://github.com/TestRunnerSRL/OoT-Randomizer) - -## Contributing - -To contribute to Archipelago, including the WebHost, core program, or by adding a new game, see our -[Contributing guidelines](/docs/contributing.md). - -## FAQ - -For Frequently asked questions, please see the website's [FAQ Page](https://archipelago.gg/faq/en/). - -## Code of Conduct - -Please refer to our [code of conduct](/docs/code_of_conduct.md). +> [!WARNING] +> Right now this mod is still in a very early stage, so do keep in mind that this mod could generate a Randomized Game that is unbeatable! + + +# [Archipelago](https://archipelago.gg/) Randomizer for Minecraft + +This mod is inspired by [Minecraft_AP_Randomizer](https://github.com/jacobmix/Minecraft_AP_Randomizer), but is written in Fabric instead of Forge. It also has additional features such as easier setup, and the ability to play in singleplayer mode. + +This repo contains the .apworld file to install in the Archipelago launcher. The Fabric mod is [located here](https://github.com/Deadlydiamond98/MinecraftFabricArchipelagoMod). + +## Items + +Item recipes, and some mechanics (like jumping, swimming, and running) are locked behind items found by you/other players. Filler items are also included such as experience drops, arrows, planks, and food. + + +## Locations (sending items) + +Locations in this randomizer are represented by various Minecraft achievements. + +## Setting it Up + +1. Follow the [Archipelago Setup Guide](https://archipelago.gg/tutorial/Archipelago/setup_en) to install the launcher +2. Download the latest [AP World](https://github.com/Deadlydiamond98/MinecraftFabricAPWorld/releases) for this mod +3. Use the Options Creator in Archipelago launcher to generate your YAML config +3. Once you've gathered all the YAML configs, and started the server, you can open up your game (with this mod installed of course). The next instructions will differ slightly depending on if you want to play singleplayer or multiplayer + +### Singleplayer + +1. Install [Prism Launcher](https://prismlauncher.org/) (or your preferred MC launcher if you haven't already) +2. Create a new `1.20.1` instance running Fabric `0.18.4` +3. Install the [Archipelago Mod](https://modrinth.com/mod/archipelago-mod) for Minecraft +4. Create a new single player world, filling in Archipelago server address, port, and password (if needed) + +![Screenshot of World Creation showing new Fields for inputting the Server, Slot, and Password](screenshots/singleplayer_setup.png) + +In the event that an incorrect AP Server, Slot Name, or Password is entered, or the Displays a popup that it failed to connect to an Archipelago Server, you can either generate a new world, or you can follow the instructions for Multiplayer. + +### Multiplayer + +The instructions for playing on a Multiplayer World are the same up until you join the world. Once you're in the world, you can run the command /connect or /archipelago connect, and fill in the necessary information. + +![Screenshot of World Creation showing new Fields for inputting the Server, Slot, and Password +](screenshots/multiplayer_setup.png) + + +If a World was already generated in Single Player before being put on the server, the Server should connect automatically when the world starts. + + +#### Docker Compose Server Example + +```yaml +services: + mc-archipelago: + image: itzg/minecraft-server:latest + tty: true + stdin_open: true + ports: + - "25565:25565" + environment: + EULA: "TRUE" + TYPE: "FABRIC" + VERSION: "1.20.1" + MODRINTH_PROJECTS: |- + archipelago-mod + MODRINTH_DOWNLOAD_DEPENDENCIES: "required" + volumes: + - "./data:/data" +``` + +## Does this support other Mods? + +Currently this mod doesn't impact other mods, and only randomizes thing within the Vanilla Game, however, Mod Support is a planned feature, and will be coming very soon! + +Once Mod Support is added, Information regarding that will be added here. + +## Will this be ported to Forge? + +No, there are no plans to port this to Forge. However, Sinytra Connector can allow Fabric Mods to be run on Forge. + +> [!WARNING] +> Currently there is a crash when trying to run this with Sinytra Connector, but this will be fixed in the very near future. + +## Will this be ported to Newer Versions? + +There are no plans to do that at the current moment. I wouldn't be against doing so, but it isn't likely to happen for a long time. diff --git a/screenshots/multiplayer_setup.png b/screenshots/multiplayer_setup.png new file mode 100644 index 00000000000..02225514a85 Binary files /dev/null and b/screenshots/multiplayer_setup.png differ diff --git a/screenshots/singleplayer_setup.png b/screenshots/singleplayer_setup.png new file mode 100644 index 00000000000..dad4c2fafd2 Binary files /dev/null and b/screenshots/singleplayer_setup.png differ