Refactor make files and change artifact output (#949)

This changes the following:
- Uploads a separate Wii and Gamecube artifact
- Excludes uploading the elf files
- Creates the complete Wii structure under executables/Snes9xGX
- Creates the complete GameCube structure under executables/Snes9xGX-GameCube
- Doesn't upload empty folders like the snes9xgx folder with cheats, roms and saves but it is created in a local environment
This commit is contained in:
bladeoner 2020-10-25 17:19:32 +01:00 committed by GitHub
parent d4397bf6a5
commit d1dd578f47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 10 deletions

View File

@ -16,9 +16,26 @@ jobs:
- name: Build - name: Build
run: | run: |
make -j2 make -j2
- name: Copy files
run: |
cp -f hbc/* executables/Snes9xGX/apps/snes9xgx/
cp -f hbc/* executables/Snes9xGX-GameCube/
cp -f README.md executables/Snes9xGX/apps/snes9xgx/
cp -f README.md executables/Snes9xGX-GameCube/
- name: Upload a Build Artifact - name: Upload Wii Build Artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: executables name: Snes9xGX-Nightly
path: executables/* path: |
executables/Snes9xGX/
!executables/Snes9xGX/apps/snes9xgx/*.elf
- name: Upload GameCube Build Artifacts
uses: actions/upload-artifact@v2
with:
name: Snes9xGX-Nightly-GameCube
path: |
executables/Snes9xGX-GameCube/
!executables/Snes9xGX-GameCube/*.elf

View File

@ -11,12 +11,13 @@ include $(DEVKITPPC)/gamecube_rules
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# TARGET is the name of the output # TARGET is the name of the output
# TARGETDIR is the directory where the output files will be placed
# BUILD is the directory where object files & intermediate files will be placed # BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code # SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files # INCLUDES is a list of directories containing extra header files
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
TARGET := snes9xgx-gc TARGET := boot
TARGETDIR := executables TARGETDIR := executables/Snes9xGX-GameCube
BUILD := build_gc BUILD := build_gc
SOURCES := source source/gui source/utils source/utils/sz source/utils/vm \ SOURCES := source source/gui source/utils source/utils/sz source/utils/vm \
source/snes9x source/snes9x/apu source/snes9x source/snes9x/apu
@ -116,7 +117,7 @@ $(BUILD):
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
clean: clean:
@echo clean ... @echo clean ...
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol @rm -fr $(BUILD) $(TARGETDIR)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
run: run:

View File

@ -11,12 +11,17 @@ include $(DEVKITPPC)/wii_rules
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# TARGET is the name of the output # TARGET is the name of the output
# TARGETDIR is the directory where the output files will be placed
# SUBDIR are the directories where the cheats, roms and saves need to be placed
# ROOTDIR is the root directory of the build
# BUILD is the directory where object files & intermediate files will be placed # BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code # SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files # INCLUDES is a list of directories containing extra header files
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
TARGET := snes9xgx-wii TARGET := boot
TARGETDIR := executables TARGETDIR := executables/Snes9xGX/apps/snes9xgx
ROOTDIR := executables/Snes9xGX
SUBDIR := executables/Snes9xGX/snes9xgx/{cheats,roms,saves}
BUILD := build_wii BUILD := build_wii
SOURCES := source source/gui source/utils source/utils/sz \ SOURCES := source source/gui source/utils source/utils/sz \
source/snes9x source/snes9x/apu source/snes9x source/snes9x/apu
@ -110,13 +115,13 @@ export OUTPUT := $(CURDIR)/$(TARGETDIR)/$(TARGET)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
$(BUILD): $(BUILD):
@[ -d $@ ] || mkdir -p $@ @[ -d $@ ] || mkdir -p $@
@[ -d $(TARGETDIR) ] || mkdir -p $(TARGETDIR) @[ -d $(TARGETDIR) ] || mkdir -p $(TARGETDIR) $(SUBDIR)
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.wii @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.wii
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
clean: clean:
@echo clean ... @echo clean ...
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol @rm -fr $(BUILD) $(ROOTDIR)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
run: run: