mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 02:00:41 +00:00
(.gitlab-ci.yml) Add Emscripten target
This commit is contained in:
parent
bd405eb7c3
commit
be1c7b8e4c
@ -529,6 +529,56 @@ build-static-retroarch-dummy-ngc:
|
||||
- "cp -f libretro-common/audio/dsp_filters/*.dsp ${MEDIA_PATH}/${CI_PROJECT_NAME}/filters/audio"
|
||||
- "cp -f gfx/video_filters/*.filt ${MEDIA_PATH}/${CI_PROJECT_NAME}/filters/video"
|
||||
|
||||
build-static-retroarch-emscripten:
|
||||
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-emscripten:latest
|
||||
stage: prepare-for-static-cores
|
||||
before_script:
|
||||
- export NUMPROC=$(($(nproc)/3))
|
||||
artifacts:
|
||||
paths:
|
||||
- retroarch-precompiled/
|
||||
expire_in: 1 day
|
||||
dependencies: []
|
||||
needs:
|
||||
# Dummy build requires no core
|
||||
- build-static-retroarch-dummy-emscripten
|
||||
script:
|
||||
# Allow failure since we don't have a core
|
||||
- "emmake make -f Makefile.emscripten -j$NUMPROC ||:"
|
||||
- "mkdir .retroarch-precompiled"
|
||||
- "cp -r ./* .retroarch-precompiled/"
|
||||
- "mv .retroarch-precompiled/ retroarch-precompiled/"
|
||||
|
||||
build-static-retroarch-dummy-emscripten:
|
||||
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-amd64-ubuntu:latest
|
||||
stage: build
|
||||
variables:
|
||||
MEDIA_PATH: .media
|
||||
before_script:
|
||||
- export NUMPROC=$(($(nproc)/3))
|
||||
artifacts:
|
||||
paths:
|
||||
- ${MEDIA_PATH}
|
||||
expire_in: 1 month
|
||||
dependencies: []
|
||||
script:
|
||||
- "mkdir -p ${MEDIA_PATH}/${CI_PROJECT_NAME}/filters/audio"
|
||||
- "mkdir -p ${MEDIA_PATH}/${CI_PROJECT_NAME}/filters/video"
|
||||
- "mkdir -p ${MEDIA_PATH}/${CI_PROJECT_NAME}/pkg/media"
|
||||
- "cp -f libretro-common/audio/dsp_filters/*.dsp ${MEDIA_PATH}/${CI_PROJECT_NAME}/filters/audio"
|
||||
- "cp -f gfx/video_filters/*.filt ${MEDIA_PATH}/${CI_PROJECT_NAME}/filters/video"
|
||||
- "cp -rf pkg/emscripten/libretro ${MEDIA_PATH}/${CI_PROJECT_NAME}/pkg"
|
||||
- "cp -f media/canvas.png ${MEDIA_PATH}/${CI_PROJECT_NAME}/pkg/media"
|
||||
- "cp -f media/icon_dark.ico ${MEDIA_PATH}/${CI_PROJECT_NAME}/pkg/media"
|
||||
- "cp -f media/icon_light.ico ${MEDIA_PATH}/${CI_PROJECT_NAME}/pkg/media"
|
||||
- "cp -f media/invader_dark.png ${MEDIA_PATH}/${CI_PROJECT_NAME}/pkg/media"
|
||||
- "cp -f media/invader_light.png ${MEDIA_PATH}/${CI_PROJECT_NAME}/pkg/media"
|
||||
- "cp -f media/libretro-logo.png ${MEDIA_PATH}/${CI_PROJECT_NAME}/pkg/media"
|
||||
- "cp -f media/retroarch-16x16.ico ${MEDIA_PATH}/${CI_PROJECT_NAME}/pkg/media"
|
||||
- "cp -f media/retroarch-16x16.png ${MEDIA_PATH}/${CI_PROJECT_NAME}/pkg/media"
|
||||
- "cp -f media/retroarch-96x96.png ${MEDIA_PATH}/${CI_PROJECT_NAME}/pkg/media"
|
||||
- "cp -f media/retroarch.ico ${MEDIA_PATH}/${CI_PROJECT_NAME}/pkg/media"
|
||||
|
||||
trigger_static-cores:
|
||||
stage: trigger-static-cores
|
||||
needs:
|
||||
@ -540,6 +590,7 @@ trigger_static-cores:
|
||||
- build-static-retroarch-wiiu
|
||||
- build-static-retroarch-wii
|
||||
- build-static-retroarch-ngc
|
||||
- build-static-retroarch-emscripten
|
||||
dependencies: []
|
||||
script:
|
||||
# Dummy for now
|
||||
|
@ -1,4 +1,10 @@
|
||||
ifeq ($(TARGET),)
|
||||
ifeq ($(LIBRETRO),)
|
||||
TARGET := retroarch.js
|
||||
else
|
||||
TARGET := $(LIBRETRO)_libretro.js
|
||||
endif
|
||||
endif
|
||||
|
||||
EOPT = USE_ZLIB=1 # Emscripten specific options
|
||||
EOPTS = $(addprefix -s $(EMPTY), $(EOPT)) # Add '-s ' to each option
|
||||
@ -37,6 +43,16 @@ HAVE_CONFIGFILE = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_IBXM = 1
|
||||
|
||||
ASYNC ?= 0
|
||||
ifeq ($(LIBRETRO), mupen64plus)
|
||||
ASYNC = 1
|
||||
endif
|
||||
|
||||
LTO ?= 0
|
||||
ifeq ($(LIBRETRO), tyrquake)
|
||||
LTO = 0
|
||||
endif
|
||||
|
||||
MEMORY = 134217728
|
||||
|
||||
PRECISE_F32 = 1
|
||||
|
@ -115,6 +115,10 @@ static void frontend_emscripten_get_env(int *argc, char *argv[],
|
||||
#endif
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SHADER], base_path,
|
||||
"bundle/shaders", sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER]));
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER], base_path,
|
||||
"bundle/filters/audio", sizeof(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER]));
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER], base_path,
|
||||
"bundle/filters/video", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER]));
|
||||
|
||||
/* user data dirs */
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CHEATS], user_path,
|
||||
|
Loading…
Reference in New Issue
Block a user