mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 15:01:40 +00:00
port to macos because it has android emulator
This commit is contained in:
parent
d1cf69f804
commit
618e51814b
1 changed files with 28 additions and 42 deletions
|
@ -53,7 +53,7 @@ variables:
|
|||
# This is a symlink pointing to the real Android NDK
|
||||
# Must be the same as $ANDROID_NDK_HOME see:
|
||||
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
|
||||
NDK: '/usr/local/lib/android/sdk/ndk-bundle'
|
||||
NDK: '/Users/runner/Library/Android/sdk/ndk-bundle'
|
||||
|
||||
# All the built binaries, libs and their headers will be installed here
|
||||
PREFIX: '$(DEV)/opt/android'
|
||||
|
@ -64,7 +64,7 @@ variables:
|
|||
|
||||
# The path of standalone NDK toolchain
|
||||
# Refer to https://developer.android.com/ndk/guides/standalone_toolchain.html
|
||||
NDK_TOOLCHAIN: '$(NDK)/toolchains/llvm/prebuilt/linux-x86_64/'
|
||||
NDK_TOOLCHAIN: '$(NDK)/toolchains/llvm/prebuilt/darwin-x86_64/'
|
||||
|
||||
# Don't mix up .pc files from your host and build target
|
||||
PKG_CONFIG_PATH: '$(LIBPATH0)/pkgconfig'
|
||||
|
@ -122,15 +122,15 @@ jobs:
|
|||
#AUTOTOOLS_TARGET: "$(ARCH)-pc-linux"
|
||||
|
||||
pool:
|
||||
vmImage: 'ubuntu-20.04'
|
||||
vmImage: 'macOS-10.15'
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
- bash: |
|
||||
set -ex
|
||||
mkdir -p $(DEV)
|
||||
displayName: 'mkdir $(DEV)'
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
set -ex
|
||||
|
||||
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz
|
||||
|
@ -177,28 +177,14 @@ jobs:
|
|||
displayName: 'Cache fluidsynth dependency libraries'
|
||||
condition: and(not(in(variables['Build.Reason'], 'Schedule')), ${{ parameters.useCache }})
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
set -ex
|
||||
|
||||
sudo apt remove --purge --auto-remove cmake
|
||||
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
|
||||
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main'
|
||||
displayName: 'Use recent CMake Version'
|
||||
condition: ne(variables.CACHE_RESTORED, 'true')
|
||||
enabled: 'false'
|
||||
|
||||
- script: |
|
||||
sudo apt-get update -y
|
||||
displayName: 'Update apt'
|
||||
condition: ne(variables.CACHE_RESTORED, 'true')
|
||||
|
||||
- script: |
|
||||
set -ex
|
||||
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install gettext cmake zlib1g-dev autogen automake autoconf libtool pkg-config autotools-dev build-essential meson ninja-build
|
||||
PACKAGES="gettext cmake zlib autogen automake autoconf libtool pkg-config meson ninja"
|
||||
brew install $PACKAGES
|
||||
displayName: 'apt-get install'
|
||||
condition: ne(variables.CACHE_RESTORED, 'true')
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
set -e
|
||||
|
||||
# The cross-compile toolchain we use
|
||||
|
@ -237,7 +223,7 @@ jobs:
|
|||
|
||||
displayName: 'Set environment variables'
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
set -ex
|
||||
|
||||
pushd libiconv-${ICONV_VERSION}
|
||||
|
@ -262,7 +248,7 @@ jobs:
|
|||
workingDirectory: $(DEV)
|
||||
condition: ne(variables.CACHE_RESTORED, 'true')
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
set -ex
|
||||
|
||||
pushd libffi-${FFI_VERSION}
|
||||
|
@ -278,7 +264,7 @@ jobs:
|
|||
workingDirectory: $(DEV)
|
||||
condition: ne(variables.CACHE_RESTORED, 'true')
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
set -ex
|
||||
export PKGCFG=`which pkg-config`
|
||||
pushd glib-${GLIB_VERSION}.${GLIB_EXTRAVERSION}
|
||||
|
@ -365,7 +351,7 @@ jobs:
|
|||
workingDirectory: $(DEV)
|
||||
enabled: 'false'
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
pushd glib-${GLIB_VERSION}.${GLIB_EXTRAVERSION}
|
||||
cat _builddir/meson-logs/meson-log.txt
|
||||
popd
|
||||
|
@ -374,7 +360,7 @@ jobs:
|
|||
condition: failed()
|
||||
enabled: 'false'
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
set -ex
|
||||
|
||||
pushd gettext-${GETTEXT_VERSION}
|
||||
|
@ -402,7 +388,7 @@ jobs:
|
|||
workingDirectory: $(DEV)
|
||||
condition: ne(variables.CACHE_RESTORED, 'true')
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
set -ex
|
||||
|
||||
pushd glib-${GLIB_VERSION}.${GLIB_EXTRAVERSION}
|
||||
|
@ -470,7 +456,7 @@ jobs:
|
|||
sourceDir: 'libogg-$(OGG_VERSION)'
|
||||
cmakeArgs: '-DINSTALL_DOCS=0'
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
ls -la libogg-${OGG_VERSION}/build/CMakeFiles/
|
||||
cat libogg-${OGG_VERSION}/build/CMakeFiles/CMakeError.log
|
||||
true
|
||||
|
@ -482,7 +468,7 @@ jobs:
|
|||
parameters:
|
||||
sourceDir: 'libvorbis-$(VORBIS_VERSION)'
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
ls -la libvorbis-${VORBIS_VERSION}/build/CMakeFiles/
|
||||
cat libvorbis-${VORBIS_VERSION}/build/CMakeFiles/CMakeError.log
|
||||
true
|
||||
|
@ -497,7 +483,7 @@ jobs:
|
|||
sourceDir: 'flac-$(FLAC_VERSION)'
|
||||
cmakeArgs: '-DCMAKE_C_STANDARD=99 -DCMAKE_C_STANDARD_REQUIRED=1 -DWITH_ASM=0 -DBUILD_CXXLIBS=0 -DBUILD_PROGRAMS=0 -DBUILD_EXAMPLES=0 -DBUILD_DOCS=0 -DINSTALL_MANPAGES=0'
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
ls -la flac-${FLAC_VERSION}/build/CMakeFiles/
|
||||
cat flac-${FLAC_VERSION}/build/CMakeFiles/CMakeError.log
|
||||
true
|
||||
|
@ -511,7 +497,7 @@ jobs:
|
|||
sourceDir: 'opus-$(OPUS_VERSION)'
|
||||
cmakeArgs: '-DBUILD_PROGRAMS=0 -DOPUS_MAY_HAVE_NEON=1 -DCMAKE_C_STANDARD=99 -DCMAKE_C_STANDARD_REQUIRED=1'
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
ls -la opus-${OPUS_VERSION}/build/CMakeFiles/
|
||||
cat opus-${OPUS_VERSION}/build/CMakeFiles/CMakeError.log
|
||||
cat opus-${OPUS_VERSION}/build/CMakeFiles/CMakeOutput.log
|
||||
|
@ -525,7 +511,7 @@ jobs:
|
|||
sourceDir: 'libsndfile-$(SNDFILE_VERSION)'
|
||||
cmakeArgs: '-DBUILD_PROGRAMS=0 -DBUILD_EXAMPLES=0'
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
ls -la libsndfile-${SNDFILE_VERSION}/build/CMakeFiles/
|
||||
cat libsndfile-${SNDFILE_VERSION}/build/CMakeFiles/CMakeError.log
|
||||
true
|
||||
|
@ -538,7 +524,7 @@ jobs:
|
|||
sourceDir: 'oboe-$(OBOE_VERSION)'
|
||||
installCommand: 'cp liboboe.* ${PREFIX}/lib/ && cp -ur ../include/oboe ${PREFIX}/include'
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
set -ex
|
||||
|
||||
# create a custom pkgconfig file for oboe to allow fluidsynth to find it
|
||||
|
@ -574,7 +560,7 @@ jobs:
|
|||
cmakeArgs: '-Denable-opensles=1 -Denable-floats=1 -Denable-oboe=1 -Denable-dbus=0 -Denable-oss=0'
|
||||
installCommand: ''
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
set -ex
|
||||
ls $ANDROID_HOME
|
||||
ls $ANDROID_HOME/emulator
|
||||
|
@ -588,7 +574,7 @@ jobs:
|
|||
$ANDROID_HOME/platform-tools/adb devices echo "Emulator started"
|
||||
displayName: 'Create and start emulator'
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
set -x
|
||||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(PREFIX)/lib:$(NDK_TOOLCHAIN)/sysroot/usr/lib/$(ARCH)-linux-android$(ANDROID_TARGET_ABI)/$(ANDROID_API)
|
||||
pushd build
|
||||
|
@ -599,7 +585,7 @@ jobs:
|
|||
condition: and(succeeded(), in(variables['ARCH'], 'x86_64', 'i686'))
|
||||
enabled: 'false'
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
set -ex
|
||||
pushd build
|
||||
make install
|
||||
|
@ -614,12 +600,12 @@ jobs:
|
|||
installCommand: 'cp *.so ${PREFIX}/lib/'
|
||||
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
ls -Rg $(PREFIX)
|
||||
displayName: 'Show cross-compiled files in $(PREFIX)'
|
||||
condition: always()
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
set -ex
|
||||
# use ANDROID_ABI_CMAKE so libs can be simply copied to the archive contents in src/main/jniLibs
|
||||
mkdir -p $(Build.ArtifactStagingDirectory)/lib/$(ANDROID_ABI_CMAKE)
|
||||
|
@ -633,7 +619,7 @@ jobs:
|
|||
cp -a $(PREFIX)/include/fluidsynth* .
|
||||
displayName: 'Collecting artifacts'
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
set -ex
|
||||
ls libFLAC.so
|
||||
ls libfluidsynth-assetloader.so
|
||||
|
@ -661,7 +647,7 @@ jobs:
|
|||
ArtifactName: '$(ARTIFACT_NAME)'
|
||||
publishLocation: 'Container'
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
set -ex
|
||||
# as very last step before creating the pipeline cache, remove fluidsynth
|
||||
pushd build
|
||||
|
|
Loading…
Reference in a new issue