switch to dtk setup (#2203)

* switch to dtk setup

* some cleanup / fixes

* cleanup d_a_alink literals

* Restore doxygen, update CI & README.md (#1)

* Fix build image ref (#2)

---------

Co-authored-by: Luke Street <luke@street.dev>
This commit is contained in:
TakaRikka
2024-10-10 07:29:58 -07:00
committed by GitHub
parent 3769ea47a6
commit 178194ccb2
33438 changed files with 370506 additions and 3055930 deletions
+65
View File
@@ -0,0 +1,65 @@
name: Build
on:
push:
pull_request:
jobs:
build:
container: ghcr.io/zeldaret/tp-build:main
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [GZ2E01]
steps:
# Checkout the repository (shallow clone)
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
# Set Git config
- name: Git config
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
# Copy the original files to the workspace
- name: Prepare
run: cp -R /orig .
# Build the project
- name: Build
run: |
python configure.py --map --version ${{ matrix.version }} \
--binutils /binutils --compilers /compilers
ninja all_source build/${{ matrix.version }}/progress.json \
build/${{ matrix.version }}/report.json
# Upload progress if we're on the main branch
- name: Upload progress
if: github.ref == 'refs/heads/main'
continue-on-error: true
env:
PROGRESS_SLUG: twilightprincess
PROGRESS_API_KEY: ${{ secrets.PROGRESS_API_KEY }}
run: |
python tools/upload_progress.py -b https://progress.decomp.club/ \
-p $PROGRESS_SLUG -v ${{ matrix.version }} \
build/${{ matrix.version }}/progress.json
# Upload map files
- name: Upload map
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.version }}_maps
path: build/${{ matrix.version }}/**/*.MAP
# Upload progress report
- name: Upload report
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.version }}_report
path: build/${{ matrix.version }}/report.json
-83
View File
@@ -1,83 +0,0 @@
name: OK Check / Progress Push
on:
pull_request:
branches:
- main
push:
branches:
- main
env:
GITHUB_ORG: "zeldaret"
GITHUB_REPO: "tp"
STATE_FILE: "tools/pjstate.yml"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Project Setup
run: |
# Install deps & setup
python3 -m pip install --user -r tools/requirements.txt
./tp setup --skip-iso
# Download WiBo
wget https://github.com/decompals/wibo/releases/download/0.4.2/wibo
chmod +x wibo
- name: Run Make (OK)
run: make all rels -j$(nproc) WINE=./wibo
- name: Create JSON for Progress & Upload
if: github.event_name != 'pull_request'
env:
PROGRESS_API_KEY: ${{ secrets.FROGRESS_API_KEY }}
run: |
./tp progress -f JSON > progress-${{ github.run_id }}.json
./tp upload-progress progress-${{ github.run_id }}.json -b https://progress.deco.mp/ -p twilightprincess -v gcn_usa
- name: Get changed .c, .cpp, .inc files
if: github.event_name != 'pull_request'
id: changed-files-specific
uses: tj-actions/changed-files@v36
with:
files: |
**/*.{c,cpp,inc}
- name: Update Issue(s)
if: github.event_name != 'pull_request' && steps.changed-files-specific.outputs.any_changed == 'true'
run: |
# Install libclang-16-dev for FunctionChecker
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main"
sudo apt update
sudo apt install -y libclang-16-dev
FILENAMES="${{ steps.changed-files-specific.outputs.all_changed_files }}"
CMD=(./tp github-update-issues --personal-access-token ${{ secrets.PAT_TOKEN }} --debug --owner ${{ env.GITHUB_ORG }} --repo ${{ env.GITHUB_REPO }} --state-file ${{ env.STATE_FILE }})
IFS=' ' read -ra FILE_ARRAY <<< "$FILENAMES"
INC_FOUND=false
# Remove any .inc files from the array
for index in "${!FILE_ARRAY[@]}"; do
if [[ "${FILE_ARRAY[index]}" == *.inc ]]; then
unset 'FILE_ARRAY[index]'
INC_FOUND=true
fi
done
# If any .inc files were found,
# We will add "src/d/a/d_a_alink.cpp" to the array once
# if it's not already there
if $INC_FOUND && ! [[ " ${FILE_ARRAY[@]} " =~ " src/d/a/d_a_alink.cpp " ]]; then
FILE_ARRAY+=("src/d/a/d_a_alink.cpp")
fi
for FILE in "${FILE_ARRAY[@]}"; do
AUTHOR=$(git log -1 --pretty=format:'%an' -- $FILE)
CMD+=(--filename $FILE --author '$AUTHOR')
done
# Update the status and assignees for every issue identified
# ${CMD[@]}