From 1fd0e9820821d733b70dd2d3c2aba74628433688 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sat, 31 Jul 2021 12:04:45 +0300 Subject: [PATCH 1/2] Added CI/CD pipeline with artifacts, now after each commit you can download binary file for tests. --- .github/workflows/c-cpp.yml | 30 ++++++++++++++++++++++++++++++ Makefile | 5 +++++ 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/c-cpp.yml diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 0000000..0c4fd65 --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,30 @@ +name: eBookReaderSwitch CI pipeline + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + container: devkitpro/devkita64:latest + + steps: + - run: apt update && apt -y install libfreetype6-dev tree + - uses: actions/checkout@v1 + - name: Update repo. + run: | + git submodule update --init --recursive + + - name: Building eBookReaderSwitch + run: | + export NODEBUG=true + make mupdf && make -j$(nproc) + + - uses: actions/upload-artifact@master + with: + name: eBookReaderSwitch + path: eBookReaderSwitch.nro \ No newline at end of file diff --git a/Makefile b/Makefile index 3016e9e..392e436 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,12 @@ CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions #-DDEBUG=1 -DEXPERIMENTAL=1 ASFLAGS := -g $(ARCH) LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) +nodebug = ${NODEBUG} +ifdef nodebug +LIBS := -lstdc++fs -lSDL2_ttf -lSDL2_image -lpng -ljpeg `sdl2-config --libs` -lfreetype -lwebp -lz -lbz2 -lconfig -lnx -lmupdf -lmupdf-third #-lmupdf_core -lmupdf_thirdparty +else LIBS := -lstdc++fs -lSDL2_ttf -lSDL2_image -lpng -ljpeg `sdl2-config --libs` -lfreetype -lwebp -lz -lbz2 -ltwili -lconfig -lnx -lmupdf -lmupdf-third #-lmupdf_core -lmupdf_thirdparty +endif #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing From fdf9a26f11e7868b3a102f54385d28b5549ad7bf Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sat, 31 Jul 2021 14:13:11 +0300 Subject: [PATCH 2/2] Fixing typo in Makefile for CI actions. --- .github/workflows/c-cpp.yml | 2 +- Makefile | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 0c4fd65..a19949e 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -13,7 +13,7 @@ jobs: container: devkitpro/devkita64:latest steps: - - run: apt update && apt -y install libfreetype6-dev tree + - run: apt update && apt -y install libfreetype6-dev - uses: actions/checkout@v1 - name: Update repo. run: | diff --git a/Makefile b/Makefile index 392e436..313f525 100644 --- a/Makefile +++ b/Makefile @@ -68,12 +68,13 @@ CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions #-DDEBUG=1 -DEXPERIMENTAL=1 ASFLAGS := -g $(ARCH) LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) -nodebug = ${NODEBUG} -ifdef nodebug -LIBS := -lstdc++fs -lSDL2_ttf -lSDL2_image -lpng -ljpeg `sdl2-config --libs` -lfreetype -lwebp -lz -lbz2 -lconfig -lnx -lmupdf -lmupdf-third #-lmupdf_core -lmupdf_thirdparty -else -LIBS := -lstdc++fs -lSDL2_ttf -lSDL2_image -lpng -ljpeg `sdl2-config --libs` -lfreetype -lwebp -lz -lbz2 -ltwili -lconfig -lnx -lmupdf -lmupdf-third #-lmupdf_core -lmupdf_thirdparty +LIBS_REAL = stdc++fs SDL2_ttf SDL2_image png jpeg freetype webp z bz2 config nx mupdf mupdf-third +## LIBS_REAL += mupdf_core mupdf_thirdparty + +ifeq (,$(NODEBUG)) +LIBS_REAL += twili endif +LIBS = $(addprefix -l,$(LIBS_REAL)) $(shell sdl2-config --libs) #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing