Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace progress site with decomp.dev #1468

Merged
merged 3 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
# Super Smash Bros Melee
[![Code Progress](https://img.shields.io/endpoint?label=Code&url=https%3A%2F%2Fprogress.decomp.club%2Fdata%2Fmelee%2FGALE01%2Fdol%2F%3Fmode%3Dshield%26measure%3Dcode)](https://doldecomp.github.io/melee/progress/)
[![Data Progress](https://img.shields.io/endpoint?label=Data&url=https%3A%2F%2Fprogress.decomp.club%2Fdata%2Fmelee%2FGALE01%2Fdol%2F%3Fmode%3Dshield%26measure%3Ddata)](https://doldecomp.github.io/melee/progress/)
[![GC/Wii Decompilation](https://discordapp.com/api/guilds/727908905392275526/widget.png?style=shield)](https://discord.gg/hKx3FJJgrV)
[![build](https://github.com/doldecomp/melee/actions/workflows/build.yml/badge.svg)](https://github.com/doldecomp/melee/actions/workflows/build.yml)
[![publish-packages](https://github.com/doldecomp/melee/actions/workflows/publish-packages.yml/badge.svg)](https://github.com/doldecomp/melee/actions/workflows/publish-packages.yml)
Super Smash Bros Melee \
[![Build Status]][actions]
[![Code Progress]][progress]
[![Data Progress]][progress]
[![Linked Progress]][progress]
[![Discord Badge]][discord]
=============

[Build Status]: https://github.com/doldecomp/melee/actions/workflows/build.yml/badge.svg
[actions]: https://github.com/doldecomp/melee/actions/workflows/build.yml
[Code Progress]: https://decomp.dev/doldecomp/melee.svg?mode=shield&measure=code&label=Code&category=all
[Data Progress]: https://decomp.dev/doldecomp/melee.svg?mode=shield&measure=data&label=Data&category=all
[Linked Progress]: https://decomp.dev/doldecomp/melee.svg?mode=shield&measure=complete_code&label=Linked%20Code&category=all
[Discord Badge]: https://img.shields.io/discord/933849697485983765?color=%237289DA&logo=discord&logoColor=%23FFFFFF
[discord]: https://discord.gg/CWKqYMePX8
[progress]: https://decomp.dev/doldecomp/melee

This repo contains a WIP decompilation of Super Smash Bros Melee (US).

Expand Down
9 changes: 4 additions & 5 deletions .github/packages/build-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,21 @@ ENV PATH="$DEVKITPPC/bin:$PATH"
COPY .github/packages/build-linux/melee-mwcc /usr/local/bin

FROM linux-base AS linux-rw
VOLUME [ "/input", "/output" ]
VOLUME ["/input", "/output"]

FROM linux-rw AS build-linux
COPY .github/packages/build-linux/setup.sh /usr/local/bin
RUN setup.sh
ENV MAKE_FLAGS="GENERATE_MAP=1"
COPY .github/packages/build-linux/entrypoint.sh /usr/local/bin
ENTRYPOINT entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]

FROM linux-rw AS gen-pages
COPY .github/packages/gen-pages/setup.sh /usr/local/bin
COPY tools/progress-site/package*.json /tmp
COPY /reqs/gen-pages.txt /tmp/reqs/
RUN setup.sh
COPY .github/packages/gen-pages/entrypoint.sh /usr/local/bin
ENTRYPOINT entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]

# TODO
FROM rust:latest AS check-issues
Expand All @@ -44,4 +43,4 @@ RUN setup.sh
RUN rm -rf /input
VOLUME [ "/input" ]
COPY .github/packages/check-issues/entrypoint.sh /usr/local/bin
ENTRYPOINT entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
36 changes: 3 additions & 33 deletions .github/packages/gen-pages/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,6 @@ melee-mwcc build/ctx.c -v -o build/ctx.o
cp build/ctx.html /output/

# Progress site
cd /tmp/input/tools/progress-site

src='/opt/assets/progress'
static='static/extern'
lib='src/lib/extern'

# assets
for file in "$src"/*; do
if [[ $(basename "$file") == 'favicon.png' ]]; then
dst="$static"
else
dst="$lib"
fi
cp "$file" "$dst"
done

# progress
# BUG race condition between `build-melee` and `gen-pages`.
progress_url='https://progress.decomp.club/data/melee/GALE01?format=json&mode=all'
curl -s -L "$progress_url" -o "$lib/progress.json"

# install
cp -R /opt/node_modules .
export npm_config_cache='npm-cache'
npm install \
--no-audit \
--no-progress \
--prefer-offline

# build
npm run build
find build -type f -name '.gitkeep' -delete
mv build /output/progress

mkdir /output/progress
cp tools/progress-redirect.html /output/progress/index.html
31 changes: 3 additions & 28 deletions .github/packages/gen-pages/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,15 @@ set -euox pipefail

apt update

function install {
apt install -y --no-install-recommends "${@}"
}

install curl ca-certificates

curl -L https://deb.nodesource.com/setup_20.x | bash -

install \
apt install -y --no-install-recommends \
ca-certificates \
curl \
doxygen \
git \
libarchive-tools \
nodejs \
python-is-python3 \
python3-full

# Acquire external assets
git clone --no-checkout --depth=1 \
'https://github.com/doldecomp/assets.git' \
/tmp/assets
pushd /tmp/assets
git sparse-checkout init --cone
git sparse-checkout set melee
git checkout
mv melee /opt/assets
popd

# Install progress site node modules
pushd /tmp
npm install --no-audit --no-progress
mv node_modules /opt
popd

# Create and update Python venv
python -m venv --upgrade-deps /opt/venv
. /opt/venv/bin/activate
Expand All @@ -52,6 +28,5 @@ apt remove -y \
libarchive-tools
apt autoremove -y
apt clean
npm cache clean --force
rm -rf /var/lib/apt/lists/*
rm -rf /tmp/*
5 changes: 5 additions & 0 deletions tools/progress-redirect.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Redirecting to https://decomp.dev/doldecomp/melee</title>
<meta http-equiv="refresh" content="0; URL=https://decomp.dev/doldecomp/melee">
<link rel="canonical" href="https://decomp.dev/doldecomp/melee">
13 changes: 0 additions & 13 deletions tools/progress-site/.eslintignore

This file was deleted.

31 changes: 0 additions & 31 deletions tools/progress-site/.eslintrc.cjs

This file was deleted.

13 changes: 0 additions & 13 deletions tools/progress-site/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion tools/progress-site/.npmrc

This file was deleted.

4 changes: 0 additions & 4 deletions tools/progress-site/.prettierignore

This file was deleted.

8 changes: 0 additions & 8 deletions tools/progress-site/.prettierrc

This file was deleted.

Loading
Loading