From f1d7e1144a6cad5e70ca19fd44c693f42148e913 Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 18 Jan 2025 02:20:51 +0200 Subject: [PATCH] try some more CIs --- .github/workflows/ci-libretro.yml | 33 ++++++++++++++++++++++++++++ .github/workflows/ci-linux-arm64.yml | 4 ++-- .github/workflows/ci-linux-armhf.yml | 4 ++-- .github/workflows/ci-linux.yml | 2 +- jni/Android.mk | 7 +++--- 5 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/ci-libretro.yml diff --git a/.github/workflows/ci-libretro.yml b/.github/workflows/ci-libretro.yml new file mode 100644 index 00000000..e1d608f0 --- /dev/null +++ b/.github/workflows/ci-libretro.yml @@ -0,0 +1,33 @@ +name: CI (Linux) +on: [push, pull_request] +jobs: + build-libretro: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: make + run: make -j$(getconf _NPROCESSORS_ONLN) -f Makefile.libretro + + build-libretro-win32: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Install dependencies + run: | + sudo apt-get update -qq + sudo apt-get install -y gcc-mingw-w64 + - name: make + run: make -j$(getconf _NPROCESSORS_ONLN) -f Makefile.libretro platform=win32 CC=x86_64-w64-mingw32-gcc + + build-libretro-android: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: make + run: $(ANDROID_NDK_HOME)/ndk-build -j$(getconf _NPROCESSORS_ONLN) --no-print-directory -C jni/ diff --git a/.github/workflows/ci-linux-arm64.yml b/.github/workflows/ci-linux-arm64.yml index 249928f3..398c5186 100644 --- a/.github/workflows/ci-linux-arm64.yml +++ b/.github/workflows/ci-linux-arm64.yml @@ -1,7 +1,7 @@ name: CI (Linux arm64) on: [push, pull_request] jobs: - build-linux: + build-linux-arm64: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 @@ -19,4 +19,4 @@ jobs: - name: configure run: DUMP_CONFIG_LOG=1 CROSS_COMPILE=aarch64-linux-gnu- SDL_CONFIG=usr/bin/sdl-config PATH=$PATH:usr/bin CFLAGS='-Iusr/include/ -Iusr/include/SDL' LDFLAGS='-Lusr/lib/aarch64-linux-gnu/ -Llib/aarch64-linux-gnu/ -Wl,-rpath-link=lib/aarch64-linux-gnu/,-rpath-link=usr/lib/aarch64-linux-gnu/,-rpath-link=usr/lib/aarch64-linux-gnu/pulseaudio/' ./configure - name: make - run: make + run: make -j$(getconf _NPROCESSORS_ONLN) diff --git a/.github/workflows/ci-linux-armhf.yml b/.github/workflows/ci-linux-armhf.yml index 6e37781b..154a8bd1 100644 --- a/.github/workflows/ci-linux-armhf.yml +++ b/.github/workflows/ci-linux-armhf.yml @@ -1,7 +1,7 @@ name: CI (Linux armhf) on: [push, pull_request] jobs: - build-linux: + build-linux-armhf: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 @@ -19,4 +19,4 @@ jobs: - name: configure run: DUMP_CONFIG_LOG=1 CROSS_COMPILE=arm-linux-gnueabihf- SDL_CONFIG=usr/bin/sdl-config PATH=$PATH:usr/bin CFLAGS='-Iusr/include/ -Iusr/include/SDL' LDFLAGS='-Lusr/lib/arm-linux-gnueabihf/ -Llib/arm-linux-gnueabihf/ -Wl,-rpath-link=lib/arm-linux-gnueabihf/,-rpath-link=usr/lib/arm-linux-gnueabihf/,-rpath-link=usr/lib/arm-linux-gnueabihf/pulseaudio/' ./configure - name: make - run: make + run: make -j$(getconf _NPROCESSORS_ONLN) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 7ab7d360..595f3ed3 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -14,4 +14,4 @@ jobs: - name: configure run: DUMP_CONFIG_LOG=1 ./configure - name: make - run: make + run: make -j$(getconf _NPROCESSORS_ONLN) diff --git a/jni/Android.mk b/jni/Android.mk index 440c6b88..8439f3d7 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -1,4 +1,5 @@ LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) $(shell cd "$(LOCAL_PATH)" && ((git describe --always || echo) | sed -e 's/.*/#define REV "\0"/' > ../frontend/revision.h_)) $(shell cd "$(LOCAL_PATH)" && (diff -q ../frontend/revision.h_ ../frontend/revision.h > /dev/null 2>&1 || cp ../frontend/revision.h_ ../frontend/revision.h)) @@ -22,6 +23,8 @@ DYNAREC_DIR := $(ROOT_DIR)/libpcsxcore/new_dynarec DEPS_DIR := $(ROOT_DIR)/deps LIBRETRO_COMMON := $(DEPS_DIR)/libretro-common EXTRA_INCLUDES := +COREFLAGS := +SOURCES_ASM := # core SOURCES_C := $(CORE_DIR)/cdriso.c \ @@ -98,7 +101,6 @@ SOURCES_C += \ $(LCHDR_ZSTD)/decompress/zstd_ddict.c \ $(LCHDR_ZSTD)/decompress/zstd_decompress_block.c \ $(LCHDR_ZSTD)/decompress/zstd_decompress.c -SOURCES_ASM := EXTRA_INCLUDES += $(LCHDR)/include $(LCHDR_LZMA)/include $(LCHDR_ZSTD) COREFLAGS += -DHAVE_CHD -DZ7_ST -DZSTD_DISABLE_ASM ifeq (,$(call gte,$(APP_PLATFORM_LEVEL),18)) @@ -245,14 +247,13 @@ ifneq ($(GIT_VERSION)," unknown") COREFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" endif -include $(CLEAR_VARS) LOCAL_MODULE := retro LOCAL_SRC_FILES := $(SOURCES_C) $(SOURCES_ASM) LOCAL_CFLAGS := $(COREFLAGS) LOCAL_C_INCLUDES := $(ROOT_DIR)/include LOCAL_C_INCLUDES += $(DEPS_DIR)/crypto LOCAL_C_INCLUDES += $(EXTRA_INCLUDES) -LOCAL_LDFLAGS += -Wl,-version-script=$(FRONTEND_DIR)/libretro-version-script +LOCAL_LDFLAGS := -Wl,-version-script=$(FRONTEND_DIR)/libretro-version-script LOCAL_LDFLAGS += -Wl,--script=$(FRONTEND_DIR)/libretro-extern.T LOCAL_LDFLAGS += -Wl,--gc-sections LOCAL_LDLIBS := -lz -llog -- 2.39.5