mirror of
https://github.com/zeldaret/mm.git
synced 2026-08-24 07:00:37 -04:00
b9861edd77
* Migrate CI to Github Actions (#1884) Changes the CI system from Jenkins to Github Actions (GHA) like we did for OoT This is an adaptation of the Jenkinsfile we have and the solution made by @Dragorn421 for OoT Relevant OoT PRs: - https://github.com/zeldaret/oot/pull/2740 - https://github.com/zeldaret/oot/pull/2742 - https://github.com/zeldaret/oot/pull/2754 New features include: - Not needing to selfhost a runner - Required private stuff for building is hosted on a private repo - Building multiple versions in parallel - Our old jenkinsfile wasn't building `n64-jp-1.1`. Even if it doesn't match right now, I think it is important checking a PR doesn't completely break it. - Run bss fixer in CI - Upload mapfiles as build artifacts This specific approach to handle GHA for decomp projects was adapted from the one used by the GC/Wii community. It is documented here https://github.com/encounter/dtk-template/blob/main/docs/github_actions.md There's a writeup about this adaptation for N64 projects [here](https://github.com/AngheloAlf/drmario64/pull/19). * Remove duplicated step id * Wire up compiler_archives machinery * Remove extra quote * Select bash as the default shell * Fix asset extraction for WIP versions * Properly fix the assets step this time * fix assets building for jp * Prevent running CI on forks Incorporates the changes from https://github.com/zeldaret/oot/pull/2788 * Incorporate fix_bss tiebreaking algorithm from https://github.com/zeldaret/oot/pull/2779
61 lines
1.5 KiB
Makefile
61 lines
1.5 KiB
Makefile
CC := gcc
|
|
CFLAGS := -Wall -Wextra -pedantic -std=c99 -g -O2
|
|
PROGRAMS := vtxdis
|
|
|
|
UNAME_S := $(shell uname -s)
|
|
ifeq ($(UNAME_S),Linux)
|
|
DETECTED_OS=linux
|
|
else ifeq ($(UNAME_S),Darwin)
|
|
DETECTED_OS=macos
|
|
else
|
|
$(error Unsupported OS: $(UNAME_S))
|
|
endif
|
|
|
|
IDO_RECOMP_VERSION := v1.2
|
|
IDO_RECOMP_5_3_DIR := ido_recomp/$(DETECTED_OS)/5.3
|
|
IDO_RECOMP_7_1_DIR := ido_recomp/$(DETECTED_OS)/7.1
|
|
|
|
all: $(PROGRAMS) $(IDO_RECOMP_5_3_DIR) $(IDO_RECOMP_7_1_DIR)
|
|
$(MAKE) -C ZAPD
|
|
$(MAKE) -C fado
|
|
$(MAKE) -C buildtools
|
|
$(MAKE) -C audio
|
|
|
|
clean:
|
|
$(RM) $(PROGRAMS)
|
|
$(RM) -r ido_recomp
|
|
$(MAKE) -C ZAPD clean
|
|
$(MAKE) -C fado clean
|
|
$(MAKE) -C buildtools clean
|
|
$(MAKE) -C audio clean
|
|
|
|
distclean: clean
|
|
$(MAKE) -C audio distclean
|
|
|
|
.PHONY: all clean distclean
|
|
|
|
vtxdis_SOURCES := vtxdis.c
|
|
|
|
define COMPILE =
|
|
$(1): $($1_SOURCES)
|
|
$(CC) $(CFLAGS) $$^ -o $$@
|
|
endef
|
|
|
|
$(foreach p,$(PROGRAMS),$(eval $(call COMPILE,$(p))))
|
|
|
|
compiler_archives/archives/ido-5.3-recomp-$(DETECTED_OS).tar.gz:
|
|
mkdir -p $(@D)
|
|
curl -sL https://github.com/decompals/ido-static-recomp/releases/download/$(IDO_RECOMP_VERSION)/ido-5.3-recomp-$(DETECTED_OS).tar.gz -o $@
|
|
|
|
$(IDO_RECOMP_5_3_DIR): compiler_archives/archives/ido-5.3-recomp-$(DETECTED_OS).tar.gz
|
|
mkdir -p $@
|
|
tar xzf $< -C $@
|
|
|
|
compiler_archives/archives/ido-7.1-recomp-$(DETECTED_OS).tar.gz:
|
|
mkdir -p $(@D)
|
|
curl -sL https://github.com/decompals/ido-static-recomp/releases/download/$(IDO_RECOMP_VERSION)/ido-7.1-recomp-$(DETECTED_OS).tar.gz -o $@
|
|
|
|
$(IDO_RECOMP_7_1_DIR): compiler_archives/archives/ido-7.1-recomp-$(DETECTED_OS).tar.gz
|
|
mkdir -p $@
|
|
tar xzf $< -C $@
|