mirror of https://github.com/zeldaret/tp.git
Pipeline fix (#373)
* cleanup pipelines * install deps * chmod +x wibo * rename pipeline * condense steps
This commit is contained in:
parent
ae83c59703
commit
8a579ec161
|
@ -1,38 +0,0 @@
|
||||||
name: CD
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
env:
|
|
||||||
WORKFLOW: "ci.yml"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
download:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Get latest workflow run ID
|
|
||||||
id: get_run_id
|
|
||||||
run: |
|
|
||||||
RUN_ID=$(curl --request GET \
|
|
||||||
--url https://api.github.com/repos/${{ github.repository }}/actions/workflows/${{ env.WORKFLOW }}/runs \
|
|
||||||
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
|
|
||||||
--header 'content-type: application/json' | jq '.workflow_runs[0].id')
|
|
||||||
echo "run_id=$RUN_ID" >> $GITHUB_OUTPUT
|
|
||||||
- name: Download artifact
|
|
||||||
uses: dawidd6/action-download-artifact@v2.27.0
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run_id: ${{ steps.get_run_id.outputs.run_id }}
|
|
||||||
name: artifact-${{ steps.get_run_id.outputs.run_id }}
|
|
||||||
workflow: ${{ env.WORKFLOW }}
|
|
||||||
- name: Install Python Deps
|
|
||||||
run: |
|
|
||||||
pip install GitPython rich
|
|
||||||
- name: Upload Progress to Frogress
|
|
||||||
env:
|
|
||||||
PROGRESS_API_KEY: ${{ secrets.FROGRESS_API_KEY }}
|
|
||||||
run: ./tp upload-progress progress-${{ steps.get_run_id.outputs.run_id }}.json -b https://progress.deco.mp/ -p twilightprincess -v gcn_usa
|
|
|
@ -1,27 +0,0 @@
|
||||||
name: CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: ghcr.io/pheenoh/zeldaret-tp:latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Copy in dol and compilers
|
|
||||||
run: cp /tmp/baserom.dol ./baserom.dol && cp -r /tmp/mwcc_compiler/ tools/mwcc_compiler && cp tools/mwcc_compiler/2.7/mwcceppc.exe tools/mwcc_compiler/2.7/mwcceppc_modded.exe && chown root /github/home/
|
|
||||||
- name: Run Make (OK)
|
|
||||||
run: make all rels && ./tp check --rels
|
|
||||||
- name: Create JSON for Progress
|
|
||||||
run: ./tp progress -f JSON > progress-${{ github.run_id }}.json
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: artifact-${{ github.run_id }}
|
|
||||||
path: ./progress-${{ github.run_id }}.json
|
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
name: OK Check / Progress Push
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
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
|
1
Makefile
1
Makefile
|
@ -163,6 +163,7 @@ rels: $(ELF) $(RELS)
|
||||||
@echo generating RELs from .plf
|
@echo generating RELs from .plf
|
||||||
@echo $(RELS) > build/plf_files
|
@echo $(RELS) > build/plf_files
|
||||||
$(PYTHON) $(MAKEREL) build --string-table $(BUILD_DIR)/frameworkF.str @build/plf_files $(ELF)
|
$(PYTHON) $(MAKEREL) build --string-table $(BUILD_DIR)/frameworkF.str @build/plf_files $(ELF)
|
||||||
|
./tp check --rels
|
||||||
|
|
||||||
$(ELF): $(LIBS) $(O_FILES)
|
$(ELF): $(LIBS) $(O_FILES)
|
||||||
@echo $(O_FILES) > build/o_files
|
@echo $(O_FILES) > build/o_files
|
||||||
|
|
|
@ -140,7 +140,8 @@ def expected_copy(debug: bool, build_path: Path, expected_path: Path):
|
||||||
required=False,
|
required=False,
|
||||||
)
|
)
|
||||||
@click.option("--force-download/--no-force-download")
|
@click.option("--force-download/--no-force-download")
|
||||||
def setup(debug: bool, game_path: Path, tools_path: Path, yaz0_encoder: str, force_download: bool):
|
@click.option("--skip-iso/--no-skip-iso", default=False)
|
||||||
|
def setup(debug: bool, game_path: Path, tools_path: Path, yaz0_encoder: str, force_download: bool, skip_iso: bool):
|
||||||
"""Setup project"""
|
"""Setup project"""
|
||||||
|
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -319,7 +320,7 @@ def setup(debug: bool, game_path: Path, tools_path: Path, yaz0_encoder: str, for
|
||||||
LOG.error("An error occurred while running 'make tools'")
|
LOG.error("An error occurred while running 'make tools'")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
#
|
if skip_iso is False:
|
||||||
text = Text("--- Extracting game assets")
|
text = Text("--- Extracting game assets")
|
||||||
text.stylize("bold magenta")
|
text.stylize("bold magenta")
|
||||||
CONSOLE.print(text)
|
CONSOLE.print(text)
|
||||||
|
|
Loading…
Reference in New Issue