Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
556edd4
Revert "Revert "Update TIC-80""
RobLoach May 13, 2024
c73fbe7
Update definition files
RobLoach May 13, 2024
da1885a
Change the extra path for building
RobLoach May 13, 2024
a04e95f
Fix lib directories for windows
RobLoach May 14, 2024
695914e
Update .gitlab-ci.yml
RobLoach May 19, 2024
ea22040
Update core
RobLoach May 19, 2024
994e6fb
Update .gitlab-ci.yml
RobLoach May 19, 2024
9bb82f1
Update TIC-80, along with language definitions
RobLoach May 20, 2024
11f6821
Update core
RobLoach May 21, 2024
e8062ed
Disable Android x86 and armeabi-v7a for now
RobLoach May 22, 2024
b54fa47
Clean up CORE_ARGS
RobLoach May 22, 2024
40ebb49
Update core
RobLoach May 22, 2024
100ed5b
Consolidate CORE_ARGS
RobLoach May 24, 2024
4a52994
Update .gitlab-ci.yml
RobLoach May 30, 2024
2440105
Update .gitlab-ci.yml
RobLoach May 30, 2024
017510c
Update TIC-80
RobLoach May 30, 2024
ee0cc91
Update .gitlab-ci.yml
RobLoach May 31, 2024
2a3563b
Update .gitmodules
RobLoach Aug 26, 2025
4ccf307
Update TIC-80, and disable Editors
RobLoach Feb 25, 2026
3dec244
Refactor build options in .gitlab-ci.yml
RobLoach Mar 8, 2026
bd94740
Modify CMake installation in CI configuration
RobLoach Mar 8, 2026
d6b16fe
Update build options in .gitlab-ci.yml
RobLoach Mar 9, 2026
4443a80
Fix CMake installation directory creation
RobLoach Mar 9, 2026
badba33
Enhance CI with JS and Janet build support
RobLoach Mar 9, 2026
de1bbf8
Update .gitlab-ci.yml
RobLoach Mar 9, 2026
7cbdd52
Set BUILD_WITH_JANET to OFF in .gitlab-ci.yml
RobLoach Mar 9, 2026
dd2b368
Update CI configuration for libretro builds
RobLoach Mar 10, 2026
3a1f9b0
Change libretro.cmake URL to latest version
RobLoach Mar 11, 2026
aba633d
Fix syntax for exporting DEVKITPPC path
RobLoach Mar 13, 2026
dc44ae9
Integrate .js-patch into multiple build configurations
RobLoach Mar 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 108 additions & 23 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,39 @@
variables:
GIT_SUBMODULE_STRATEGY: recursive
CORENAME: tic80
CORE_ARGS: -DBUILD_PLAYER=OFF -DBUILD_SOKOL=OFF -DBUILD_SDL=OFF -DBUILD_DEMO_CARTS=OFF -DBUILD_LIBRETRO=ON -DBUILD_WITH_MRUBY=OFF -DCMAKE_BUILD_TYPE=Release
EXTRA_PATH: lib
CORE_ARGS: >
-DBUILD_LIBRETRO=ON
-D__LIBRETRO__=ON
-DBUILD_PLAYER=OFF
-DBUILD_PRO=OFF
-DBUILD_SDL=OFF
-DBUILD_TOOLS=OFF
-DBUILD_TOUCH_INPUT=OFF
-DBUILD_STATIC=ON
-DBUILD_WITH_ALL=OFF
-DBUILD_WITH_LUA=ON
-DBUILD_WITH_MOON=ON
-DBUILD_WITH_FENNEL=ON
-DBUILD_WITH_WREN=ON
-DBUILD_WITH_WASM=ON
-DBUILD_WITH_SQUIRREL=ON
-DBUILD_WITH_PYTHON=ON
-DBUILD_WITH_JS=ON
-DBUILD_WITH_JANET=ON
-DBUILD_WITH_RUBY=OFF
-DBUILD_WITH_YUE=OFF
-DBUILD_WITH_SCHEME=OFF
-DBUILD_WITH_JANET=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON
-DCMAKE_BUILD_TYPE=Release
-DBUILD_EDITORS=OFF
$CORE_ARGS_EXTRA
EXTRA_PATH: bin
CMAKE_SOURCE_ROOT: core

# Inclusion templates, required for the build to work
include:
################################## DESKTOPS ################################
################################## DESKTOPS ################################
# Linux
- project: 'libretro-infrastructure/ci-templates'
file: '/linux-cmake.yml'
Expand All @@ -36,7 +62,7 @@ include:
- project: 'libretro-infrastructure/ci-templates'
file: '/osx-cmake-ppc.yml'

################################## CELLULAR ################################
################################## CELLULAR ################################
# Android
- project: 'libretro-infrastructure/ci-templates'
file: '/android-cmake.yml'
Expand All @@ -56,7 +82,7 @@ include:

# Libnx
- project: 'libretro-infrastructure/ci-templates'
file: '/libnx-static-cmake.yml'
file: '/libnx-static-cmake.yml'

# Gamecube
- project: 'libretro-infrastructure/ci-templates'
Expand All @@ -73,19 +99,46 @@ include:
################################## MISC ####################################
# Emscripten
- project: 'libretro-infrastructure/ci-templates'
file: '/emscripten-static-cmake.yml'
file: '/emscripten-static-cmake.yml'

# Stages for building
stages:
- build-prepare
- build-shared
- build-static

.js-patch:
before_script:
- export NUMPROC=$(($(nproc)/5))
- echo 'set(CMAKE_C_FLAGS_RELEASE "-DPOOR_CLIB" CACHE STRING "" FORCE)' > build_flags.cmake
- export CORE_ARGS="${CORE_ARGS} -C ${CI_PROJECT_DIR}/build_flags.cmake"
- sed -i 's|#include <fenv.h>|#if __has_include(<fenv.h>)\n#include <fenv.h>\n#endif|' "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/vendor/quickjs/quickjs.c"

.core-some-32bits-system:
variables:
EXTRA_PATH: lib
before_script:
- export NUMPROC=$(($(nproc)/5))
- '[ -n "${DEVKITPPC:-}" ] && export PATH="$PATH:$DEVKITPPC/bin"'
- |
echo 'set(CMAKE_C_FLAGS_RELEASE "-DLUA_32BITS -DTIC80_FFT_UNSUPPORTED -DPOOR_CLIB" CACHE STRING "" FORCE)' > build_flags.cmake
echo 'set(CMAKE_CXX_FLAGS_RELEASE "-DLUA_32BITS" CACHE STRING "" FORCE)' >> build_flags.cmake
- export CORE_ARGS="${CORE_ARGS} -C ${CI_PROJECT_DIR}/build_flags.cmake"
- sed -i 's|#include <fenv.h>|#if __has_include(<fenv.h>)\n#include <fenv.h>\n#endif|' "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/vendor/quickjs/quickjs.c"
- curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this gets in, I'd prefer if the upstream PR gets in first: nesbox#2905

Selectively building off of forks can become a mess in some cases 😅

- |
curl -L https://github.com/Kitware/CMake/releases/download/v3.31.11/cmake-3.31.11-linux-x86_64.sh -o cmake-install.sh
chmod +x cmake-install.sh
mkdir -p "$CI_PROJECT_DIR/cmake"
./cmake-install.sh --skip-license --prefix="$CI_PROJECT_DIR/cmake"
export PATH="$CI_PROJECT_DIR/cmake/bin:$PATH"
cmake --version

##############################################################################
#################################### STAGES ##################################
##############################################################################
#
################################### DESKTOPS #################################
################################### DESKTOPS #################################
# Linux 64-bit
libretro-build-linux-x64:
extends:
Expand All @@ -103,12 +156,16 @@ libretro-build-windows-x64:
extends:
- .libretro-windows-cmake-x86_64
- .core-defs
variables:
EXTRA_PATH: lib

# Windows 32-bit
libretro-build-windows-i686:
extends:
- .libretro-windows-cmake-x86
- .core-defs
variables:
EXTRA_PATH: lib

# MacOS 64-bit
libretro-build-osx-x64:
Expand All @@ -122,7 +179,7 @@ libretro-build-osx-ppc:
- .libretro-osx-cmake-ppc
- .core-defs
variables:
CORE_ARGS: -DBUILD_PLAYER=OFF -DBUILD_SOKOL=OFF -DBUILD_SDL=OFF -DBUILD_DEMO_CARTS=OFF -DBUILD_LIBRETRO=ON -DBUILD_WITH_MRUBY=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=10.4 -DUSE_LIBUV=OF
CORE_ARGS: "${CORE_ARGS} -DCMAKE_OSX_DEPLOYMENT_TARGET=10.4 -DUSE_LIBUV=OFF"

# MacOS ARM64
libretro-build-osx-arm64:
Expand All @@ -138,10 +195,11 @@ libretro-build-osx-x86:

################################### CELLULAR #################################
# Android ARMv7a
android-armeabi-v7a:
extends:
- .libretro-android-cmake-armeabi-v7a
- .core-defs
# TODO: Android ARMv7a needs localeconv in locale.h, along with log2, which is not available on this Android build.
#android-armeabi-v7a:
# extends:
# - .libretro-android-cmake-armeabi-v7a
# - .core-defs

# Android ARMv8a
android-arm64-v8a:
Expand All @@ -156,18 +214,13 @@ android-x86_64:
- .core-defs

# Android 32-bit x86
android-x86:
extends:
- .libretro-android-cmake-x86
- .core-defs
# TODO: Android x86 needs localeconv in locale.h, along with log2, which is not available on this Android build.
#android-x86:
# extends:
# - .libretro-android-cmake-x86
# - .core-defs

################################### CONSOLES #################################
# Nintendo 3DS
libretro-build-ctr:
extends:
- .libretro-ctr-static-cmake-retroarch-master
- .core-defs

# OpenDingux
libretro-build-dingux-mips32:
extends:
Expand All @@ -182,6 +235,7 @@ libretro-build-dingux-odbeta-mips32:
extends:
- .libretro-dingux-odbeta-cmake-mips32
- .core-defs
- .js-patch
variables:
DINGUX_CFLAGS: -DDINGUX -fomit-frame-pointer -march=mips32 -mtune=mips32r2 -mhard-float
DINGUX_CXXFLAGS: -DDINGUX -fomit-frame-pointer -march=mips32 -mtune=mips32r2 -mhard-float
Expand All @@ -191,6 +245,7 @@ libretro-build-retrofw-mips32:
extends:
- .libretro-retrofw-odbeta-cmake-mips32
- .core-defs
- .js-patch
variables:
DINGUX_CFLAGS: -DDINGUX -fomit-frame-pointer -march=mips32 -mtune=mips32r2 -mhard-float
DINGUX_CXXFLAGS: -DDINGUX -fomit-frame-pointer -march=mips32 -mtune=mips32r2 -mhard-float
Expand All @@ -200,6 +255,7 @@ libretro-build-miyoo-arm32:
extends:
- .libretro-miyoo-cmake-arm32
- .core-defs
- .js-patch
variables:
DINGUX_CFLAGS: -DDINGUX -fomit-frame-pointer -fno-fast-math -march=armv5te -mtune=arm926ej-s -ftree-vectorize -funswitch-loops
DINGUX_CXXFLAGS: -DDINGUX -fomit-frame-pointer -fno-fast-math -march=armv5te -mtune=arm926ej-s -ftree-vectorize -funswitch-loops
Expand All @@ -210,13 +266,25 @@ libretro-build-vita:
- .libretro-vita-static-cmake-retroarch-master
- .core-defs
variables:
CORE_ARGS: -DBUILD_PLAYER=OFF -DBUILD_SOKOL=OFF -DBUILD_SDL=OFF -DBUILD_DEMO_CARTS=OFF -DBUILD_LIBRETRO=ON -DBUILD_WITH_MRUBY=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=OFF -DCMAKE_BUILD_TYPE=Release
EXTRA_PATH: lib
before_script:
- export NUMPROC=$(($(nproc)/5))
- echo 'set(CMAKE_C_FLAGS_RELEASE "-DPOOR_CLIB" CACHE STRING "" FORCE)' > build_flags.cmake
- curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- export CORE_ARGS="${CORE_ARGS} -DCMAKE_POSITION_INDEPENDENT_CODE=OFF -C ${CI_PROJECT_DIR}/build_flags.cmake"

# Libnx
libretro-build-libnx-aarch64:
extends:
- .libretro-libnx-static-cmake-retroarch-master
- .core-defs
variables:
EXTRA_PATH: lib
before_script:
- export NUMPROC=$(($(nproc)/5))
- curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- sed -i '13,31 s/^/#/' "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/nswitch.cmake"
- sed -i 's/set(PREFER_SYSTEM_LIBRARIES ON)/set(PREFER_SYSTEM_LIBRARIES OFF)/' "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/CMakeLists.txt"

libretro-build-rs90-odbeta-mips32:
extends:
Expand All @@ -226,23 +294,36 @@ libretro-build-rs90-odbeta-mips32:
DINGUX_CFLAGS: -DDINGUX -fomit-frame-pointer -march=mips32 -mtune=mips32 -fno-fast-math
DINGUX_CXXFLAGS: -DDINGUX -fomit-frame-pointer -march=mips32 -mtune=mips32 -fno-fast-math

# Nintendo 3DS
libretro-build-ctr:
extends:
- .libretro-ctr-static-cmake-retroarch-master
- .core-defs
- .core-some-32bits-system

# Gamecube
libretro-build-ngc:
extends:
- .libretro-ngc-static-cmake-retroarch-master
- .core-defs
- .core-some-32bits-system

# Wii
libretro-build-wii:
extends:
- .libretro-wii-static-cmake-retroarch-master
- .core-defs
- .core-some-32bits-system

# WiiU
libretro-build-wiiu:
extends:
- .libretro-wiiu-static-cmake-retroarch-master
- .core-defs
- .core-some-32bits-system
variables:
CORE_ARGS_EXTRA: >
-DBUILD_WITH_PYTHON=OFF

################################### MISC #####################################

Expand All @@ -251,3 +332,7 @@ libretro-build-emscripten:
extends:
- .libretro-emscripten-static-cmake-retroarch-master
- .core-defs
variables:
EXTRA_PATH: lib
before_script:
- curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

Build definitions for the [TIC-80](https://tic80.com/) libretro core. To make any changes to the core code, visit the [upstream repository](https://github.com/nesbox/tic-80).

## Configuration

The following languages have been disabled in the TIC-80 core to allow building across all of libretro's targets...

- Ruby
- Python
- Janet
- Scheme
- Squirrel
- WASM
- Fennel
- JavaScript
Comment on lines +13 to +16
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Squirrel
- WASM
- Fennel
- JavaScript


## License

[MIT](LICENSE)
2 changes: 1 addition & 1 deletion core
Submodule core updated 310 files