From bebe80365847c92c7a429f4f8de9b9d3dc944c65 Mon Sep 17 00:00:00 2001 From: LibretroAdmin Date: Fri, 5 Aug 2022 21:52:57 +0200 Subject: [PATCH] Add DOS/DJGPP workflow --- .github/workflows/DOS-DJGPP.yml | 35 +++++++++++++++++++++++++++++++++ Makefile.dos | 11 ++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/DOS-DJGPP.yml diff --git a/.github/workflows/DOS-DJGPP.yml b/.github/workflows/DOS-DJGPP.yml new file mode 100644 index 0000000000..5e4f21a96a --- /dev/null +++ b/.github/workflows/DOS-DJGPP.yml @@ -0,0 +1,35 @@ +name: CI DOS/DJGPP + +on: + push: + pull_request: + repository_dispatch: + types: [run_build] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + container: + image: git.libretro.com:5050/libretro-infrastructure/libretro-djgpp-build-container:latest + options: --user root + + steps: + - uses: actions/checkout@v3 + + - name: Compile RA + run: | + make -f Makefile.dos -j$(getconf _NPROCESSORS_ONLN) clean + make -f Makefile.dos -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1 + + - name: Get short SHA + id: slug + run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" + + - uses: actions/upload-artifact@v3 + with: + name: RA-DOS-dummy-${{ steps.slug.outputs.sha8 }} + path: | + retrodos.exe diff --git a/Makefile.dos b/Makefile.dos index 6472a6ea8f..e37352e874 100644 --- a/Makefile.dos +++ b/Makefile.dos @@ -9,6 +9,7 @@ TOPDIR ?= $(CURDIR) DEBUG ?= 0 WHOLE_ARCHIVE_LINK = 0 +HAVE_STATIC_DUMMY ?= 0 GRIFFIN_BUILD = 0 OBJ := @@ -183,6 +184,14 @@ ifneq ($(ROMFS),) export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) endif +LIB_CORE := + +ifeq ($(HAVE_STATIC_DUMMY),1) + DEFINES += -DHAVE_STATIC_DUMMY +else + LIB_CORE += -lretro_dos +endif + DEPENDS_TMP := $(OFILES:.o=.d) DEPENDS := $(filter-out libretro_libnx.a,$(DEPENDS_TMP)) @@ -194,7 +203,7 @@ DEPENDS := $(filter-out libretro_libnx.a,$(DEPENDS_TMP)) all : $(OUTPUT) $(OUTPUT): $(OBJ) - $(CXX) -o $@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(PLATEXTRA) -L. -lretro_dos $(LIBS) + $(CXX) -o $@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(PLATEXTRA) -L. $(LIB_CORE) $(LIBS) %.o: %.c $(CC) -c -o $@ $(CFLAGS) $<