WIP dreamcast build using github actions

This commit is contained in:
UnknownShadow200 2023-09-23 19:19:57 +10:00
parent 52f3acc285
commit 2c2f5d14fb
7 changed files with 53 additions and 49 deletions

32
.github/workflows/build_dreamcast.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Build latest (Dreamcast)
on: [push]
concurrency:
group: ${{ github.ref }}-dreamcast
cancel-in-progress: true
jobs:
build:
if: github.ref_name == github.event.repository.default_branch
runs-on: ubuntu-latest
container:
image: kazade/dreamcast-sdk
steps:
- uses: actions/checkout@v3
- name: Compile Dreamcast build
id: compile
run: |
source /opt/toolchains/dc/kos/environ.sh
make dreamcast
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile Dreamcast build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }}
with:
SOURCE_FILE: 'ClassiCube-dc.cdi'
DEST_NAME: 'ClassiCube-dc.cdi'

View File

@ -35,7 +35,7 @@ jobs:
- uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }}
with:
SOURCE_FILE: 'ClassiCube.xbe'
SOURCE_FILE: 'bin/default.xbe'
DEST_NAME: 'ClassiCube-xbox.xbe'
- uses: ./.github/actions/upload_build

View File

@ -148,7 +148,7 @@ psp:
vita:
$(MAKE) -f misc/vita/Makefile PLAT=vita
ps3:
$(MAKE) -f src/Makefile_PS3 PLAT=ps3
$(MAKE) -f misc/ps3/Makefile PLAT=ps3
3ds:
$(MAKE) -f misc/3ds/Makefile PLAT=3ds
wii:
@ -156,9 +156,9 @@ wii:
gamecube:
$(MAKE) -f misc/gc/Makefile PLAT=gamecube
dreamcast:
$(MAKE) -f src/Makefile_dreamcast PLAT=dreamcast
$(MAKE) -f misc/dreamcast/Makefile PLAT=dreamcast
xbox:
$(MAKE) -f src/Makefile_xbox PLAT=xbox
$(MAKE) -f misc/xbox/Makefile PLAT=xbox
xbox360:
$(MAKE) -f src/Makefile_xbox360 PLAT=xbox360

16
misc/dreamcast/Makefile Normal file
View File

@ -0,0 +1,16 @@
BUILD_DIR := build-dreamcast
SOURCE_DIRS := src third_party/bearssl/src
C_FILES := $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.c))
OBJS := $(notdir $(C_FILES:%.c=%.o))
TARGET := ClassiCube-dc.elf
ifeq ($(strip $(KOS_BASE)),)
$(error "Please set KOS variables in your environment.")
endif
include $(KOS_BASE)/Makefile.rules
$(TARGET): $(OBJS)
kos-cc -o $(TARGET) $(OBJS)

View File

@ -100,7 +100,7 @@ export OUTPUT := $(CURDIR)/$(TARGET)
#---------------------------------------------------------------------------------
$(BUILD):
@[ -d $@ ] || mkdir -p $@
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/src/Makefile_PS3
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/misc/ps3/Makefile
#---------------------------------------------------------------------------------
clean:

View File

@ -1,44 +0,0 @@
PROJECT_TITLE := ClassiCube
PROJECT_TITLEID := CUBE00200
TARGET := ClassiCube-vita
BUILD_DIR := build-vita
SOURCE_DIR := src
CFLAGS += -Wl,-q -I../common
C_FILES := $(wildcard $(SOURCE_DIR)/*.c)
OBJS := $(addprefix $(BUILD_DIR)/, $(C_FILES:$(SOURCE_DIR)/%.c=%.o))
# Needed by psvDebugScreenPrintf
LIBS += -lm -lSceDisplay_stub -lSceCtrl_stub -lSceTouch_stub -lSceGxm_stub
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
default: $(BUILD_DIR) $(TARGET).vpk
$(BUILD_DIR):
mkdir -p $(BUILD_DIR)
$(TARGET).vpk: eboot.bin param.sfo
vita-pack-vpk -s param.sfo -b eboot.bin $(TARGET).vpk
eboot.bin: $(TARGET).velf
vita-make-fself $(TARGET).velf eboot.bin
param.sfo:
vita-mksfoex -s TITLE_ID="$(PROJECT_TITLEID)" "$(PROJECT_TITLE)" param.sfo
$(TARGET).velf: $(TARGET).elf
arm-vita-eabi-strip -g $<
vita-elf-create $< $@
$(TARGET).elf: $(OBJS)
arm-vita-eabi-gcc $(CFLAGS) $^ $(LIBS) -o $@
$(BUILD_DIR)/%.o : src/%.c
arm-vita-eabi-gcc -c $(CFLAGS) -o $@ $<
clean:
rm $(TARGET).velf $(TARGET).elf $(TARGET).vpk param.sfo eboot.bin $(OBJS)