Skip to content

Commit

Permalink
Preliminary support of meson builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
bsmiles32 committed Dec 17, 2017
1 parent 8ed7659 commit 545c24b
Show file tree
Hide file tree
Showing 28 changed files with 692 additions and 76 deletions.
125 changes: 70 additions & 55 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ compiler:
addons:
apt:
packages:
- python3
- python3-pip
- libsdl1.2-dev
- libsdl2-dev
- libfreetype6-dev
Expand All @@ -19,61 +21,74 @@ addons:
- binutils-dev
- nasm
env:
- OSD=0
- OSD=1
- NO_ASM=1
- LIRC=1
- PROFILE=1
- DEBUGGER=1
- DBG_CORE=1
- DBG_COUNT=1
- DBG_COMPARE=1
- COUNT_INSTR=1
- MESON_CONFIGURE="-Dosd=true"
- MESON_CONFIGURE="-Dosd=false"
- MESON_CONFIGURE="-Dno_asm=true"
- MESON_CONFIGURE="-Dlirc=true"
- MESON_CONFIGURE="-Ddebugger=true"
- MESON_CONFIGURE="-Ddbg_compare=true"
- MESON_CONFIGURE="-Ddbg_core=true"
- MESON_CONFIGURE="-Ddbg_count=true"
- MESON_CONFIGURE="-Ddbg_profile=true"
- MESON_CONFIGURE="-Ddbg_timing=true"

install:
- export PATH="`pwd`/build:${PATH}"
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip && unzip -q ninja-linux.zip -d build; fi
- sudo pip3 install meson

script:
- make -C projects/unix V=1 clean && LDFLAGS="-Wl,--no-add-needed -Wl,--no-undefined" OPTFLAGS="-O2" make SDL_CONFIG=sdl-config CC="${CC}" CXX="${CXX}" -j$(nproc) -C projects/unix V=1 all
- make -C projects/unix V=1 clean && LDFLAGS="-Wl,--no-add-needed -Wl,--no-undefined" OPTFLAGS="-O2" make SDL_CONFIG=sdl2-config CC="${CC}" CXX="${CXX}" -j$(nproc) -C projects/unix V=1 all
- find /usr/lib -name "*LLVMgold.so" -exec ls -allh {} +
- meson builddir
- meson configure "$MESON_CONFIGURE" builddir
# Only enable LTO when using gcc, because broken Travis packages can't find LLVMgold.so plugin at link time...
- if [ "$CC" == "gcc" ]; then meson configure -Db_lto=true builddir; fi
# Print configuration just to make sure we got it right
- meson configure builddir
- ninja -C builddir

# TODO: MXE not yet ported to meson
# extra mxe build entries
matrix:
include:
- env:
- MXE_CPU=i686
- PATH="/usr/lib/mxe/usr/bin/:$PATH"
addons:
apt:
sources:
- sourceline: 'deb http://pkg.mxe.cc/repos/apt/debian jessie main'
key_url: 'http://pkg.mxe.cc/repos/apt/conf/mxeapt.gpg'
packages:
- mxe-i686-w64-mingw32.shared-gcc
- mxe-i686-w64-mingw32.shared-sdl2
- mxe-i686-w64-mingw32.shared-freeglut
- mxe-i686-w64-mingw32.shared-freetype
- mxe-i686-w64-mingw32.shared-libpng
- mxe-i686-w64-mingw32.shared-zlib
- mxe-i686-w64-mingw32.shared-pkgconf
- nasm
script:
- make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" SDL_CONFIG="${MXE_CPU}-w64-mingw32.shared-sdl2-config" -C projects/unix V=1 clean &&
make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" SDL_CONFIG="${MXE_CPU}-w64-mingw32.shared-sdl2-config" -C projects/unix V=1 -j$(nproc) all

- env:
- MXE_CPU=x86_64
- PATH="/usr/lib/mxe/usr/bin/:$PATH"
addons:
apt:
sources:
- sourceline: 'deb http://pkg.mxe.cc/repos/apt/debian jessie main'
key_url: 'http://pkg.mxe.cc/repos/apt/conf/mxeapt.gpg'
packages:
- mxe-x86-64-w64-mingw32.shared-gcc
- mxe-x86-64-w64-mingw32.shared-sdl2
- mxe-x86-64-w64-mingw32.shared-freeglut
- mxe-x86-64-w64-mingw32.shared-freetype
- mxe-x86-64-w64-mingw32.shared-libpng
- mxe-x86-64-w64-mingw32.shared-zlib
- mxe-i686-w64-mingw32.shared-pkgconf
- nasm
script:
- make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" SDL_CONFIG="${MXE_CPU}-w64-mingw32.shared-sdl2-config" -C projects/unix V=1 clean &&
make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" SDL_CONFIG="${MXE_CPU}-w64-mingw32.shared-sdl2-config" -C projects/unix V=1 -j$(nproc) all
#matrix:
# include:
# - env:
# - MXE_CPU=i686
# - PATH="/usr/lib/mxe/usr/bin/:$PATH"
# addons:
# apt:
# sources:
# - sourceline: 'deb http://pkg.mxe.cc/repos/apt/debian jessie main'
# key_url: 'http://pkg.mxe.cc/repos/apt/conf/mxeapt.gpg'
# packages:
# - mxe-i686-w64-mingw32.shared-gcc
# - mxe-i686-w64-mingw32.shared-sdl2
# - mxe-i686-w64-mingw32.shared-freeglut
# - mxe-i686-w64-mingw32.shared-freetype
# - mxe-i686-w64-mingw32.shared-libpng
# - mxe-i686-w64-mingw32.shared-zlib
# - mxe-i686-w64-mingw32.shared-pkgconf
# - nasm
# script:
# - make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" SDL_CONFIG="${MXE_CPU}-w64-mingw32.shared-sdl2-config" -C projects/unix V=1 clean &&
# make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" SDL_CONFIG="${MXE_CPU}-w64-mingw32.shared-sdl2-config" -C projects/unix V=1 -j$(nproc) all
#
# - env:
# - MXE_CPU=x86_64
# - PATH="/usr/lib/mxe/usr/bin/:$PATH"
# addons:
# apt:
# sources:
# - sourceline: 'deb http://pkg.mxe.cc/repos/apt/debian jessie main'
# key_url: 'http://pkg.mxe.cc/repos/apt/conf/mxeapt.gpg'
# packages:
# - mxe-x86-64-w64-mingw32.shared-gcc
# - mxe-x86-64-w64-mingw32.shared-sdl2
# - mxe-x86-64-w64-mingw32.shared-freeglut
# - mxe-x86-64-w64-mingw32.shared-freetype
# - mxe-x86-64-w64-mingw32.shared-libpng
# - mxe-x86-64-w64-mingw32.shared-zlib
# - mxe-i686-w64-mingw32.shared-pkgconf
# - nasm
# script:
# - make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" SDL_CONFIG="${MXE_CPU}-w64-mingw32.shared-sdl2-config" -C projects/unix V=1 clean &&
# make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" SDL_CONFIG="${MXE_CPU}-w64-mingw32.shared-sdl2-config" -C projects/unix V=1 -j$(nproc) all
32 changes: 22 additions & 10 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
version: 1.0.{build}

configuration:
- New_Dynarec_Release
- Release

platform:
- x86
- x64

matrix:
exclude:
- platform: x64
configuration: New_Dynarec_Release
install:
- cmd: set "ORIG_PATH=%PATH%"
# Use a Ninja with QuLogic's patch: https://github.com/ninja-build/ninja/issues/1219
# Use the x86 python only when building for x86 for the cpython tests.
# For all other archs (including, say, arm), use the x64 python.
- cmd: if %platform%==x86 ( set MESON_PYTHON_PATH=C:\Python34 ) else ( set MESON_PYTHON_PATH=C:\Python34-x64 )
- cmd: set "MESON_FIXED_NINJA=1"
- cmd: echo "MESON_PYTHON_PATH=%MESON_PYTHON_PATH%"
- ps: (new-object net.webclient).DownloadFile( 'https://nirbheek.in/files/binaries/ninja/win32/ninja.exe', "%MESON_PYTHON_PATH%\ninja" )
- cmd: if %compiler%==msvc2010 ( call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" %platform% )
- cmd: if %compiler%==msvc2013 ( call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %platform% )
- cmd: if %compiler%==msvc2015 ( call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %platform% )
- cmd: echo Using Python at %MESON_PYTHON_PATH%
- cmd: "%MESON_PYTHON_PATH%\\pip install meson"

build_script:
- cmd: echo Building on %platform% with %compiler%
- cmd: PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%; && python meson.py --backend=ninja builddir
- cmd: PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%; && ninja -C builddir

before_build:
- cmd: git clone --depth 1 https://github.com/mupen64plus/mupen64plus-win32-deps.git ../mupen64plus-win32-deps
build:
project: projects/VisualStudio2013/mupen64plus-core.vcxproj
verbosity: minimal
on_finish:
- cmd: set "PATH=%ORIG_PATH%"
Loading

0 comments on commit 545c24b

Please sign in to comment.