try some more CIs
authornotaz <notasas@gmail.com>
Sat, 18 Jan 2025 00:20:51 +0000 (02:20 +0200)
committernotaz <notasas@gmail.com>
Sat, 18 Jan 2025 00:20:51 +0000 (02:20 +0200)
.github/workflows/ci-libretro.yml [new file with mode: 0644]
.github/workflows/ci-linux-arm64.yml
.github/workflows/ci-linux-armhf.yml
.github/workflows/ci-linux.yml
jni/Android.mk

diff --git a/.github/workflows/ci-libretro.yml b/.github/workflows/ci-libretro.yml
new file mode 100644 (file)
index 0000000..e1d608f
--- /dev/null
@@ -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/
index 249928f..398c518 100644 (file)
@@ -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)
index 6e37781..154a8bd 100644 (file)
@@ -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)
index 7ab7d36..595f3ed 100644 (file)
@@ -14,4 +14,4 @@ jobs:
     - name: configure
       run: DUMP_CONFIG_LOG=1 ./configure
     - name: make
-      run: make
+      run: make -j$(getconf _NPROCESSORS_ONLN)
index 440c6b8..8439f3d 100644 (file)
@@ -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