Skip to content

Commit

Permalink
CI: Generate objdiff progress reports and upload as artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
LagoLunatic committed Jul 17, 2024
1 parent 0fd5905 commit be019d1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Prepare
run: cp -R /orig/${{matrix.version}} orig
- name: Download objdiff CLI
if: github.ref == 'refs/heads/main'
run: |
python tools/download_tool.py --tag v2.0.0-alpha.5 objdiff-cli objdiff-cli
- name: Build
run: |
python configure.py --version ${{matrix.version}} --compilers /compilers --warn error
Expand All @@ -33,3 +37,13 @@ jobs:
run: |
python tools/upload_progress.py -b https://progress.decomp.club/ -p tww -v ${{matrix.version}} \
build/${{matrix.version}}/progress.json
- name: Generate objdiff progress report
if: github.ref == 'refs/heads/main'
run: |
./objdiff-cli report generate -o report.json
- name: Save objdiff progress report artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.version }}-report-${{ github.sha }}
path: report.json
17 changes: 17 additions & 0 deletions tools/download_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,29 @@ def wibo_url(tag: str) -> str:
return f"{repo}/releases/download/{tag}/wibo"


def objdiffcli_url(tag: str) -> str:
uname = platform.uname()
suffix = ""
system = uname.system.lower()
if system == "darwin":
system = "macos"
elif system == "windows":
suffix = ".exe"
arch = uname.machine.lower()
if arch == "amd64":
arch = "x86_64"

repo = "https://github.com/encounter/objdiff"
return f"{repo}/releases/download/{tag}/objdiff-cli-{system}-{arch}{suffix}"


TOOLS: Dict[str, Callable[[str], str]] = {
"binutils": binutils_url,
"compilers": compilers_url,
"dtk": dtk_url,
"sjiswrap": sjiswrap_url,
"wibo": wibo_url,
"objdiff-cli": objdiffcli_url,
}


Expand Down

0 comments on commit be019d1

Please sign in to comment.